aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-25 23:28:30 +0800
committerNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-25 23:28:30 +0800
commit3f5bff968fb10c9aec21ddd63f16164ac501bd07 (patch)
tree0556fb092c94f39d6ce6d37b1df0766028f17ba1 /libsolidity
parent1a661c562a7689a13905e5c1bf7a100c5f6b5dda (diff)
downloaddexon-solidity-3f5bff968fb10c9aec21ddd63f16164ac501bd07.tar.gz
dexon-solidity-3f5bff968fb10c9aec21ddd63f16164ac501bd07.tar.zst
dexon-solidity-3f5bff968fb10c9aec21ddd63f16164ac501bd07.zip
Add StorageLocation
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/grammar.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt
index 63201711..9facdea4 100644
--- a/libsolidity/grammar.txt
+++ b/libsolidity/grammar.txt
@@ -31,9 +31,10 @@ ParameterList = '(' ( VariableDeclaration (',' VariableDeclaration)* )? ')'
// semantic restriction: mappings and structs (recursively) containing mappings
// are not allowed in argument lists
VariableDeclaration = TypeName Identifier
-TypeName = ElementaryTypeName | Identifier | Mapping | ArrayTypeName
+TypeName = ElementaryTypeName | Identifier StorageLocation? | Mapping | ArrayTypeName
Mapping = 'mapping' '(' ElementaryTypeName '=>' TypeName ')'
-ArrayTypeName = TypeName '[' Expression? ']'
+ArrayTypeName = TypeName StorageLocation? '[' Expression? ']'
+StorageLocation = 'memory' | 'storage'
Block = '{' Statement* '}'
Statement = IfStatement | WhileStatement | ForStatement | Block |