Skip to content

Add missing possible start rules in python.gram #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 3, 2020

Conversation

lysnikolaou
Copy link
Member

No description provided.

Copy link

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably land this before #29?

Copy link

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. (We will have to add something for func_type_input later, but that can wait.)

PS. Could you create issues for tasks needed to get all tests to parse?

@lysnikolaou
Copy link
Member Author

LGTM. (We will have to add something for func_type_input later, but that can wait.)

PS. Could you create issues for tasks needed to get all tests to parse?

Of course. I'll do that.

@lysnikolaou
Copy link
Member Author

There is one more thing I missed. statement_newline should also accept a lone NEWLINE, but I'm not sure what the action should be. I tried to test this, bit didn't find an answer. For example, ast.parse('\n', mode='single') doesn't work.

I'm guessing it should be an empty asdl_seq *, but I'm not sure.

@lysnikolaou
Copy link
Member Author

lysnikolaou commented Apr 3, 2020

Turns out, it just generates a Pass node.

asdl_seq_SET(stmts, 0, Pass(n->n_lineno, n->n_col_offset,

@lysnikolaou lysnikolaou requested a review from gvanrossum April 3, 2020 11:34
Copy link

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah!

@lysnikolaou lysnikolaou merged commit 3aa1dd4 into pegen Apr 3, 2020
@lysnikolaou lysnikolaou deleted the multiple-start-rules branch April 3, 2020 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants