| Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13114
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13113
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13111
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13110
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13109
|
|
Change the indent to match the characters used in other generation rules. This makes it easier to find lhs.
Notes:
Merged: https://github.com/ruby/ruby/pull/13082
|
|
heredoc (#13000)
Notes:
Merged-By: tompng <tomoyapenguin@gmail.com>
|
|
This PR just fixing indentation.
Notes:
Merged: https://github.com/ruby/ruby/pull/13010
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12925
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12946
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12932
|
|
inline rules
Notes:
Merged: https://github.com/ruby/ruby/pull/12929
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12928
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12888
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12886
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12883
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e "class A < B; end"
@ ProgramNode (location: (1,0)-(1,16))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,16))
+-- body: (length: 1)
+-- @ ClassNode (location: (1,0)-(1,16))
+-- locals: []
+-- class_keyword_loc: (1,0)-(1,5) = "class"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- constant_path:
| @ ConstantReadNode (location: (1,6)-(1,7))
| +-- name: :A
+-- inheritance_operator_loc: (1,8)-(1,9) = "<"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- superclass:
| @ ConstantReadNode (location: (1,10)-(1,11))
| +-- name: :B
+-- body: nil
+-- end_keyword_loc: (1,13)-(1,16) = "end"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- name: :A
```
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e "END { }"
@ ProgramNode (location: (1,0)-(1,8))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,8))
+-- body: (length: 1)
+-- @ PostExecutionNode (location: (1,0)-(1,8))
+-- statements: nil
+-- keyword_loc: (1,0)-(1,3) = "END"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- opening_loc: (1,4)-(1,5) = "{"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- closing_loc: (1,7)-(1,8) = "}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12836
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12835
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12800
|
|
It was defined in `arg` only; moved that pattern to `op_asgn` rule to
share it with `command_asgn`.
|
|
NODE_LINE and NODE_ENCODING cases are used SWITCH_BY_COND_TYPE macro that is same to NODE_INTEGER and other cases.
NODE_LINE and NODE_ENCODING cases can be marge to NODE_INTEGER and other node cases.
Notes:
Merged: https://github.com/ruby/ruby/pull/12794
|
|
Local variables are not reassigned and are not needed.
Notes:
Merged: https://github.com/ruby/ruby/pull/12054
|
|
Local variables are not reassigned and are not needed.
Notes:
Merged: https://github.com/ruby/ruby/pull/12054
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12539
|
|
|
|
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e "for a in b do end"
@ ProgramNode (location: (1,0)-(1,17))
+-- locals: [:a]
+-- statements:
@ StatementsNode (location: (1,0)-(1,17))
+-- body: (length: 1)
+-- @ ForNode (location: (1,0)-(1,17))
+-- index:
| @ LocalVariableTargetNode (location: (1,4)-(1,5))
| +-- name: :a
| +-- depth: 0
+-- collection:
| @ CallNode (location: (1,9)-(1,10))
| +-- CallNodeFlags: variable_call, ignore_visibility
| +-- receiver: nil
| +-- call_operator_loc: nil
| +-- name: :b
| +-- message_loc: (1,9)-(1,10) = "b"
| +-- opening_loc: nil
| +-- arguments: nil
| +-- closing_loc: nil
| +-- block: nil
+-- statements: nil
+-- for_keyword_loc: (1,0)-(1,3) = "for"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- in_keyword_loc: (1,6)-(1,8) = "in"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- do_keyword_loc: (1,11)-(1,13) = "do"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- end_keyword_loc: (1,14)-(1,17) = "end"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11780
|
|
If you don’t specify an action for a rule, Lrama supplies a default: `$$ = $1`.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12488
|
|
Parsing `-> do it end` in parse.y leaks memory. We can see this in the
Valgrind output:
56 bytes in 1 blocks are definitely lost in loss record 1 of 6
at 0x484E0DC: calloc (vg_replace_malloc.c:1675)
by 0x188970: calloc1 (default.c:1472)
by 0x188970: rb_gc_impl_calloc (default.c:8208)
by 0x188970: ruby_xcalloc_body (gc.c:4598)
by 0x18B8BC: ruby_xcalloc (gc.c:4592)
by 0x21DCCA70: new_locations_lambda_body (ripper.y:12844)
by 0x21DCCA70: ripper_yyparse (ripper.y:5194)
by 0x21DDA521: rb_ruby_ripper_parse0 (ripper.y:15798)
Notes:
Merged: https://github.com/ruby/ruby/pull/12508
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12508
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11986
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11986
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11652
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12494
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12494
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12494
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11889
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11889
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11889
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11674
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e '/foo/'
@ ProgramNode (location: (1,0)-(1,5))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,5))
+-- body: (length: 1)
+-- @ RegularExpressionNode (location: (1,0)-(1,5))
+-- RegularExpressionFlags: forced_us_ascii_encoding
+-- opening_loc: (1,0)-(1,1) = "/"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- content_loc: (1,1)-(1,4) = "foo"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- closing_loc: (1,4)-(1,5) = "/"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- unescaped: "foo"
```
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e "-> (a, b) do foo end"
@ ProgramNode (location: (1,0)-(1,20))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,20))
+-- body: (length: 1)
+-- @ LambdaNode (location: (1,0)-(1,20))
+-- locals: [:a, :b]
+-- operator_loc: (1,0)-(1,2) = "->"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- opening_loc: (1,10)-(1,12) = "do"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- closing_loc: (1,17)-(1,20) = "end"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: (snip)
```
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e 'def foo; yield end'
@ ProgramNode (location: (1,0)-(1,18))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,18))
+-- body: (length: 1)
+-- @ DefNode (location: (1,0)-(1,18))
+-- name: :foo
+-- name_loc: (1,4)-(1,7) = "foo"
+-- receiver: nil
+-- parameters: nil
+-- body:
| @ StatementsNode (location: (1,9)-(1,14))
| +-- body: (length: 1)
| +-- @ YieldNode (location: (1,9)-(1,14))
| +-- keyword_loc: (1,9)-(1,14) = "yield"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| +-- lparen_loc: nil
^^^^^^^^^^^^^^^^^^^
| +-- arguments: nil
| +-- rparen_loc: nil
^^^^^^^^^^^^^^^^^^^
+-- locals: []
+-- def_keyword_loc: (1,0)-(1,3) = "def"
+-- operator_loc: nil
+-- lparen_loc: nil
+-- rparen_loc: nil
+-- equal_loc: nil
+-- end_keyword_loc: (1,15)-(1,18) = "end"
```
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e '"#{foo}"'
@ ProgramNode (location: (1,0)-(1,8))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,8))
+-- body: (length: 1)
+-- @ InterpolatedStringNode (location: (1,0)-(1,8))
+-- InterpolatedStringNodeFlags: nil
+-- opening_loc: (1,0)-(1,1) = "\""
+-- parts: (length: 1)
| +-- @ EmbeddedStatementsNode (location: (1,1)-(1,7))
| +-- opening_loc: (1,1)-(1,3) = "\#{"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| +-- statements:
| | @ StatementsNode (location: (1,3)-(1,6))
| | +-- body: (length: 1)
| | +-- @ CallNode (location: (1,3)-(1,6))
| | +-- CallNodeFlags: variable_call, ignore_visibility
| | +-- receiver: nil
| | +-- call_operator_loc: nil
| | +-- name: :foo
| | +-- message_loc: (1,3)-(1,6) = "foo"
| | +-- opening_loc: nil
| | +-- arguments: nil
| | +-- closing_loc: nil
| | +-- block: nil
| +-- closing_loc: (1,6)-(1,7) = "}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- closing_loc: (1,7)-(1,8) = "\""
```
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11712
|
|
`ident_or_const` inline rules
Notes:
Merged: https://github.com/ruby/ruby/pull/11782
|