-
-
Notifications
You must be signed in to change notification settings - Fork 925
Comparing changes
Open a pull request
base repository: jruby/jruby
base: f7f31b427bdc
head repository: jruby/jruby
compare: 0a4be2d255e8
- 14 commits
- 17 files changed
- 2 contributors
Commits on Dec 16, 2017
-
Update the MRI ripper spec excludes
First, this ignores the entire file that relies on the MRI file structure, as it seems unlikely that any of those tests will ever be applicable. Second, it adds the test_sexp.rb file which was absent from the index for some unknown reason. It also introduces a couple of excludes for failing tests in that file. Third, it clears the excludes for a couple of tests that are currently passing, and updates the description for one of the excludes.
Configuration menu - View commit details
-
Copy full SHA for 7ecf6ee - Browse repository at this point
Copy the full SHA 7ecf6eeView commit details -
Return false on tokadd_mbchar failure
Otherwise, an invalid byte sequence inside an identifier causes Ripper to continuously parse the same invalid byte sequence over and over.
Configuration menu - View commit details
-
Copy full SHA for 62462ec - Browse repository at this point
Copy the full SHA 62462ecView commit details -
Call tokadd_mbchar from tokenAddMBC
They are identical (after fixing tokadd_mbchar)
Configuration menu - View commit details
-
Copy full SHA for 32d2c20 - Browse repository at this point
Copy the full SHA 32d2c20View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdc6d11 - Browse repository at this point
Copy the full SHA bdc6d11View commit details -
Use current scope in is_id_var
Otherwise, it doesn't recognize variables introduced in the block (parameters), resulting in vcall nodes instead of var_ref
Configuration menu - View commit details
-
Copy full SHA for 4a1b16d - Browse repository at this point
Copy the full SHA 4a1b16dView commit details -
Rework Ripper scope variable analysis
The previous implementation called assignable on a bunch of things that were unlikely to be strings, while only supporting string arguments. This changes the logic so that it relies on getting the identifier value from the lexer instead. In addition, this inlines the logic from assignable in all cases where the implementation is known, and splits the cases for identifiers and constants, as they have very little to do with each other. Given that the parser has inlined the definition of MRI's user_varaible and keyword variable, it seems to make sense to also inline the assignable actions. While inlining the assignable implementation, it seamed to make sense to also inline is_id_var (and remove its unused argument).
Configuration menu - View commit details
-
Copy full SHA for 5cbaac8 - Browse repository at this point
Copy the full SHA 5cbaac8View commit details -
Align Ripper parser with main Ruby parser
Not 100% sure about the impact of this, but it seems unlikely that having two separate Ruby grammars for Ripper and the main parser would be a good thing.
Configuration menu - View commit details
-
Copy full SHA for 1763e4e - Browse repository at this point
Copy the full SHA 1763e4eView commit details -
Add command-args-state begin to Ripper
The corresponding construct was in the main parser, and allowed it correctly parse "m x do; end", where Ripper would fail and assign the block to x rather than m.
Configuration menu - View commit details
-
Copy full SHA for c0cfb5f - Browse repository at this point
Copy the full SHA c0cfb5fView commit details -
Reset the cmd-args-state from Ripper push-local-scope
It seems like MRI is doing this.
Configuration menu - View commit details
-
Copy full SHA for 5bd4137 - Browse repository at this point
Copy the full SHA 5bd4137View commit details -
Clear command-args-state in brace blocks
It might not be important, but MRI seems to do this.
Configuration menu - View commit details
-
Copy full SHA for 56e54a7 - Browse repository at this point
Copy the full SHA 56e54a7View commit details -
Rework handling of heredoc end
Instead of ending the heredoc before emitting the final string content part, this instead just emits the final string content part and positions the cursor right before the end marker, such that the next call to the heredoc term should end the heredoc using the early return. The motivation for doing this was that with ripper the final string content of a heredoc wouldn't be dispatched to any token handler, but instead just propagated. The old behavior was clearly wrong for this corner-case, but this approach might have other problems.
Configuration menu - View commit details
-
Copy full SHA for f1234e8 - Browse repository at this point
Copy the full SHA f1234e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for b702e52 - Browse repository at this point
Copy the full SHA b702e52View commit details -
Dispatch on_magic_comment for Ripper
As an added bonus, the parsing of magic comment key values no longer stops at the first unrecognized key, and thus writing # -*- warn_past_scope: true; coding: ISO-8859-1 -*- will now apply the encoding even if JRuby doesn't support the magic comment attribute warn_past_scope.
Configuration menu - View commit details
-
Copy full SHA for d0f5e04 - Browse repository at this point
Copy the full SHA d0f5e04View commit details -
Merge pull request #4898 from grddev/ripper-fixes
Improve compatibility with MRI's Ripper
Configuration menu - View commit details
-
Copy full SHA for 0a4be2d - Browse repository at this point
Copy the full SHA 0a4be2dView commit details
There are no files selected for viewing