[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 9/9] pkl: fix location info for unary/binary/ternary exp
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH 9/9] pkl: fix location info for unary/binary/ternary exp |
Date: |
Thu, 28 Dec 2023 15:26:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
OK.
Thanks!
> 2023-12-28 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
>
> * libpoke/pkl-tab.y (pkl_make_assertion): Fix typo.
> (expression): Fix location for unary/binary/ternary
> expressions.
> ---
> ChangeLog | 6 ++++++
> libpoke/pkl-tab.y | 8 ++++----
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index 020cd02d..0224bf01 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,9 @@
> +2023-12-28 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
> +
> + * libpoke/pkl-tab.y (pkl_make_assertion): Fix typo.
> + (expression): Fix location for unary/binary/ternary
> + expressions.
> +
> 2023-12-28 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
>
> * libpoke/pkl-insn.def (tol): New instruction.
> diff --git a/libpoke/pkl-tab.y b/libpoke/pkl-tab.y
> index b2c78c5f..4a9b9348 100644
> --- a/libpoke/pkl-tab.y
> +++ b/libpoke/pkl-tab.y
> @@ -168,7 +168,7 @@ pkl_make_assertion (struct pkl_parser *parser,
> pkl_ast_node cond, pkl_ast_node m
> char *loc_source = pkl_loc_to_source (parser, exp_loc, 80);
> char *escaped_loc_source = NULL;
>
> - /* Escape backslash characters in loc_source, wince we are using
> + /* Escape backslash characters in loc_source, since we are using
> it in a Poke string literal. */
> {
> size_t escaped_size = 0, i, j;
> @@ -819,21 +819,21 @@ expression:
> {
> $$ = pkl_ast_make_unary_exp (pkl_parser->ast,
> $1, $2);
> - PKL_AST_LOC ($$) = @1;
> + PKL_AST_LOC ($$) = @$;
> }
> | expression ATTR
> {
> $$ = pkl_ast_make_binary_exp (pkl_parser->ast,
> PKL_AST_OP_ATTR,
> $1, $2);
> PKL_AST_LOC ($2) = @2;
> - PKL_AST_LOC ($$) = @2;
> + PKL_AST_LOC ($$) = @$;
> }
> | expression ATTR '(' expression ')'
> {
> $$ = pkl_ast_make_ternary_exp (pkl_parser->ast,
> PKL_AST_OP_ATTR,
> $1, $2, $4);
> PKL_AST_LOC ($2) = @2;
> - PKL_AST_LOC ($$) = @2;
> + PKL_AST_LOC ($$) = @$;
> }
> | expression '+' expression
> {
- Re: [PATCH 7/9] pkl: add location info to synthesized assignment stmts, (continued)
[PATCH 6/9] pkl: change `pkl_ast_format_loc' function, Mohammad-Reza Nabipoor, 2023/12/27
[PATCH 5/9] pkl: keep track of current filename in codgen, Mohammad-Reza Nabipoor, 2023/12/27
[PATCH 8/9] pkl: report evaluation location in E_constraint exception, Mohammad-Reza Nabipoor, 2023/12/27
[PATCH 9/9] pkl: fix location info for unary/binary/ternary exp, Mohammad-Reza Nabipoor, 2023/12/27
- Re: [PATCH 9/9] pkl: fix location info for unary/binary/ternary exp,
Jose E. Marchesi <=
Re: [PATCH 1/9] utils: fix build and distribution of `pk-jojopatch', Jose E. Marchesi, 2023/12/28