mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Add ifelseexp
This commit is contained in:
parent
c04dfbf016
commit
219ab146b1
1 changed files with 2 additions and 1 deletions
|
@ -33,10 +33,11 @@ binding ::= Name [`:' typeannotation]
|
|||
bindinglist ::= (binding | `...') [`,' bindinglist]
|
||||
|
||||
subexpr ::= (asexp | unop subexpr) { binop subexpr }
|
||||
ifelseexp ::= if exp then exp {elseif exp then exp} else exp
|
||||
prefixexp ::= NAME | '(' expr ')'
|
||||
primaryexp ::= prefixexp { `.' NAME | `[' exp `]' | `:' NAME funcargs | funcargs }
|
||||
asexp ::= simpleexp [`::' typeannotation]
|
||||
simpleexp ::= NUMBER | STRING | NIL | true | false | ... | constructor | FUNCTION body | primaryexp
|
||||
simpleexp ::= NUMBER | STRING | NIL | true | false | ... | constructor | FUNCTION body | primaryexp | ifelseexp
|
||||
funcargs ::= `(' [explist] `)' | tableconstructor | String
|
||||
|
||||
compoundop :: `+=' | `-=' | `*=' | `/=' | `%=' | `^=' | `..='
|
||||
|
|
Loading…
Add table
Reference in a new issue