Did not break any tests (why would it?), reduced confusion in the source.
Remove 'tern' stack state, which was never read.
Remove unused expr_endfn.
Remove unused self.env.dynamic.keys clauses.
Remove useless state change in lexer.
Remove unused dynamic? and used? from Environment.
EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN)
#define IS_END() IS_lex_state(EXPR_END_ANY)
I've figured it out while writing Parser. expr_endfn is not actually needed until 2.1, where it is used to parse stuff like def class foo:\nend (note the lack of parens).
def class foo:\nend
This does a LOT more than what the commit message says. It renders it unreviewable and should be broken down into smaller commits.
I've reviewed when and why tern stopped being used (between 3.0.0.a8 and 3.0.0.a9) and verified that it can go. I'm removing it now by hand. The rest of these diffs are on their own.
Um, I don't think so. The changes in action bodies were caused solely due to changes in numbering due to removal of lookahead clauses specific to self.env.dynamic.keys.
Gotcha... I missed that because too much is tangled up in these changes. I've verified that I can remove dynamic with these extra changes.
I see no evidence that this is useless. test_match fails in all three parsers if this code doesn't set the state to :expr_beg.
Right, nevermind this commit, it's broken.
dynamic is used by the parsers and fails a ton of tests if it is removed. The rest can go.
OK. I've applied or manually redone what I can here. Thanks