poke-devel
[Top][All Lists]
Advanced

[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
>                  {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]