Remove 'tern' stack state, which was never read. #105

Closed
wants to merge 5 commits into
from

Projects

None yet

2 participants

@whitequark

Did not break any tests (why would it?), reduced confusion in the source.

@zenspider zenspider was assigned Apr 25, 2013
@zenspider
Seattle Ruby Brigade member
    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).

@zenspider
Seattle Ruby Brigade member

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.

Seattle Ruby Brigade member

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.

@zenspider
Seattle Ruby Brigade member

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.

@zenspider
Seattle Ruby Brigade member

dynamic is used by the parsers and fails a ton of tests if it is removed. The rest can go.

@zenspider
Seattle Ruby Brigade member

OK. I've applied or manually redone what I can here. Thanks

@zenspider zenspider closed this Jan 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment