diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-22 00:04:27 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-11-22 11:33:05 +0800 |
commit | be470f107eac284ff599dd5b0632f396d86dd025 (patch) | |
tree | fc05e9f2cb3355fde62c78eb0ddd3ff99713b67b /docs/julia.rst | |
parent | 0493828916546d6fb19918c81e44eec402f7b56a (diff) | |
download | dexon-solidity-be470f107eac284ff599dd5b0632f396d86dd025.tar.gz dexon-solidity-be470f107eac284ff599dd5b0632f396d86dd025.tar.zst dexon-solidity-be470f107eac284ff599dd5b0632f396d86dd025.zip |
Support types in grammar
Diffstat (limited to 'docs/julia.rst')
-rw-r--r-- | docs/julia.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/julia.rst b/docs/julia.rst index a1b1e678..988f1980 100644 --- a/docs/julia.rst +++ b/docs/julia.rst @@ -78,12 +78,12 @@ Grammar:: BreakContinue | SubAssembly FunctionDefinition = - 'function' Identifier '(' IdentifierList? ')' - ( '->' IdentifierList )? Block + 'function' Identifier '(' TypedIdentifierList? ')' + ( '->' TypedIdentifierList )? Block VariableDeclaration = - 'let' IdentifierOrList ( ':=' Expression )? + 'let' TypedIdentifierList ( ':=' Expression )? Assignment = - IdentifierOrList ':=' Expression + IdentifierList ':=' Expression Expression = FunctionCall | Identifier | Literal Switch = @@ -98,11 +98,11 @@ Grammar:: 'assembly' Identifier Block FunctionCall = Identifier '(' ( Expression ( ',' Expression )* )? ')' - IdentifierOrList = Identifier | '(' IdentifierList ')' Identifier = [a-zA-Z_$] [a-zA-Z_0-9]* IdentifierList = Identifier ( ',' Identifier)* + TypedIdentifierList = Identifier ':' Identifier ( ',' Identifier ':' Identifier )* Literal = - NumberLiteral | StringLiteral | HexLiteral + (NumberLiteral | StringLiteral | HexLiteral) ':' Identifier NumberLiteral = HexNumber | DecimalNumber HexLiteral = 'hex' ('"' ([0-9a-fA-F]{2})* '"' | '\'' ([0-9a-fA-F]{2})* '\'') StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"' |