-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does it need parentheses for some built in functions but not for others? #111
Comments
This is indeed a bug. I've marked this ticket as such.
User-created functions ("subroutines") require parenthesis so we can adequately figure out how to lex and parse them. Subroutine prototypes allow the user to give the perl lexer additional parsing rules so it can avoid parenthesis but that makes it very difficult to statically parse because you need to go into compilation mode to introduce these new prototypes and understand them. This is why Guacamole doesn't support subroutine prototypes and requires all subroutines (user-provided functions) to include parenthesis. |
|
* GH #23: (VERY) Preliminary support for extending the grammar. * GH #111: Support "die". * GH #112: Support "readline STDIN" or "readline(STDIN)". * GH #113: Support "$#_" (but not "$# _"). * GH #114: Support all forms of binmode() (Val @valcomm). * GH #115: Support all forms of for() loop (Val @valcomm). * RT #132920: Fix confusion of quote-like operators by comments. * Support "_" in file operations ("-x _", etc.). * Support "$foo->$bar" and "$foo->$_". * Support 'eval "..."' or 'eval $foo'. * Improve wording on top-level anonymous hashes. * When failing without an exception, we throw an exception with more information (e.g., "print _").
maybe i just don't understand Perl but why is
print;
okay but notdie;
. i need to usedie();
for it not to complain.Also
print 'example'
is okay even though "All subroutines must use parentheses".The text was updated successfully, but these errors were encountered: