Skip to content
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

Change parser to 3.0 #2148

Merged
merged 2 commits into from
Dec 31, 2020
Merged

Change parser to 3.0 #2148

merged 2 commits into from
Dec 31, 2020

Conversation

hmdne
Copy link
Member

@hmdne hmdne commented Dec 31, 2020

This is rather an experimental branch to try implementing some Ruby 3.0 features with Opal.

@hmdne
Copy link
Member Author

hmdne commented Dec 31, 2020

Wow, oneline methods worked just out-of-the-box

[user@localhost opal]# bundle exec opal -c <<< "def test_oneline_methods = 6" | grep -C4 test_oneline_methods
Failed to load WithCLexer, using pure Ruby lexer
})(Opal);

/* Generated by Opal 1.0.0 */
(function(Opal) {
  var $test_oneline_methods$1, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$, $$ = Opal.$$;

  return (Opal.def(self, '$test_oneline_methods', $test_oneline_methods$1 = function $$test_oneline_methods() {
    var self = this;

    return 6
  }, $test_oneline_methods$1.$$arity = 0), nil) && 'test_oneline_methods'
})(Opal);

/* Generated by Opal 1.0.0 */
(function(Opal) {
[user@localhost opal]# 

@elia
Copy link
Member

elia commented Dec 31, 2020

@iliabylich FYI we temporarily disabling c_lexer from the Gemfile, in order to update to parser v3, I'll try to update it later and reintroduce it once it's updated.

@elia elia merged commit 0e5452b into opal:master Dec 31, 2020
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.

None yet

2 participants