forked from nathansobo/treetop
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Generated Ruby code contains invalid synthax in Ruby 3.0 #49
Comments
Rename |
Thanks @cjheath that worked! |
Not an issue in the library |
andsel
added a commit
to andsel/logstash
that referenced
this issue
Jan 30, 2023
With Ruby 2.7 was deprecated the usage of `_1` (`_<n>`) identifier for future reseved usage. With Ruby 3.0 the new synthax for "numbered parameters" was used, avoiding the usage of `_n` as method names. Treetop's generated grammar contained `def _n` methods, mainly implied to the usage of `_` symbol in LSCL grammar. This commit rename the `_` rule in the grammar to `cs` and replaces everywhere it's needed. Explanation at cjheath/treetop#49
andsel
added a commit
to andsel/logstash
that referenced
this issue
Feb 23, 2023
With Ruby 2.7 was deprecated the usage of `_1` (`_<n>`) identifier for future reseved usage. With Ruby 3.0 the new synthax for "numbered parameters" was used, avoiding the usage of `_n` as method names. Treetop's generated grammar contained `def _n` methods, mainly implied to the usage of `_` symbol in LSCL grammar. This commit rename the `_` rule in the grammar to `cs` and replaces everywhere it's needed. Explanation at cjheath/treetop#49
andsel
added a commit
to andsel/logstash
that referenced
this issue
Mar 23, 2023
With Ruby 2.7 was deprecated the usage of `_1` (`_<n>`) identifier for future reseved usage. With Ruby 3.0 the new synthax for "numbered parameters" was used, avoiding the usage of `_n` as method names. Treetop's generated grammar contained `def _n` methods, mainly implied to the usage of `_` symbol in LSCL grammar. This commit rename the `_` rule in the grammar to `cs` and replaces everywhere it's needed. Explanation at cjheath/treetop#49
andsel
added a commit
to andsel/logstash
that referenced
this issue
Apr 12, 2023
With Ruby 2.7 was deprecated the usage of `_1` (`_<n>`) identifier for future reseved usage. With Ruby 3.0 the new synthax for "numbered parameters" was used, avoiding the usage of `_n` as method names. Treetop's generated grammar contained `def _n` methods, mainly implied to the usage of `_` symbol in LSCL grammar. This commit rename the `_` rule in the grammar to `cs` and replaces everywhere it's needed. Explanation at cjheath/treetop#49
andsel
added a commit
to andsel/logstash
that referenced
this issue
May 31, 2023
With Ruby 2.7 was deprecated the usage of `_1` (`_<n>`) identifier for future reseved usage. With Ruby 3.0 the new synthax for "numbered parameters" was used, avoiding the usage of `_n` as method names. Treetop's generated grammar contained `def _n` methods, mainly implied to the usage of `_` symbol in LSCL grammar. This commit rename the `_` rule in the grammar to `cs` and replaces everywhere it's needed. Explanation at cjheath/treetop#49
andsel
added a commit
to andsel/logstash
that referenced
this issue
Jun 15, 2023
With Ruby 2.7 was deprecated the usage of `_1` (`_<n>`) identifier for future reseved usage. With Ruby 3.0 the new synthax for "numbered parameters" was used, avoiding the usage of `_n` as method names. Treetop's generated grammar contained `def _n` methods, mainly implied to the usage of `_` symbol in LSCL grammar. This commit rename the `_` rule in the grammar to `cs` and replaces everywhere it's needed. Explanation at cjheath/treetop#49
andsel
added a commit
to andsel/logstash
that referenced
this issue
Jun 26, 2023
With Ruby 2.7 was deprecated the usage of `_1` (`_<n>`) identifier for future reseved usage. With Ruby 3.0 the new synthax for "numbered parameters" was used, avoiding the usage of `_n` as method names. Treetop's generated grammar contained `def _n` methods, mainly implied to the usage of `_` symbol in LSCL grammar. This commit rename the `_` rule in the grammar to `cs` and replaces everywhere it's needed. Explanation at cjheath/treetop#49
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the following grammar:
my_grammar.treetop
and compiling with
Generates
my_grammar.rb
which contains method named_1
which is not anymore valid syntax in Ruby 3.0, was deprecated since Ruby 2.7Usage of methods named with
_
, which now represents "numbered parameters" generates an error like:The text was updated successfully, but these errors were encountered: