215 Commits
Author SHA1 Message Date
chriseth 3d97e9a77b Properly parse address member. 2021-02-24 16:44:16 +01:00
Christian Parpart 32ba5f5ae7 libsolidity: Extend the AST for named AST nodes in order to get precise locations for names.
The actual SourceLocation on an ASTNode is representing the whole
ASTNode whereas in an LSP (for example) you are also interested in the
SourceLocation of a name of a construct (e.g. variable decarlation, function definition, ...).

This also properly encodes non-existend sources as `-1` in the JSON output (eliminating the use of `numeric_limits<size_t>::max()`).
2021-02-10 18:13:09 +01:00
Alex Beregszaszi 8edfa26f0a Mark the empty version pragma as invalid 2021-01-04 19:28:36 +00:00
Alex Beregszaszi b14a6a10cc Report meaningful error if parsing a version pragma failed 2020-12-18 11:50:37 +00:00
chriseth 9a5902f9d7 Merge remote-tracking branch 'origin/develop' into breaking 2020-12-02 12:28:02 +01:00
Alex Beregszaszi a22077f736 Rename AsmData -> AST
Also attempt to only include ASTForward where appropriate.
2020-11-25 17:58:02 +00:00
Kamil Śliwak 1bf700e088 Return a type error when an enum has more than 256 members 2020-11-16 18:58:19 +01:00
chriseth 527c073bb9 Checked arithmetic by default. 2020-10-19 16:58:37 +02:00
chriseth c86ea59384 Merge pull request #10019 from ethereum/exp-associativity
[BREAKING] Exp associativity
2020-10-13 17:03:18 +02:00
hrkrshnn 13e7012e1e Parser: Exponentiation is right associative 2020-10-13 16:38:37 +02:00
Mathias Baumann 006e5f2e1f Allow path syntax for super constructor calls 2020-10-13 14:32:11 +02:00
Mathias Baumann 0b7b174945 Add AST Node IdentifierPath 2020-10-13 14:32:11 +02:00
chriseth 346fe1c6c5 Constants at file-level. 2020-10-08 18:56:17 +02:00
chriseth cb82d8239c Make isStateVariable regular scope check. 2020-09-28 19:31:54 +02:00
chriseth 0203eea20e Merge pull request #9649 from a3d4/improve-error-coverage-erorrecovery
Complete test coverage for errors related to parser error recovery
2020-08-31 18:33:19 +02:00
Alex Beregszaszi 662f7d8fac Rename Arrow to DoubleArrow 2020-08-27 12:28:27 +01:00
a3d4 0ee4a85a84 Complete test coverage for errors related to parser error recovery 2020-08-20 16:14:39 +02:00
chriseth 9324fb4f20 Free functions. 2020-08-18 11:46:59 +02:00
Alex Beregszaszi 6eb60bc8cd Add check that regular and unicode string literals are well formatted 2020-07-27 18:21:17 +01:00
chriseth 9be5ed1220 Merge remote-tracking branch 'origin/develop' into breaking 2020-07-21 11:35:28 +02:00
chriseth 93c792c696 Remove special treatment of `var`. 2020-07-20 17:22:04 +02:00
Sachin Grover b7adb2aa42 Add SPDX license identifier if not present already in source file
Fixes: #9220
2020-07-17 20:24:12 +05:30
Harikrishnan Mulackal f73b25bb78 Removed specialized errors related to constant state mutability 2020-07-14 12:42:47 +05:30
Daniel Kirchner c3e13b6733 Promote gwei to a proper keyword. 2020-07-13 18:07:11 +02:00
chriseth 3e3f9a472f Merge remote-tracking branch 'origin/develop' into breaking 2020-06-30 18:56:51 +02:00
Mathias Baumann 02328f3bbb Add unit denomination `gwei` 2020-06-24 18:24:56 +02:00
Alexander Arlt cb5bfc7436 Update natspec comments on state variables.
- changing some warnings to errors
2020-05-26 11:18:24 -05:00
Alexander Arlt af8bb5fb60 Allow natspec comments on state variables. 2020-05-19 11:01:52 -05:00
Erik Kundt 7d37ed4531 Adds structured docs for variable declarations.
- adds natspec generation for state variables.
- exports structured docs for state variables to JSON.
2020-05-19 11:01:52 -05:00
chriseth 3872a1f000 Add support for SPDX license identifiers. 2020-05-13 18:16:59 +02:00
a3d4 0b09a77689 Removed minor parameter redundancy 2020-05-09 01:45:02 +02:00
a3d4 c3e519a151 Add unique IDs to error reporting calls 2020-05-09 01:28:55 +02:00
a3d4 8f68c04358 Add unique IDs to error reporting calls 2020-05-06 13:53:46 +02:00
a3d4 e3641b88ec Groundwork. Prepare for automatic tagging
[Not compilable until the next commit]
2020-05-06 13:52:28 +02:00
hrkrshnn e2e32d372f virtual modifiers (in Abstract contracts) allow empty bodies 2020-04-23 17:26:59 +05:30
chriseth 236eff8416 Export immutability. 2020-04-07 17:30:54 +02:00
chriseth fa148f2483 Parsing of immutable state variable. 2020-03-12 17:11:24 +01:00
chriseth 1488a1ceb8 Refactor isConstant to add "immutable". 2020-03-02 14:20:17 +01:00
a3d4 4ec4d23886 Replaced ParserBase::position() and ParserBase::endPosition() with ParserBase::currentLocation().
It might be simpler to pass `SourceLocation` object instead of splitting it into `start` and `end`, and creating another SourceLocation object using the same `start` and `end` later.
2020-02-06 03:34:49 +01:00
chriseth 5247a6600e Fix function call option parsing and add to grammar. 2020-02-05 16:59:02 +01:00
chriseth 0b9c842656 Fix abstract without contract. 2020-02-05 12:14:14 +01:00
Daniel Kirchner d3cbfb0c5c Allow user-defined types as mapping keys in parser and restrict to contracts during type checking. 2020-02-04 17:22:03 +01:00
Erik Kundt ec27c2e507 Introduce AST node for structured documentation. 2020-01-30 18:25:56 +01:00
Mathias Baumann a3f23d3158 Implement new with CREATE2 and function call options. 2020-01-23 21:20:01 +01:00
Nicolás Venturo 9649c92e12 Fix error message suggestion for receive 2020-01-14 23:24:27 +01:00
djudjuu e8556fa1b2 Ast-Import from standard-json 2020-01-14 17:15:53 +01:00
chriseth 5ca3abd7cb Merge pull request #8106 from random-internet-cat/move-contract-kind
Move ContractKind from ContractDefinition to file-scope
2020-01-08 13:06:26 +01:00
Christian Parpart 6b23412fae C++ namespace cleanup (except tests). 2020-01-07 15:51:50 +01:00
Jason Cobb 529405deb6 Move ContractKind from ContractDefinition to file-scope 2020-01-07 09:11:29 -05:00
chriseth 90feb8f72a Move Visibility out of Declaration. 2019-12-11 00:38:59 +01:00