| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2024-05-21 | ripper: Extend to represent array access and splat | Nobuyoshi Nakada | |
| 2024-05-21 | ripper: Allow parenthesized comma in options | Nobuyoshi Nakada | |
| 2024-05-21 | ripper: Preserve indentation | Nobuyoshi Nakada | |
| 2024-05-21 | ripper: Remove rb_ripper_none | Nobuyoshi Nakada | |
| Now it is used only for wheter `opt_paren_args` is `none`. Introduce a new special node to distinguish an empty parentheses from it . | |||
| 2024-05-21 | ripper: Short hand for `rb_ary_new_from_args` | Nobuyoshi Nakada | |
| 2024-05-21 | ripper: Make `$:n` to refer each grammar values | Nobuyoshi Nakada | |
| Ripper DSL uses these values for callbacks, but does not need indexes. | |||
| 2024-04-29 | ripper: Move DSL line pattern | Nobuyoshi Nakada | |
| 2024-03-14 | Ensure test suite is compatible with --frozen-string-literal | Jean Boussier | |
| As preparation for https://bugs.ruby-lang.org/issues/20205 making sure the test suite is compatible with frozen string literals is making things easier. | |||
| 2024-02-20 | [Feature #20257] Rearchitect Ripper | yui-knk | |
| Introduce another semantic value stack for Ripper so that Ripper can manage both Node and Ruby Object separately. This rearchitectutre of Ripper solves these issues. Therefore adding test cases for them. * [Bug 10436] https://bugs.ruby-lang.org/issues/10436 * [Bug 18988] https://bugs.ruby-lang.org/issues/18988 * [Bug 20055] https://bugs.ruby-lang.org/issues/20055 Checked the differences of `Ripper.sexp` for files under `/test/ruby` are only on test_pattern_matching.rb. The differences comes from the differences between `new_hash_pattern_tail` functions between parser and Ripper. Ripper `new_hash_pattern_tail` didn’t call `assignable` then `kw_rest_arg` wasn’t marked as local variable. This is also fixed by this commit. ``` --- a/./tmp/before/test_pattern_matching.rb +++ b/./tmp/after/test_pattern_matching.rb @@ -3607,7 +3607,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “a”, [984, 13]]]], [[:binary, - [:vcall, [:@ident, “a”, [985, 10]]], + [:var_ref, [:@ident, “a”, [985, 10]]], :==, [:hash, nil]]], nil]]], @@ -3662,7 +3662,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “a”, [993, 13]]]], [[:binary, - [:vcall, [:@ident, “a”, [994, 10]]], + [:var_ref, [:@ident, “a”, [994, 10]]], :==, [:hash, [:assoclist_from_args, @@ -3813,7 +3813,7 @@ [:command, [:@ident, “raise”, [1022, 10]], [:args_add_block, - [[:vcall, [:@ident, “b”, [1022, 16]]]], + [[:var_ref, [:@ident, “b”, [1022, 16]]]], false]]], [:else, [[:var_ref, [:@kw, “true”, [1024, 10]]]]]]]], nil, @@ -3876,7 +3876,7 @@ [:@int, “0”, [1033, 15]]], :“&&“, [:binary, - [:vcall, [:@ident, “b”, [1033, 20]]], + [:var_ref, [:@ident, “b”, [1033, 20]]], :==, [:hash, nil]]]], nil]]], @@ -3946,7 +3946,7 @@ [:@int, “0”, [1042, 15]]], :“&&“, [:binary, - [:vcall, [:@ident, “b”, [1042, 20]]], + [:var_ref, [:@ident, “b”, [1042, 20]]], :==, [:hash, [:assoclist_from_args, @@ -5206,7 +5206,7 @@ [[:assoc_new, [:@label, “c:“, [1352, 22]], [:@int, “0”, [1352, 25]]]]]], - [:vcall, [:@ident, “r”, [1352, 29]]]], + [:var_ref, [:@ident, “r”, [1352, 29]]]], false]]], [:binary, [:call, @@ -5299,7 +5299,7 @@ [:assoc_new, [:@label, “c:“, [1367, 34]], [:@int, “0”, [1367, 37]]]]]], - [:vcall, [:@ident, “r”, [1367, 41]]]], + [:var_ref, [:@ident, “r”, [1367, 41]]]], false]]], [:binary, [:call, @@ -5931,7 +5931,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “r”, [1533, 11]]]], [[:binary, - [:vcall, [:@ident, “r”, [1534, 8]]], + [:var_ref, [:@ident, “r”, [1534, 8]]], :==, [:hash, [:assoclist_from_args, ``` | |||
| 2024-01-30 | [DOC] Fix Ripper DSL input example | yui-knk | |
| '!' suffix is needed for event dispatch. | |||
| 2023-10-10 | ripper: Support member references in the DSL | Nobuyoshi Nakada | |
| 2023-09-25 | ripper: Support named references in the DSL | Nobuyoshi Nakada | |
| 2020-05-29 | Allow references to $$ in Ripper DSL | Nobuyoshi Nakada | |
| 2019-11-26 | Allow `$10` and more in the Ripper DSL | Nobuyoshi Nakada | |
| 2019-11-07 | Suppress unused variable warning | Nobuyoshi Nakada | |
| 2019-10-19 | Extend Ripper DSL to set to pseudo variables other than `$$` | Nobuyoshi Nakada | |
| 2019-04-17 | Introduce pattern matching [EXPERIMENTAL] | ktsj | |
| [ruby-core:87945] [Feature #14912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-20 | ext/ripper/tools/dsl.rb: Use String#sub instead of delete_suffix | mame | |
| It fails when baseruby is old. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-20 | parse.y: Remove double meaning of new_qcall/new_command_qcall | mame | |
| git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-20 | ext/ripper/tools/dsl.rb: Serialize dispatch calls | mame | |
| To avoid the unspecified behavior (the evaluation order of arguments). In `$$ = foo(bar(), baz());`, it is unspecified which `bar` or `baz` is called earlier. This commit changes the code to `v1=bar(); v2=baz(); $$ = foo();`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-20 | parse.y: Remove unneeded var_field_1 trick | mame | |
| I thought this trick was needed because the result of var_field was passed to different arguments, as follows: ``` $1 = var_field(p, $1); $$ = backref_assign_error(p, $1, $1, &@$); ``` Currently the DSL supports that one result is passed to one argument. However, after the refactoring, I found that `backref_assign_error` uses only one `$1`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-20 | dsl.rb: p | nobu | |
| * ext/ripper/tools/dsl.rb (DSL#initialize): define `p` for `struct parser_params *p`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-20 | dsl.rb: ID constants | nobu | |
| * ext/ripper/tools/dsl.rb (DSL#method_missing): expand ID constnats without parentheses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-20 | dsl.rb: const_missing | nobu | |
| * ext/ripper/tools/dsl.rb (DSL.const_missing): define to expand Qnil and Qundef as-is. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-20 | dsl.rb: indent | nobu | |
| * ext/ripper/tools/dsl.rb (DSL#generate): indent after surrounding by braces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-19 | parse.y: Remove double meaning of backref_assign_error | mame | |
| git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-19 | parse.y: Remove unneeded type decls for Ripper | mame | |
| I think that they are not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-19 | parse.y: swap `foo!` and `foo` in Ripper DSL | mame | |
| `foo!(...)` means Ripper event, and `foo(...)` means C function/macro call. This is for fail-safe; if I forget `!` accidentally, it would fail to compile, instead of wrongly adding a new Ripper event. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-19 | parse.y: Allows Ripper DSL to embed C function calls as `foo!` | mame | |
| Instead of `_foo`. This makes it useful to do word boundary search of the editor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
| 2018-01-19 | ext/ripper: Introduce a simple DSL for ripper.y code generation | mame | |
| Currently, parse.y actions are hard to read and write because the code has double meaning (for core parser and for ripper). I think that, if it is easy to write ripper's code shortly and simply, the double meaning trick is not needed. For the sake, this change adds a simple DSL for ripper's code. For example, in parse.y, we can write: /*% ripper: stmts_add(stmts_new, void_stmt) %*/ instead of: $$ = dispatch2(stmts_add, dispatch0(stmts_new), dispatch0(void_stmt)); git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
