mirror of
https://github.com/processing/processing4.git
synced 2026-06-08 08:31:28 +02:00
Minor style improvements in antlr grammars.
This commit is contained in:
@@ -299,8 +299,13 @@ literal
|
||||
| NULL_LITERAL
|
||||
;
|
||||
|
||||
baseStringLiteral: STRING_LITERAL;
|
||||
multilineStringLiteral: MULTI_STRING_LIT;
|
||||
baseStringLiteral
|
||||
: STRING_LITERAL
|
||||
;
|
||||
|
||||
multilineStringLiteral
|
||||
: MULTI_STRING_LIT
|
||||
;
|
||||
|
||||
stringLiteral
|
||||
: baseStringLiteral
|
||||
|
||||
@@ -23,7 +23,7 @@ processingSketch
|
||||
: javaProcessingSketch
|
||||
| staticProcessingSketch
|
||||
| activeProcessingSketch
|
||||
| warnMixedModes
|
||||
| warnMixedModes
|
||||
;
|
||||
|
||||
// java mode, is a compilation unit
|
||||
@@ -44,8 +44,8 @@ activeProcessingSketch
|
||||
// User incorrectly mixing modes. Included to allow for kind error message.
|
||||
warnMixedModes
|
||||
: (importDeclaration | classBodyDeclaration | blockStatement)* blockStatement classBodyDeclaration (importDeclaration | classBodyDeclaration | blockStatement)*
|
||||
| (importDeclaration | classBodyDeclaration | blockStatement)* classBodyDeclaration blockStatement (importDeclaration | classBodyDeclaration | blockStatement)*
|
||||
;
|
||||
| (importDeclaration | classBodyDeclaration | blockStatement)* classBodyDeclaration blockStatement (importDeclaration | classBodyDeclaration | blockStatement)*
|
||||
;
|
||||
|
||||
variableDeclaratorId
|
||||
: warnTypeAsVariableName
|
||||
@@ -73,12 +73,12 @@ methodCall
|
||||
// "color" is a special Processing primitive (== int)
|
||||
functionWithPrimitiveTypeName
|
||||
: ( 'boolean'
|
||||
| 'byte'
|
||||
| 'char'
|
||||
| 'float'
|
||||
| 'int'
|
||||
| 'byte'
|
||||
| 'char'
|
||||
| 'float'
|
||||
| 'int'
|
||||
| 'color'
|
||||
) '(' expressionList? ')'
|
||||
) '(' expressionList? ')'
|
||||
;
|
||||
|
||||
// adding support for "color" primitive
|
||||
|
||||
Reference in New Issue
Block a user