poke-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] pkl: parser: make parens optional for format


From: Jose E. Marchesi
Subject: Re: [PATCH] pkl: parser: make parens optional for format
Date: Mon, 10 Oct 2022 18:49:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> +        | FORMAT STR format_arg_list
> +                {
> +                  $$ = pkl_ast_make_format (pkl_parser->ast, $2, $3,
> +                                            0 /* printf_p */);
> +                  PKL_AST_TYPE ($$)
> +                      = ASTREF (pkl_ast_make_string_type (pkl_parser->ast));

Now that I notice, is there any reason why the type of the format AST
node is not set in typify1 like every other node?  Same for the other
syntax.

> +                  PKL_AST_LOC ($2) = @2;
> +                  if (PKL_AST_TYPE ($2))
> +                    PKL_AST_LOC (PKL_AST_TYPE ($2)) = @2;

That location is no longer necesary.

> +                  PKL_AST_LOC ($$) = @$;
> +                  PKL_AST_LOC (PKL_AST_TYPE ($$)) = @$;

Likewise.

> +                }




reply via email to

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