Use bindinglist for local declaration and for loop

This commit is contained in:
JohnnyMorganz 2021-12-02 11:19:03 +00:00
parent 033e7a743b
commit d281267ed5

View file

@ -15,10 +15,10 @@ stat ::= varlist `=' explist |
repeat block until exp | repeat block until exp |
if exp then block {elseif exp then block} [else block] end | if exp then block {elseif exp then block} [else block] end |
for binding `=' exp `,' exp [`,' exp] do block end | for binding `=' exp `,' exp [`,' exp] do block end |
for namelist in explist do block end | for bindinglist in explist do block end |
function funcname funcbody | function funcname funcbody |
local function Name funcbody | local function Name funcbody |
local namelist [`=' explist] | local bindinglist [`=' explist] |
[export] type Name [`<' GenericTypeList `>'] `=' typeannotation [export] type Name [`<' GenericTypeList `>'] `=' typeannotation
laststat ::= return [explist] | break | continue laststat ::= return [explist] | break | continue