Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 02:50:06 +01:00
Clean up formatting on ANTLR grammar
Dieser Commit ist enthalten in:
Ursprung
fa42e40281
Commit
ae71c2a51b
@ -130,13 +130,13 @@ emptyStatement: SEMI_COLON ;
|
|||||||
expression : assignmentExpression ;
|
expression : assignmentExpression ;
|
||||||
|
|
||||||
assignmentExpression
|
assignmentExpression
|
||||||
: conditionalExpression
|
: conditionalExpression
|
||||||
| assignment
|
| assignment
|
||||||
;
|
;
|
||||||
|
|
||||||
assignment
|
assignment
|
||||||
: target=ID assignmentOperator source=expression
|
: target=ID assignmentOperator source=expression
|
||||||
;
|
;
|
||||||
|
|
||||||
assignmentOperator
|
assignmentOperator
|
||||||
: ASSIGN
|
: ASSIGN
|
||||||
@ -149,80 +149,80 @@ assignmentOperator
|
|||||||
;
|
;
|
||||||
|
|
||||||
conditionalExpression
|
conditionalExpression
|
||||||
: conditionalOrExpression # CEFallthrough
|
: conditionalOrExpression # CEFallthrough
|
||||||
| condition=conditionalOrExpression QUESTION_MARK
|
| condition=conditionalOrExpression QUESTION_MARK
|
||||||
trueBranch=expression COLON falseBranch=conditionalExpression # TernaryExpr
|
trueBranch=expression COLON falseBranch=conditionalExpression # TernaryExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
conditionalOrExpression
|
conditionalOrExpression
|
||||||
: conditionalAndExpression # COFallthrough
|
: conditionalAndExpression # COFallthrough
|
||||||
| left=conditionalOrExpression OR_SC right=conditionalAndExpression # ConditionalOrExpr
|
| left=conditionalOrExpression OR_SC right=conditionalAndExpression # ConditionalOrExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
conditionalAndExpression
|
conditionalAndExpression
|
||||||
: equalityExpression # CAFallthrough
|
: equalityExpression # CAFallthrough
|
||||||
| left=conditionalAndExpression AND_SC right=equalityExpression # ConditionalAndExpr
|
| left=conditionalAndExpression AND_SC right=equalityExpression # ConditionalAndExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
equalityExpression
|
equalityExpression
|
||||||
: relationalExpression # EqFallthrough
|
: relationalExpression # EqFallthrough
|
||||||
| left=equalityExpression
|
| left=equalityExpression
|
||||||
op=
|
op=
|
||||||
( EQUAL
|
( EQUAL
|
||||||
| NOT_EQUAL
|
| NOT_EQUAL
|
||||||
| NEAR
|
| NEAR
|
||||||
) right=relationalExpression # EqualityExpr
|
) right=relationalExpression # EqualityExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
relationalExpression
|
relationalExpression
|
||||||
: shiftExpression # ReFallthrough
|
: shiftExpression # ReFallthrough
|
||||||
| left=relationalExpression
|
| left=relationalExpression
|
||||||
op=
|
op=
|
||||||
( LESS_THAN
|
( LESS_THAN
|
||||||
| GREATER_THAN
|
| GREATER_THAN
|
||||||
| LESS_THAN_OR_EQUAL
|
| LESS_THAN_OR_EQUAL
|
||||||
| GREATER_THAN_OR_EQUAL
|
| GREATER_THAN_OR_EQUAL
|
||||||
) right=shiftExpression # RelationalExpr
|
) right=shiftExpression # RelationalExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
shiftExpression
|
shiftExpression
|
||||||
: additiveExpression # ShFallthrough
|
: additiveExpression # ShFallthrough
|
||||||
| left=shiftExpression op=( LEFT_SHIFT | RIGHT_SHIFT ) right=additiveExpression # ShiftExpr
|
| left=shiftExpression op=( LEFT_SHIFT | RIGHT_SHIFT ) right=additiveExpression # ShiftExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
additiveExpression
|
additiveExpression
|
||||||
: multiplicativeExpression # AdFallthrough
|
: multiplicativeExpression # AdFallthrough
|
||||||
| left=additiveExpression op=( PLUS | MINUS ) right=multiplicativeExpression # AddExpr
|
| left=additiveExpression op=( PLUS | MINUS ) right=multiplicativeExpression # AddExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
multiplicativeExpression
|
multiplicativeExpression
|
||||||
: powerExpression # MuFallthrough
|
: powerExpression # MuFallthrough
|
||||||
| left=multiplicativeExpression
|
| left=multiplicativeExpression
|
||||||
op=
|
op=
|
||||||
( TIMES
|
( TIMES
|
||||||
| DIVIDE
|
| DIVIDE
|
||||||
| MODULO
|
| MODULO
|
||||||
) right=powerExpression # MultiplicativeExpr
|
) right=powerExpression # MultiplicativeExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
powerExpression
|
powerExpression
|
||||||
: unaryExpression # PwFallthrough
|
: unaryExpression # PwFallthrough
|
||||||
| left=powerExpression POWER right=unaryExpression # PowerExpr
|
| left=powerExpression POWER right=unaryExpression # PowerExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
unaryExpression
|
unaryExpression
|
||||||
: op=( INCREMENT | DECREMENT ) target=ID # PreCrementExpr
|
: op=( INCREMENT | DECREMENT ) target=ID # PreCrementExpr
|
||||||
| op=( PLUS | MINUS ) expr=unaryExpression # PlusMinusExpr
|
| op=( PLUS | MINUS ) expr=unaryExpression # PlusMinusExpr
|
||||||
| postfixExpression # UaFallthrough
|
| postfixExpression # UaFallthrough
|
||||||
| COMPLEMENT expr=unaryExpression # ComplementExpr
|
| COMPLEMENT expr=unaryExpression # ComplementExpr
|
||||||
| EXCLAMATION_MARK expr=unaryExpression # NotExpr
|
| EXCLAMATION_MARK expr=unaryExpression # NotExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
postfixExpression
|
postfixExpression
|
||||||
: unprioritizedExpression # PoFallthrough
|
: unprioritizedExpression # PoFallthrough
|
||||||
| target=ID op=( INCREMENT | DECREMENT) # PostCrementExpr
|
| target=ID op=( INCREMENT | DECREMENT) # PostCrementExpr
|
||||||
| expr=postfixExpression op=EXCLAMATION_MARK # PostfixExpr
|
| expr=postfixExpression op=EXCLAMATION_MARK # PostfixExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
unprioritizedExpression
|
unprioritizedExpression
|
||||||
: functionCall # FunctionCallExpr
|
: functionCall # FunctionCallExpr
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren