summaryrefslogtreecommitdiff
path: root/parse.y
AgeCommit message (Collapse)Author
2021-05-22merge revision(s) 110f242ef9b495037f59e4972ee102a8b8b372d5: [Backport #17861]nagachika
Also `\U` after control/meta is invalid [Bug #17861] As well as `\u`, `\U` should be invalid there too. And highlight including `u`/`U` not only the backslash before it. --- parse.y | 12 ++++++++++-- test/ruby/test_parse.rb | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-)
2021-02-02merge revision(s) b091889ed67f278b1652ddde88596e2160d5aef0: [Backport #17582]NARUSE, Yui
Removed YYUSE [Bug #17582] Although it was used just to suppress an "unsed argument" warning in the same manner as other bison-provided functions, it has been dropped since Bision 3.7.5. And we always suppress that warnings. --- parse.y | 1 - 1 file changed, 1 deletion(-)
2021-02-01merge revision(s) ↵NARUSE, Yui
6bcc4664bdaebbf9b28a762ae63f476a1ec6cfb2,bb40c5cbe977de9f36a2a739e94e9b2fd4496b6e,c060bdc2b4ab8eeef5374f4174f5de48ab936d74: [Backport #17541] Return new NODE_LIT As NODE_ZLIST/NODE_LIST are not markable, cannot be reused as NODE_LIT. --- parse.y | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) Ensure symbol list node is either NODE_STR or NODE_DSTR --- parse.y | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) NODE markability should not change by nd_set_type --- node.c | 31 +++++++++++++++++++++++++------ node.h | 12 ++++++++++++ 2 files changed, 37 insertions(+), 6 deletions(-)
2021-02-01merge revision(s) 0036648a420f945624898568bb82bc5f83195d12: [Backport #17533]NARUSE, Yui
Capture to reserved name variables if already defined [Bug #17533] --- parse.y | 5 +++-- test/ruby/test_regexp.rb | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-)
2020-12-24shareable_constant_value: experimental_copyKoichi Sasada
"experimental_everything" makes the assigned value, it means the assignment change the state of assigned value. "experimental_copy" tries to make a deep copy and make copyied object sharable. Notes: Merged: https://github.com/ruby/ruby/pull/3989
2020-12-24Reset paren_nest at tAREF and tASET [Bug #17431]Nobuyoshi Nakada
2020-12-23Ensure non-literal expressions shareable if `leteral`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3950
2020-12-23`begin ... end` is not a literalNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3950
2020-12-23Changed shareable literal semantics [Feature #17397]Nobuyoshi Nakada
When `literal`, check if the literal about to be assigned to a constant is ractor-shareable, otherwise raise `Ractor::Error` at runtime instead of `SyntaxError`. Notes: Merged: https://github.com/ruby/ruby/pull/3950
2020-12-23ripper: fix bad label parameter handling [Bug #17425]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3977
2020-12-20Reduced ID cachesNobuyoshi Nakada
NEW_GASGN and NEW_GVAR evaluate `id` argument twice.
2020-12-18Use category: :experimental in warnings that are related to experimental ↵Jeremy Evans
features This adds rb_category_compile_warn in order to emit compiler warnings with categories. Note that Ripper currently ignores the category for these warnings, but by default it ignores the warnings completely, so this shouldn't matter. Notes: Merged: https://github.com/ruby/ruby/pull/3917
2020-12-19Fixed not to make non-literal expression shareable [Feature #17273]Nobuyoshi Nakada
Non-literal expression which is not a part of a literal expression is not a subject of `shareable_literal_value: literal`.
2020-12-18Drop token info also for endless singleton method definitionNobuyoshi Nakada
2020-12-16Ripper: Pass callback result to alias_error as well as other errorsNobuyoshi Nakada
[Bug #17345]
2020-12-16Ripper: Fixed erred token on wrong alias [Bug #17345]Nobuyoshi Nakada
2020-12-15Ripper: Refined error callbacks [Bug #17345]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3909
2020-12-14Support shareable_constant_value: literalNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3681
2020-12-14Make shareable_constant_value tri-stateNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3681
2020-12-14shareable_constant_value: is effective only in comment-only lineNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3681
2020-12-14Save and pass lex_context wholelyNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3681
2020-12-14Determine shareable-ness after assignment operatorNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3681
2020-12-14Implemented shareable_constant_value op_asgnNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3681
2020-12-14Call FrozenCore.make_shareableNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3681
2020-12-14Implemented shareable_constant_valueNobuyoshi Nakada
It does shallow freeze only for now. Notes: Merged: https://github.com/ruby/ruby/pull/3681
2020-12-14Support shareable_constant_value pragmaNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3681
2020-12-13Reintroduce `expr in pat` [Feature #17371]Kazuki Tsujimoto
2020-12-13Don't emit warning when the pattern of one-line pattern matching is just a ↵Kazuki Tsujimoto
variable pattern https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20201210Japan.md#feature-17371-reintroduce-expr-in-pat-ktsj
2020-11-18fix public interfaceKoichi Sasada
To make some kind of Ractor related extensions, some functions should be exposed. * include/ruby/thread_native.h * rb_native_mutex_* * rb_native_cond_* * include/ruby/ractor.h * RB_OBJ_SHAREABLE_P(obj) * rb_ractor_shareable_p(obj) * rb_ractor_std*() * rb_cRactor and rm ractor_pub.h and rename srcdir/ractor.h to srcdir/ractor_core.h (to avoid conflict with include/ruby/ractor.h) Notes: Merged: https://github.com/ruby/ruby/pull/3775
2020-11-15Use more specific warning for ambiguous slashJeremy Evans
Fixes [Bug #17124] Notes: Merged: https://github.com/ruby/ruby/pull/3767
2020-11-02ripper: Invalid pragma value warningNobuyoshi Nakada
2020-11-02Compare boolean values for parser pragma locale-insensitivelyNobuyoshi Nakada
2020-11-01Change NODE layout for pattern matchingKazuki Tsujimoto
I prefer pconst to be the first element of NODE. Before: | ARYPTN | FNDPTN | HSHPTN ---+--------+--------+----------- u1 | imemo | imemo | pkwargs u2 | pconst | pconst | pconst u3 | apinfo | fpinfo | pkwrestarg After: | ARYPTN | FNDPTN | HSHPTN ---+--------+--------+----------- u1 | pconst | pconst | pconst u2 | imemo | imemo | pkwargs u3 | apinfo | fpinfo | pkwrestarg
2020-11-01Pattern matching is no longer experimentalKazuki Tsujimoto
2020-10-26Allow non-argument endless-def with a space instead of parenthesesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3704
2020-10-26Assoc pattern matching (#3703)Nobuyoshi Nakada
[Feature #17260] One-line pattern matching using tASSOC R-assignment is rejected instead. Notes: Merged-By: nobu <nobu@ruby-lang.org>
2020-10-12Prohibit setter method names in all kinds of endless methodsNobuyoshi Nakada
Also unwrap NODE_RIPPER to check the method name. Notes: Merged: https://github.com/ruby/ruby/pull/3649
2020-10-09Refactored lex_context managementNobuyoshi Nakada
Save and restore `lex_context` as-is wholely, and save in `k_class` and `k_module` to workaround look-ahead reading.
2020-09-30Unfreeze string-literal-only interpolated string-literalNobuyoshi Nakada
[Feature #17104]
2020-09-03Introduce Ractor mechanism for parallel executionKoichi Sasada
This commit introduces Ractor mechanism to run Ruby program in parallel. See doc/ractor.md for more details about Ractor. See ticket [Feature #17100] to see the implementation details and discussions. [Feature #17100] This commit does not complete the implementation. You can find many bugs on using Ractor. Also the specification will be changed so that this feature is experimental. You will see a warning when you make the first Ractor with `Ractor.new`. I hope this feature can help programmers from thread-safety issues. Notes: Merged: https://github.com/ruby/ruby/pull/3365
2020-09-02new_dstr: hoisted out from literal_concat and evstr2dstrNobuyoshi Nakada
2020-08-31Prohibit setter method names in endless method definitionYusuke Endoh
https://bugs.ruby-lang.org/issues/16746#note-26 Notes: Merged: https://github.com/ruby/ruby/pull/3479
2020-08-26Fixed error messages at non-ascii %string terminatorNobuyoshi Nakada
2020-08-26Removed a never-true conditionNobuyoshi Nakada
2020-08-02rb_{ary,fnd}_pattern_info: Remove imemo member to reduce memory usageKazuki Tsujimoto
This is a partial revert commit of 8f096226e1b76f95f4d853d3dea2bc75eeeb5244. NODE layout: Before: | ARYPTN | FNDPTN | HSHPTN ---+--------+--------+----------- u1 | pconst | pconst | pconst u2 | unused | unused | pkwargs u3 | apinfo | fpinfo | pkwrestarg After: | ARYPTN | FNDPTN | HSHPTN ---+--------+--------+----------- u1 | imemo | imemo | pkwargs u2 | pconst | pconst | pconst u3 | apinfo | fpinfo | pkwrestarg
2020-07-27Use a linked list to eliminate imemo tmp bufs for managing local tablesAaron Patterson
This patch changes local table memory to be managed by a linked list rather than via the garbage collector. It reduces allocations from the GC and also fixes a use-after-free bug in the concurrent-with-sweep compactor I'm working on. Notes: Merged: https://github.com/ruby/ruby/pull/3360
2020-07-22Switch reserved for numbered parameter warning to SyntaxErrorJeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/3163
2020-06-25Drop token info for endless method definitionNobuyoshi Nakada
Because it does not have closing `end`.
2020-06-25AST.of needs SCRIPT_LINES__ filled with a newlineNobuyoshi Nakada
2020-06-24[ripper] fix mismatched indentations warning [Bug #16981]Nobuyoshi Nakada
The scanner location has to be set from `lex.ptok` before it is flushed by dispatching the scanner event.