Closed
Description
With this code:
MyClass.call 1 do
if true
# ...
end
end
Output from stree ast
:
(program (statements ((command_call (var_ref (const "MyClass")) (period ".") (ident "call") (args ((int "1")))))))
With the 1
in parentheses the output is as expected:
(program
(statements
((method_add_block
(call (var_ref (const "MyClass")) (period ".") (ident "call") (arg_paren (args ((int "1")))))
(block (bodystmt (statements ((if (var_ref (kw "true")) (statements ((void_stmt), (comment "# ..."))))))))))))
syntax_tree 6.0.0
Original context: Shopify/ruby-lsp#515
Metadata
Metadata
Assignees
Labels
No labels