On Tue, Sep 15, 2020, at 20:10, Greg Ewing wrote:
> On 16/09/20 12:37 pm, Guido van Rossum wrote:
> > IMO if we were to standardize the AST for times immemorial this would 
> > have to be a separate PEP.
> 
> Perhaps, but a stable AST seems to be a prerequisite for this kind
> of feature. Preferably one that corresponds as closely as possible
> to the language syntax so that users can keep it in their heads.
> 
> Maybe the PEP should propose an AST of its own, which would initially
> be a third thing separate from either of the existing ones, with
> the possibility of adopting it as the ast module representation
> some time in the future.

The rust approach to this problem to pass only a token stream to the macro. 
Then, the macro writer brings their own parser.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/DCIQ5AXOY2VHVTWSM77Y33POJYD5OGE3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to