@@ -50,43 +50,6 @@ The supported dump items:
5050 # (null node)
5151 ` ` `
5252
53- - ` parsetree_with_comment` : AST with comments:
54-
55- ` ` ` console
56- $ ruby --dump=parsetree_with_comment t.rb
57- # ##########################################################
58- # # Do NOT use this node dump for any purpose other than ##
59- # # debug and research. Compatibility is not guaranteed. ##
60- # ##########################################################
61-
62- # @ NODE_SCOPE (line: 1, location: (1,0)-(1,10))
63- # | # new scope
64- # | # format: [nd_tbl]: local table, [nd_args]: arguments, [nd_body]: body
65- # +- nd_tbl (local table): (empty)
66- # +- nd_args (arguments):
67- # | (null node)
68- # +- nd_body (body):
69- # @ NODE_FCALL (line: 1, location: (1,0)-(1,10))*
70- # | # function call
71- # | # format: [nd_mid]([nd_args])
72- # | # example: foo(1)
73- # +- nd_mid (method id): :puts
74- # +- nd_args (arguments):
75- # @ NODE_LIST (line: 1, location: (1,5)-(1,10))
76- # | # list constructor
77- # | # format: [ [nd_head], [nd_next].. ] (length: [nd_alen])
78- # | # example: [1, 2, 3]
79- # +- nd_alen (length): 1
80- # +- nd_head (element):
81- # | @ NODE_STR (line: 1, location: (1,5)-(1,10))
82- # | | # string literal
83- # | | # format: [nd_lit]
84- # | | # example: 'foo'
85- # | +- nd_lit (literal): "Foo"
86- # +- nd_next (next element):
87- # (null node)
88- ` ` `
89-
9053- ` yydebug` : Debugging information from yacc parser generator:
9154
9255 ```
@@ -295,3 +258,8 @@ The supported dump items:
295258 Cleanup: popping nterm program (1.0-1.10: )
296259 ```
297260
261+ Additional flags can follow dump items.
262+
263+ - ` +comment` : Add comments to AST.
264+ - ` +error-tolerant` : Parse in error-tolerant mode.
265+ - ` -optimize` : Disable optimizations for instruction sequences.
0 commit comments