Skip to content

Commit

Permalink
+ Implemented most of pattern matching for 2.7+.
Browse files Browse the repository at this point in the history
There are still some missing cases I couldn't find in the wild. They
still need tests and implementation but are currently set up to raise
when they're encountered so hopefully they'll surface themselves soon.

I'm still not ENTIRELY sure this is how I want the sexps to be
structured. I have some concerns about the use of lvars for assignment
vs ^lvars and I'm not sure how they should be distinguished yet.

Suggestions & critique are welcome.

[git-p4: depot-paths = "//src/ruby_parser/dev/": change = 13182]
  • Loading branch information
zenspider committed Aug 30, 2021
1 parent dd83eca commit a55fcfb
Show file tree
Hide file tree
Showing 5 changed files with 915 additions and 4 deletions.
2 changes: 2 additions & 0 deletions lib/ruby_lexer.rb
Expand Up @@ -974,8 +974,10 @@ def process_token text
state = EXPR_END|EXPR_LABEL
end

# TODO: remove
token.lineno = self.lineno # yes, on a string. I know... I know...

# TODO: [tok_id, self.lineno] ?
return result(state, tok_id, token)
end

Expand Down

0 comments on commit a55fcfb

Please sign in to comment.