mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 22:29:18 +00:00
Update GDScript EBNF grammar
- More assignment operator - $ get_node shorthand - base class function call
This commit is contained in:
@@ -108,7 +108,8 @@ for reference purposes.
|
||||
| "return" [ expression ] stmtEnd
|
||||
;
|
||||
|
||||
assignmentStmt = subscription "=" expression stmtEnd;
|
||||
assignmentStmt = subscription ( "=" | "+=" | "-=" | "*=" | "/="
|
||||
| "%=" | "&=" | "|=" | "^=" ) expression stmtEnd;
|
||||
varDeclStmt = "var" IDENTIFIER [ "=" expression ] stmtEnd;
|
||||
|
||||
assertStmt = "assert" "(" expression [ "," STRING ] ")" stmtEnd ;
|
||||
@@ -136,7 +137,10 @@ for reference purposes.
|
||||
sign = ( "-" | "+" ) sign | bitNot ;
|
||||
bitNot = "~" bitNot | is ;
|
||||
is = call [ "is" ( IDENTIFIER | BUILTINTYPE ) ] ;
|
||||
call = attribute [ "(" [ argList ] ")" ];
|
||||
call
|
||||
= (attribute [ "(" [ argList ] ")" ])
|
||||
| "." IDENTIFIER "(" [ argList ] ")"
|
||||
| "$" ( STRING | IDENTIFIER { '/' IDENTIFIER } );
|
||||
attribute = subscription { "." IDENTIFIER } ;
|
||||
subscription = primary [ "[" expression "]" ] ;
|
||||
primary = "true" | "false" | "null" | "self" | literal | arrayDecl
|
||||
|
||||
Reference in New Issue
Block a user