Closed lucaswerkmeister closed 10 years ago
Current plan for ‘switch’ statements:
switch
SwitchCaseElse(SwitchClause, SwitchCases)
SwitchClause(Expression)
SwitchCases([CaseClause+], ElseCaseClause?)
CaseClause(CaseItem, Block)
ElseCaseClause(Block)
CaseItem
MatchCase([<IntegerLiteral|CharacterLiteral|StringLiteral|NegationOperation|BaseExpression>+])
NegationOperation
IntegerLiteral
IsCase(Type)
Current plan for ‘
switch
’ statements:SwitchCaseElse(SwitchClause, SwitchCases)
SwitchClause(Expression)
SwitchCases([CaseClause+], ElseCaseClause?)
CaseClause(CaseItem, Block)
ElseCaseClause(Block)
CaseItem
MatchCase([<IntegerLiteral|CharacterLiteral|StringLiteral|NegationOperation|BaseExpression>+])
(with an assertion that the operand of theNegationOperation
is anIntegerLiteral
)IsCase(Type)