diff --git a/doc/AST_FORMAT.md b/doc/AST_FORMAT.md index 16f52f4d4..b53f582e2 100644 --- a/doc/AST_FORMAT.md +++ b/doc/AST_FORMAT.md @@ -1145,6 +1145,17 @@ Format: ~~~~~ expression ~~~ +### Block nil argument (Prism only) + +Format: + +~~~ +(blocknilarg) +"&nil" + ~~~ name + ~~~~ expression +~~~ + ### Objective-C arguments MacRuby includes a few more syntactic "arguments" whose name becomes diff --git a/lib/parser/meta.rb b/lib/parser/meta.rb index fcbaff167..b7ed0ece2 100644 --- a/lib/parser/meta.rb +++ b/lib/parser/meta.rb @@ -7,7 +7,7 @@ module Meta # These are node types required by `Prism::Translation::Parser`, # which has advanced syntax support ahead of the Parser gem. PRISM_TRANSLATION_PARSER_NODE_TYPES = %i( - itarg itblock + itarg itblock blocknilarg ).freeze private_constant :PRISM_TRANSLATION_PARSER_NODE_TYPES