This proposal outlines the proposed print statement.
Overview
print as an unary operator results in odd an unexpected behavior. This is often undesired and also requires unnecessary parenthesis around ternaries:
Definition
This will define print in two places:
tokenizer/states/print.es6
interpreter/states/print.es6
as StatementPrint. The code is exactly the same as the operator print
Formal Grammar
EBNF
@ = "print", [(newline | expression)]
This proposal outlines the proposed
printstatement.Overview
printas an unary operator results in odd an unexpected behavior. This is often undesired and also requires unnecessary parenthesis around ternaries:Definition
This will define
printin two places:tokenizer/states/print.es6interpreter/states/print.es6as
StatementPrint. The code is exactly the same as the operatorprintFormal Grammar
EBNF