3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 18:40:05 +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+ ; statements : statement+ ;
statement statement
: block : block # BlockStmt
| ifStatement | ifStatement # IfStmt
| whileStatement | whileStatement # WhileStmt
| doStatement | doStatement # DoStmt
| forStatement | forStatement # ForStmt
| breakStatement | breakStatement # BreakStmt
| continueStatement | continueStatement # ContinueStmt
| returnStatement | returnStatement # ReturnStmt
| switchStatement | switchStatement # SwitchStmt
| expressionStatement | expressionStatement # ExpressionStmt
| SEMI_COLON | SEMI_COLON # EmptyStmt
; ;
block : '{' statements '}' ; block : '{' statements '}' ;
@ -118,29 +118,28 @@ returnStatement : RETURN expression? ;
switchStatement : SWITCH '(' expression ')' '{' (switchLabel ':' statements )+ '}' ; switchStatement : SWITCH '(' expression ')' '{' (switchLabel ':' statements )+ '}' ;
switchLabel switchLabel
: CASE constantExpression : CASE constantExpression # Case
| DEFAULT | DEFAULT # Default
; ;
expressionStatement : expression SEMI_COLON ; expressionStatement : expression SEMI_COLON ;
expression expression
: constantExpression : unaryOp expression # UnaryExpr
| functionCall | expression binaryOp expression # BinaryExpr
| identifierExpression | expression postUnaryOp # PostUnaryExpr
| '(' expression ')' | ID binaryAssignOp expression # AssignExpr
| unaryOp expression | expression '?' expression ':' expression # TernaryExpr
| identifierExpression binaryAssignOp expression | functionCall # FunctionCallExpr
| expression binaryOp expression | constantExpression # ConstantExpr
| expression postUnaryOp | ID # IdExpr
| '(' expression ')' # WrappedExpr
; ;
constantExpression : NUMBER ; constantExpression : NUMBER ;
functionCall : ID '(' (expression ( ',' expression )*)? ')' ; functionCall : ID '(' (expression ( ',' expression )*)? ')' ;
identifierExpression : ID ;
unaryOp unaryOp
: MINUS : MINUS
| EXCLAMATION_MARK | EXCLAMATION_MARK