mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Comment that bindinglist is equiv. to namelist
This commit is contained in:
parent
d206fe408e
commit
a8a08d8390
1 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ toc: true
|
||||||
This is the complete syntax grammar for Luau in EBNF. More information about the terminal nodes String and Number
|
This is the complete syntax grammar for Luau in EBNF. More information about the terminal nodes String and Number
|
||||||
is available in the [syntax section](syntax).
|
is available in the [syntax section](syntax).
|
||||||
|
|
||||||
```
|
```ebnf
|
||||||
chunk ::= {stat [`;']} [laststat [`;']]
|
chunk ::= {stat [`;']} [laststat [`;']]
|
||||||
block ::= chunk
|
block ::= chunk
|
||||||
stat ::= varlist `=' explist |
|
stat ::= varlist `=' explist |
|
||||||
|
@ -34,7 +34,7 @@ explist ::= {exp `,'} exp
|
||||||
namelist ::= NAME {`,' NAME}
|
namelist ::= NAME {`,' NAME}
|
||||||
|
|
||||||
binding ::= NAME [`:' TypeAnnotation]
|
binding ::= NAME [`:' TypeAnnotation]
|
||||||
bindinglist ::= binding [`,' bindinglist]
|
bindinglist ::= binding [`,' bindinglist] (* equivalent of Lua 5.1 `namelist`, except with optional type annotations *)
|
||||||
|
|
||||||
var ::= NAME | prefixexp `[' exp `]' | prefixexp `.' Name
|
var ::= NAME | prefixexp `[' exp `]' | prefixexp `.' Name
|
||||||
varlist ::= var {`,' var}
|
varlist ::= var {`,' var}
|
||||||
|
@ -58,7 +58,7 @@ unop ::= `-' | not | `#'
|
||||||
|
|
||||||
SimpleType ::=
|
SimpleType ::=
|
||||||
nil |
|
nil |
|
||||||
NAME[`.' NAME] [ `<' Type {`,' Type} `>' ] |
|
NAME[`.' NAME] [ `<' TypeList `>' ] |
|
||||||
`typeof' `(' exp `)' |
|
`typeof' `(' exp `)' |
|
||||||
TableType |
|
TableType |
|
||||||
FunctionType
|
FunctionType
|
||||||
|
|
Loading…
Add table
Reference in a new issue