3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-02 17:40:09 +01:00

Small modifications for better visitors

Dieser Commit ist enthalten in:
Kenzie Togami 2019-10-13 02:20:10 -07:00
Ursprung 7d52374fc0
Commit 9f1e7cdaaf
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 5D200B325E157A81

Datei anzeigen

@ -79,17 +79,17 @@ allStatements : statements EOF ;
statements : statement+ ;
statement
: block
| ifStatement
| whileStatement
| doStatement
| forStatement
| breakStatement
| continueStatement
| returnStatement
| switchStatement
| expressionStatement
| SEMI_COLON
: block # BlockStmt
| ifStatement # IfStmt
| whileStatement # WhileStmt
| doStatement # DoStmt
| forStatement # ForStmt
| breakStatement # BreakStmt
| continueStatement # ContinueStmt
| returnStatement # ReturnStmt
| switchStatement # SwitchStmt
| expressionStatement # ExpressionStmt
| SEMI_COLON # EmptyStmt
;
block : '{' statements '}' ;
@ -118,29 +118,28 @@ returnStatement : RETURN expression? ;
switchStatement : SWITCH '(' expression ')' '{' (switchLabel ':' statements )+ '}' ;
switchLabel
: CASE constantExpression
| DEFAULT
: CASE constantExpression # Case
| DEFAULT # Default
;
expressionStatement : expression SEMI_COLON ;
expression
: constantExpression
| functionCall
| identifierExpression
| '(' expression ')'
| unaryOp expression
| identifierExpression binaryAssignOp expression
| expression binaryOp expression
| expression postUnaryOp
: unaryOp expression # UnaryExpr
| expression binaryOp expression # BinaryExpr
| expression postUnaryOp # PostUnaryExpr
| ID binaryAssignOp expression # AssignExpr
| expression '?' expression ':' expression # TernaryExpr
| functionCall # FunctionCallExpr
| constantExpression # ConstantExpr
| ID # IdExpr
| '(' expression ')' # WrappedExpr
;
constantExpression : NUMBER ;
functionCall : ID '(' (expression ( ',' expression )*)? ')' ;
identifierExpression : ID ;
unaryOp
: MINUS
| EXCLAMATION_MARK