Grammar: tab => spaces

This commit is contained in:
Nicolai Søborg 2016-07-14 23:48:29 +02:00 committed by GitHub
parent ff9d6e05f2
commit 80b01f6ebd

View File

@ -9,7 +9,7 @@ StructDefinition = 'struct' Identifier '{'
StateVariableDeclaration = TypeName ( 'public' | 'inheritable' | 'private' )? Identifier ';' StateVariableDeclaration = TypeName ( 'public' | 'inheritable' | 'private' )? Identifier ';'
ModifierDefinition = 'modifier' Identifier ParameterList? Block ModifierDefinition = 'modifier' Identifier ParameterList? Block
FunctionDefinition = 'function' Identifier ParameterList FunctionDefinition = 'function' Identifier ParameterList
( Identifier | 'constant' | 'external' | 'public' | 'inheritable' | 'private' )* ( Identifier | 'constant' | 'external' | 'public' | 'inheritable' | 'private' )*
( 'returns' ParameterList )? Block ( 'returns' ParameterList )? Block
EnumValue = Identifier EnumValue = Identifier
@ -24,7 +24,7 @@ ArrayTypeName = TypeName '[' (Expression)? ']'
Block = '{' Statement* '}' Block = '{' Statement* '}'
Statement = IfStatement | WhileStatement | Block | Statement = IfStatement | WhileStatement | Block |
( Continue | Break | Return | VariableDefinition | ExpressionStatement ) ';' ( Continue | Break | Return | VariableDefinition | ExpressionStatement ) ';'
ExpressionStatement = Expression ExpressionStatement = Expression
IfStatement = 'if' '(' Expression ')' Statement ( 'else' Statement )? IfStatement = 'if' '(' Expression ')' Statement ( 'else' Statement )?
@ -38,14 +38,14 @@ Throw = 'throw' Expression? ';'
VariableDefinition = VariableDeclaration ( '=' Expression )? ';' VariableDefinition = VariableDeclaration ( '=' Expression )? ';'
Expression = Assignment | UnaryOperation | BinaryOperation | FunctionCall | NewExpression | IndexAccess | Expression = Assignment | UnaryOperation | BinaryOperation | FunctionCall | NewExpression | IndexAccess |
MemberAccess | PrimaryExpression MemberAccess | PrimaryExpression
// The expression syntax is actually much more complicated // The expression syntax is actually much more complicated
Assignment = Expression (AssignmentOp Expression) Assignment = Expression (AssignmentOp Expression)
BasicBinaryOperation = '|' | '^' | '&' | '<<' | '>>' | '>>>' | '+' | '-' | '*' | '/' | '%' BasicBinaryOperation = '|' | '^' | '&' | '<<' | '>>' | '>>>' | '+' | '-' | '*' | '/' | '%'
AssignmentOp = BasicBinaryOperation '=' AssignmentOp = BasicBinaryOperation'='
UnaryOperation = '!' | '~' | '++' | '--' | 'delete' UnaryOperation = '!' | '~' | '++' | '--' | 'delete'
BinaryOperation = BasicBinaryOperation | '||' | '&&' | '**' | BinaryOperation = BasicBinaryOperation | '||' | '&&' | '**' |
'==' | '!=' | '<' | '>' | '<=' | '>=' | 'in' '==' | '!=' | '<' | '>' | '<=' | '>=' | 'in'
FunctionCall = Expression '(' Expression ( ',' Expression )* ')' FunctionCall = Expression '(' Expression ( ',' Expression )* ')'
NewExpression = 'new' Identifier NewExpression = 'new' Identifier