poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/5] pkl: Mark offset as literal if its components are litera


From: Jose E. Marchesi
Subject: Re: [PATCH 2/5] pkl: Mark offset as literal if its components are literals
Date: Sun, 23 Jan 2022 15:23:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Mohammad.
This is OK for master.
Thanks!

> 2022-01-22  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
>
>       * libpoke/pkl-ast.c (pkl_ast_make_offset): An offset value
>       is literal if the magnitude and unit are also literals.
> ---
>  ChangeLog         | 5 +++++
>  libpoke/pkl-ast.c | 4 ++++
>  2 files changed, 9 insertions(+)
>
> diff --git a/ChangeLog b/ChangeLog
> index fc088bc9..6c540dda 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,8 @@
> +2022-01-22  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
> +
> +     * libpoke/pkl-ast.c (pkl_ast_make_offset): An offset value
> +     is literal if the magnitude and unit are also literals.
> +
>  2022-01-22  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
>  
>       * libpoke/pkl-typify.c (pkl_typify1_ps_struct): Postpone type
> diff --git a/libpoke/pkl-ast.c b/libpoke/pkl-ast.c
> index a032bfc6..0bb9389f 100644
> --- a/libpoke/pkl-ast.c
> +++ b/libpoke/pkl-ast.c
> @@ -1565,6 +1565,10 @@ pkl_ast_make_offset (pkl_ast ast,
>    if (magnitude != NULL)
>      PKL_AST_OFFSET_MAGNITUDE (offset) = ASTREF (magnitude);
>    PKL_AST_OFFSET_UNIT (offset) = ASTREF (unit);
> +  PKL_AST_LITERAL_P (offset)
> +    = magnitude ? PKL_AST_LITERAL_P (PKL_AST_OFFSET_MAGNITUDE (offset))
> +                    && PKL_AST_LITERAL_P (PKL_AST_OFFSET_UNIT (offset))
> +                : 0;
>  
>    return offset;
>  }



reply via email to

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