mirror of
https://github.com/irmen/prog8.git
synced 2026-04-26 20:17:57 +00:00
fix on..call parse problem, also struct name cannot be a keyword
This commit is contained in:
@@ -24,6 +24,7 @@ BLOCK_COMMENT : '/*' ( BLOCK_COMMENT | ~'*' | '*' ~'/' )*? '*/' -> skip ;
|
||||
WS : [ \t] -> skip ;
|
||||
// WS2 : '\\' EOL -> skip;
|
||||
VOID: 'void';
|
||||
STRUCT: 'struct';
|
||||
ON: 'on';
|
||||
GOTO: 'goto';
|
||||
CALL: 'call';
|
||||
@@ -96,6 +97,7 @@ block_statement:
|
||||
|
||||
statement :
|
||||
directive
|
||||
| ongoto
|
||||
| variabledeclaration
|
||||
| structdeclaration
|
||||
| assignment
|
||||
@@ -117,7 +119,6 @@ statement :
|
||||
| breakstmt
|
||||
| continuestmt
|
||||
| labeldef
|
||||
| ongoto
|
||||
| defer
|
||||
| alias
|
||||
;
|
||||
@@ -132,7 +133,7 @@ variabledeclaration :
|
||||
|
||||
|
||||
structdeclaration:
|
||||
'struct' identifier '{' EOL? (structfielddecl | EOL)+ '}'
|
||||
STRUCT identifier '{' EOL? (structfielddecl | EOL)+ '}'
|
||||
;
|
||||
|
||||
structfielddecl: datatype identifierlist;
|
||||
|
||||
Reference in New Issue
Block a user