Actions
Feature #17398
closedSyntaxError in endless method
Feature #17398:
SyntaxError in endless method
Status:
Closed
Assignee:
-
Target version:
-
Description
Files
Added by zverok (Victor Shepelev) almost 6 years ago. Updated about 1 year ago.
Description
Files
| allow-command-style-endless-method-def.patch (3.44 KB) allow-command-style-endless-method-def.patch | mame (Yusuke Endoh), 04/19/2021 05:05 AM |
The body of an endless method must be an expression (called "arg" in the syntax rules of parse.y). puts("bar") is an expression, but puts "bar" is a statement (called "command" in the syntax rules).
I think it could be a bit confusing, but I have no idea whether we can/should allow a statement as a body of an endless method.