Commit Graph

85 Commits

Author SHA1 Message Date
Christian Parpart
6294aa871a Simplify AsmParser::parse(.) usage 2021-08-03 15:43:17 +02:00
Christian Parpart
81e9225304 Eliminate some unnecessary header inclusions in headers. 2021-08-03 15:43:14 +02:00
chriseth
f75b55071e Remove CharStream from SourceLocation. 2021-07-14 15:12:07 +02:00
chriseth
e5ab68ed71 Use unknown file for invalid source index. 2021-07-12 17:35:49 +02:00
Christian Parpart
f129a3498c Use shared DebugData for when using source locations from comments. 2021-07-09 11:50:50 +02:00
Christian Parpart
5e4868d5d6 Adapted tests due to more precise Yul source locations.
Also added support for -1 source index, referencing original scanner's source location.
2021-07-09 11:50:48 +02:00
Christian Parpart
132fa46faa Yul: Adds parsing @src comment in AsmParser to customize the AST's sourcer locations. 2021-07-09 11:48:00 +02:00
Christian Parpart
f9f32c910d Fix source location for `if` statements. 2021-07-07 17:37:01 +02:00
TerranCivilian
c15501eea9 Remove unneeded include files 2021-06-07 12:53:18 -04:00
chriseth
d305c219d8 Fix namespace styles. 2021-05-27 17:41:04 +02:00
Djordje Mijovic
e404b6e7a6 Refactoring yul source locations. 2021-05-04 16:05:23 +02:00
chriseth
f04adde664 Allow hex string literals in Yul. 2021-04-08 15:03:33 +02:00
chriseth
5c40fb060c Report illegal tokens in the Yul parser. 2020-12-16 12:20:07 +01:00
chriseth
5071709b25 Remove FunctionCall from ElementaryOperation. 2020-12-03 17:47:47 +01:00
Alex Beregszaszi
61ed1f1986 cleanup 2020-12-03 17:15:45 +01:00
Alex Beregszaszi
6c0a3bd043 Ensure that builtins must be executed 2020-12-03 17:15:44 +01:00
Alex Beregszaszi
e2a756a705 Remove dead code 2020-12-03 17:15:44 +01:00
Alex Beregszaszi
baa7251f1d More clean up 2020-12-03 17:14:49 +01:00
Alex Beregszaszi
75e0057388 Rename parseElementaryOperation to parseLiteralOrIdentifier 2020-12-03 17:14:49 +01:00
Alex Beregszaszi
3da2b67b67 simplify parser 2020-12-03 17:14:49 +01:00
Alex Beregszaszi
a22077f736 Rename AsmData -> AST
Also attempt to only include ASTForward where appropriate.
2020-11-25 17:58:02 +00:00
Alex Beregszaszi
7ef9591e64 Expose hex literal to the Yul parser
This allows nicer error messages.
2020-08-28 19:34:52 +01:00
Alex Beregszaszi
4366ede889 Introduce Leave as a keyword for Yul 2020-08-28 19:34:52 +01:00
Alex Beregszaszi
caa329066e Do not emit Solidity-only tokens in the Scanner for Yul
And simplfiy AsmParser greatly.
2020-08-28 19:34:52 +01:00
Alex Beregszaszi
64c73baee9 Use only advance() and not with a mix of m_scanner->next() 2020-08-28 19:34:52 +01:00
Alex Beregszaszi
4e5b403c37 Introduce RightArrow (->) token in the scanner 2020-08-27 12:28:27 +01:00
Alex Beregszaszi
24bb6252ac Merge Parser::instructions() into EVMDialect 2020-07-29 13:15:54 +01:00
Alex Beregszaszi
d9cb8c8c5e Add ScannerKind and replace supportPeriodInIdentifier 2020-07-28 12:31:08 +01: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
Alex Beregszaszi
65c50b14c8 Remove unused instructionNames() function in AsmParser 2020-07-06 16:48:28 +01:00
chriseth
b00014c51d Fix source location of yul multi-assignemnt. 2020-06-18 14:31:53 +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
Daniel Kirchner
b580106c80 Yul parser hack and more yul tests. 2020-05-05 17:23:41 +02:00
Leonardo Alt
89ce2dbfe9 The identifier var should be fine in Yul 2020-03-11 18:45:08 +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
a3d4
7fecab07a8 Simplified Parser::createWithLocation().
In all but one case the function was called with the default argument value.
And when it was location, the location should be valid (see Parser::parseElementaryOperation()).
2020-02-06 03:34:48 +01:00
chriseth
ada0cef150
Merge pull request #8068 from ethereum/evmTypedDialect
[Yul] EVM typed dialect
2020-01-30 14:53:25 +01:00
cameel
642653ea04 Make yul::Parser::parse() return unique_ptr rather than shared_ptr
- unique_ptr is more flexible and generally recommended for factory methods. It gets automatically converted to shared_ptr if necessary. Returning shared_ptr, on the other hand, forces the caller to use shared_ptr because a conversion to unique_ptr is not possible.
2020-01-29 20:07:08 +01:00
chriseth
fbe5bb0cce Parse default dialect and omit when printing. 2020-01-29 17:25:25 +01:00
chriseth
123ea0a250 Remove asm flavour. 2020-01-14 17:16:09 +01:00
Leonardo Alt
a02308cfa5 Replace void cast by maybe_unused 2020-01-09 13:41:30 +01:00
Christian Parpart
345f9928ab Library libdevcore renamed to libsolutil. 2020-01-07 15:51:50 +01:00
Christian Parpart
6b23412fae C++ namespace cleanup (except tests). 2020-01-07 15:51:50 +01:00
chriseth
2f11ac3590 Merge remote-tracking branch 'origin/develop' into develop_060 2019-12-03 21:17:15 +01:00
Alex Beregszaszi
7e8f0a17bc Replace all solAsserts with yulAsserts in libyul 2019-12-03 17:54:34 +01:00
chriseth
1ebcc757e1 Merge remote-tracking branch 'origin/develop' into develop_060 2019-11-27 19:14:08 +01:00
chriseth
0bb88dabb7 Restrict usage of plain "new". 2019-11-27 17:55:11 +01:00
Leonardo Alt
72eff30778 Fix develop 060 merge 2019-11-20 13:49:40 +01:00
Leonardo Alt
389da5228e Merge remote-tracking branch 'origin/develop' into merge_develop_060 2019-11-20 12:27:40 +01:00