Commit Graph

222 Commits

Author SHA1 Message Date
Marenz
9e674ba047 Forward declare Instruction enum in EVMVersion 2022-09-29 13:41:58 +02:00
Alex Beregszaszi
565423c934 Replace use of boost::adapters::filtered with ranges::views::filter 2022-09-27 03:14:17 +02:00
nishant-sachdeva
eafd7218b7 refactored struct message to use std::variant for _typeOrSeverity 2022-09-20 19:20:43 +05:30
nishant-sachdeva
c8011d8719 Cleaning up helpers around errors 2022-09-19 10:51:14 +05:30
Marenz
1b5332c2b9 Fix spelling mistakes and CI spellcheck job 2022-08-18 14:38:19 +02:00
Matheus Aguiar
a73bf9136c Remove "garbage" code snippet from error message when in import-ast mode. 2022-07-06 13:43:29 -03:00
Matheus Aguiar
290bd4fd2d Added a flag to record when a source is reconstructed from JSON so garbage code snippets are not printed after source location. 2022-07-05 11:41:24 -03:00
William Entriken
2a957413d0 Update naming of Mainnet 2022-06-30 16:47:11 +02:00
Samuel Osewa
c21265f9f8 Changed error message for for Unicode character in non-unicode string literal
Co-authored-by: Kamil Śliwak <cameel2@gmail.com>
2022-06-15 16:12:24 +05:30
Daniel Kirchner
ece547204a Reorder member variables of unique error reporter to ensure proper initialization order. 2022-05-11 13:40:02 +02:00
Kamil Śliwak
3c5930dd8e Put arguments in parantheses in assert macro definitions 2022-04-06 22:26:21 +02:00
wechman
52dfccca98 Replace all locale-dependent operations with locale-agnostic counterparts 2022-03-07 17:23:08 +01:00
chriseth
5d571bb111
Merge pull request #12352 from ethereum/lineColumnTranslateForCharStream
LineColumn handling for CharStream.
2021-12-01 15:59:21 +01:00
chriseth
264b7bd857 LineColumn handling for CharStream. 2021-12-01 15:16:01 +01:00
chriseth
b6bd85202c Accessors for exceptions. 2021-12-01 14:26:23 +01:00
chriseth
86ce5f1da5 Use LineColumn type. 2021-11-30 00:08:22 +01:00
Leo Alt
fa48abf4f1 Add new info functions 2021-10-26 11:30:30 +02:00
shikharvashistha
cf005368d8 Added different colors for warning & error
Co-authored-by: shikharvashistha <shikharvashistha@yandex.com>
Co-authored-by: cameel <kamil.sliwak@codepoets.it>
2021-10-25 11:16:51 +01:00
Christian Parpart
35a81073b8 liblangutil: Adds a convenience helper method SourceLocation::contains(int _pos). 2021-10-14 17:35:03 +02:00
Kamil Śliwak
25eedfafe2 Define DebugInfoSelection 2021-10-11 20:34:48 +02:00
Christian Parpart
3f08b2269a Adds fmtlib as 3rdparty dependency for easier string composition. 2021-10-11 13:35:08 +02:00
Kamil Śliwak
0745842d46 Use BOOST_PP_OVERLOAD() to allow invoking the assertion macros without a message 2021-10-04 12:05:00 +02:00
Kamil Śliwak
4fe6aa1328 Add default messages to assertion macros 2021-10-04 12:05:00 +02:00
chriseth
1531863835 Split Common.h into Numeric.h. 2021-09-23 15:27:29 +02:00
Leo Alt
e72fa7fc10 Add new info severity 2021-09-13 22:48:22 +02:00
Leo Alt
d91f75deb8 Fix ICE on unique errors 2021-09-09 16:37:43 +02:00
Kamil Śliwak
98ab6d91ed SourceLocation::singleLineSnippet(): Handle \r\n line endings correctly 2021-09-07 17:18:22 +02:00
Kamil Śliwak
a7612ce873 Move the function for creating code snippets used next to source locations in assembly to liblangutil 2021-09-07 17:18:22 +02:00
Leo Alt
8e81df1bd3 Do not show redundant unsupported errors in SMTChecker 2021-08-27 16:25:09 +02:00
hrkrshnn
892700d769 Tests for basefee as identifier in inline assembly
Also added basefee to `EVMVersion::hasOpcode(...)`
2021-08-11 10:46:40 +02:00
hrkrshnn
79733fca48 Set default EVM version to London. 2021-08-11 09:54:14 +02:00
hrkrshnn
af1dabb555 Added EVMVersion london.
Also set the value of `block_base_fee` for testing to 7 wei.
2021-08-09 16:18:08 +02:00
Christian Parpart
d203c80abd Eliminate unnecessary m_source from Parser 2021-08-03 16:03:45 +02:00
chriseth
ffc5cfd9a5 Remove scanner from compiler stack. 2021-08-03 15:43:17 +02:00
Christian Parpart
af18b8afc2 Eliminate some unnecessary header inclusions in headers in Scanner.h and SourceReferenceFormatter.h 2021-08-03 15:43:17 +02:00
Christian Parpart
ac0c749a32 Eliminate some unnecessary header inclusions in headers in SourceLocation.h 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
01dc77e5a2 Properly assign source names for AST import. 2021-07-14 15:12:10 +02:00
chriseth
f75b55071e Remove CharStream from SourceLocation. 2021-07-14 15:12:07 +02:00
Christian Parpart
adb09452d8 ParserBase has virtual functions but did not have a virtual dtor. 2021-07-13 17:36:18 +02:00
Christian Parpart
f561c1e90b [langutil] ParserBase: make advance() overridable and make sure it's used. 2021-06-23 12:53:25 +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
hrkrshnn
d5564a0304 Set default EVM version to Berlin 2021-05-26 12:23:06 +02:00
Alex Beregszaszi
44e35e0652 Fix compilation errors with GCC 11 2021-05-17 11:35:07 +01:00
Alex Beregszaszi
60189b4f61 Remove obsolete Error constructor 2021-04-23 23:55:22 +01:00
chriseth
eb85a4414c Fix handling of carriage return. 2021-03-09 15:33:12 +01:00
chriseth
f4050e81c6 Provide locations for docstring parsing errors. 2021-03-01 17:34:25 +01:00
Alexander Arlt
c44bb7e7ef Replace raw throw with BOOST_THROW_EXCEPTION. 2021-02-18 20:23:59 -05: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