diff options
author | chriseth <c@ethdev.com> | 2015-10-16 22:56:00 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-10-16 22:56:00 +0800 |
commit | 2e671d38476c2e11c9e892e59ceffd5c457a213b (patch) | |
tree | db4fc6b668892b7b25155362becf2b5ea56af556 /libsolidity/Parser.h | |
parent | 452d4732937f418d9c0b5152050c13aa48b7fdde (diff) | |
parent | 87079bd3fdef496fc814a184cb3375e001b03a08 (diff) | |
download | dexon-solidity-2e671d38476c2e11c9e892e59ceffd5c457a213b.tar dexon-solidity-2e671d38476c2e11c9e892e59ceffd5c457a213b.tar.gz dexon-solidity-2e671d38476c2e11c9e892e59ceffd5c457a213b.tar.bz2 dexon-solidity-2e671d38476c2e11c9e892e59ceffd5c457a213b.tar.lz dexon-solidity-2e671d38476c2e11c9e892e59ceffd5c457a213b.tar.xz dexon-solidity-2e671d38476c2e11c9e892e59ceffd5c457a213b.tar.zst dexon-solidity-2e671d38476c2e11c9e892e59ceffd5c457a213b.zip |
Merge pull request #145 from chriseth/parsingAmbiguityIndexAccess
Correctly parse ambiguities like `A.B[10] x` and `x.y[10] = 3`.
Diffstat (limited to 'libsolidity/Parser.h')
-rw-r--r-- | libsolidity/Parser.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/Parser.h b/libsolidity/Parser.h index ee5be51c..bd483e09 100644 --- a/libsolidity/Parser.h +++ b/libsolidity/Parser.h @@ -125,14 +125,14 @@ private: /// For source code of the form "a[][8]" ("IndexAccessStructure"), this is not possible to /// decide with constant look-ahead. LookAheadInfo peekStatementType() const; - /// Returns a typename parsed in look-ahead fashion from something like "a[8][2**70]". + /// Returns a typename parsed in look-ahead fashion from something like "a.b[8][2**70]". ASTPointer<TypeName> typeNameIndexAccessStructure( - ASTPointer<PrimaryExpression> const& _primary, + std::vector<ASTPointer<PrimaryExpression>> const& _path, std::vector<std::pair<ASTPointer<Expression>, SourceLocation>> const& _indices ); - /// Returns an expression parsed in look-ahead fashion from something like "a[8][2**70]". + /// Returns an expression parsed in look-ahead fashion from something like "a.b[8][2**70]". ASTPointer<Expression> expressionFromIndexAccessStructure( - ASTPointer<PrimaryExpression> const& _primary, + std::vector<ASTPointer<PrimaryExpression>> const& _path, std::vector<std::pair<ASTPointer<Expression>, SourceLocation>> const& _indices ); /// If current token value is not _value, throw exception otherwise advance token. |