A custom AST hierarchy for our own use #9

Open
lihaoyi opened this Issue May 9, 2013 · 3 comments

Comments

Projects
None yet
3 participants
@lihaoyi
Owner

lihaoyi commented May 9, 2013

The default python AST objects are clunky and annoying:

  • They don't have nice __str__s or __repr__s
  • They don't have a constructor that will work with pattern matching
  • They don't have structural equality
  • Behave differently in CPython, PyPy and Jython and are probably the main reason why Jython doesn't work right now.

In general they are a pain to use. It would be great if we could have a different ast representation, either using astng or made ourselves using case classes.

@thedrow

This comment has been minimized.

Show comment Hide comment
@thedrow

thedrow Jun 1, 2015

Contributor

Can you direct me to where we're using or parsing the AST?

Contributor

thedrow commented Jun 1, 2015

Can you direct me to where we're using or parsing the AST?

@thedrow

This comment has been minimized.

Show comment Hide comment
@thedrow

thedrow Jun 2, 2015

Contributor
Contributor

thedrow commented Jun 2, 2015

@ceridwen

This comment has been minimized.

Show comment Hide comment
@ceridwen

ceridwen Jun 2, 2015

Contributor

I don't understand how the absence of infer_call_result has any relevance to MacroPy, it looks like it's there for checking function return/call sign signatures for Pylint.

Contributor

ceridwen commented Jun 2, 2015

I don't understand how the absence of infer_call_result has any relevance to MacroPy, it looks like it's there for checking function return/call sign signatures for Pylint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment