diff options
author | chriseth <chris@ethereum.org> | 2017-09-28 01:27:36 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-09-28 01:27:36 +0800 |
commit | 639b85f4987db13bebdd751b205424810a7daab7 (patch) | |
tree | a5effe94bf94a640f472970dd50c08472c3f1598 | |
parent | 58847dd062f93de4b30e0625afe2c347c432329f (diff) | |
download | dexon-solidity-639b85f4987db13bebdd751b205424810a7daab7.tar.gz dexon-solidity-639b85f4987db13bebdd751b205424810a7daab7.tar.zst dexon-solidity-639b85f4987db13bebdd751b205424810a7daab7.zip |
Fix source location of VariableDeclarationStatement.
-rw-r--r-- | Changelog.md | 1 | ||||
-rw-r--r-- | libsolidity/parsing/Parser.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Changelog.md b/Changelog.md index 9755d2d3..b1643810 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,7 @@ Features: * Parser: Better error message for unexpected trailing comma in parameter lists. Bugfixes: + * Parser: Fix source location of VariableDeclarationStatement. ### 0.4.17 (2017-09-21) diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index 9a8bb358..821e81d2 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -1133,6 +1133,7 @@ ASTPointer<VariableDeclarationStatement> Parser::parseVariableDeclarationStateme options.allowVar = true; options.allowLocationSpecifier = true; variables.push_back(parseVariableDeclaration(options, _lookAheadArrayType)); + nodeFactory.setEndPositionFromNode(variables.back()); } if (m_scanner->currentToken() == Token::Assign) { |