Commit Graph

33 Commits

Author SHA1 Message Date
Daniel Kirchner
606fbd8fcc Fix antlr grammar. 2023-05-10 12:00:45 +02:00
Michael de Hoog
07ac3874b6
Fix incompatibilities with Golang parser generation 2023-04-16 13:51:05 -05:00
Matheus Aguiar
4aa310034c Added missing keyword unicode to Lexer 2023-03-28 13:51:43 -03:00
Matheus Aguiar
0158de60be Refactored NumberUnit and FunctionDefinition. Added OctalNumber. Fixed number followed by identifier with no whitespace. 2023-03-24 16:19:33 -03:00
uji
8b07e23975 docs/grammer: Fix the writing of unicodeStringLiteral rules.
UnicodeStringLiteral rules can be written with a common prefix.
(like HexString ef6ff2f055/docs/grammar/SolidityLexer.g4 (L213))
2023-03-11 17:29:45 +09:00
wechman
9445483d60 User-defined operators: Parsing and grammar 2023-02-22 00:06:17 +01:00
Rodrigo Q. Saramago
ef6ff2f055
Adds support for the EVM version "Paris".
Deprecates `block.difficulty` and disallow `difficulty()` in inline assembly for EVM versions >= paris.
The change is due to the renaming introduced by EIP-4399 (see: https://eips.ethereum.org/EIPS/eip-4399).
Introduces `block.prevrandao` in Solidity and `prevrandao()` in inline assembly for EVM versions >= paris.

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
Co-authored-by: Daniel <daniel@ekpyron.org>
Co-authored-by: matheusaaguiar <95899911+matheusaaguiar@users.noreply.github.com>
Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>
2023-01-23 18:50:36 +00:00
Daniel
f441e1323a
Merge pull request #13384 from zemse/develop
Allow named parameters in mapping types
2023-01-09 17:59:29 +01:00
Soham Zemse
fa78e0f3d4 feat: allow named parameters in mapping types
Co-authored-by: Hari <webmail.hari@gmail.com>

test: add parser and abi test cases

docs: add example on using named parameters for mappings

- Add changelog

feat: update antlr grammar to allow named parameters in mappings

fix: prevent conflicting mapping parameter names

ref: change order of mapping initializers

test: update expectations and fix build

test: add more tests

fix: use common error & code for conflicting params

fix: issue with accessing nested mapping

test: add conflicting params tests for more nested levels

Update libsolidity/analysis/DeclarationTypeChecker.cpp

Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>

fix: error reported with the same code twice

test: add more tests for 3 level nested mapping

Address review comments
2022-12-08 11:56:58 +01:00
wechman
64a4f32bc2 Consistent terminology for attached/bound functions 2022-12-07 19:31:41 +01:00
uji
5f6f353953 Sort grammer rules of SolidityLexer.g4 2022-05-30 00:15:48 +09:00
chriseth
9188519f11 Using for with global binding. 2022-03-14 17:39:14 +01:00
hrkrshnn
672951ccc7 Extend using-for. 2022-03-14 12:33:44 +01:00
Daniel Kirchner
46d8611e90 Adjust grammar. 2022-03-02 17:07:11 +01:00
Daniel Kirchner
2d0f6278bb Allow builtins as yul identifier paths in antlr grammar. 2022-01-17 18:42:54 +01:00
hrkrshnn
7e95555325 Updated ANTLR grammar to include user defined value types. 2021-09-08 21:19:30 +02:00
hrkrshnn
95091f6b58 Implemented block.basefee in Solidilty and basefee() in Yul.
Also added basefee to Yul grammar.
2021-08-09 16:18:08 +02:00
Daniel Kirchner
6fdfd8b62b Fix import path grammar and grammar testing details. 2021-04-12 14:54:36 +02:00
chriseth
f04adde664 Allow hex string literals in Yul. 2021-04-08 15:03:33 +02:00
chriseth
3353107779 Grammar for revert statement. 2021-03-30 21:15:46 +02:00
chriseth
b04b189959 Syntax for custom errors. 2021-03-30 21:15:18 +02:00
Alex Beregszaszi
15237c8404 Disable the type byte 2020-12-14 19:18:25 +00:00
chriseth
d257ab7141 Merge remote-tracking branch 'origin/develop' into breaking 2020-12-14 16:05:12 +01:00
chriseth
6fff408d82 Fix lexer rules wrt leading zeros. 2020-12-14 14:17:16 +01:00
Alex Beregszaszi
66ee3ec533 Remove the \b, \f, \v escape sequences from the Scanner 2020-12-07 21:10:03 +00:00
chriseth
253889cbf1 Merge remote-tracking branch 'origin/develop' into breaking 2020-11-24 16:22:03 +01:00
chriseth
bb9688e0fe Grammar for fallback returning. 2020-11-23 14:22:37 +01:00
chriseth
79afd04818 Fix grammar for identifier / identifier path. 2020-11-17 18:33:45 +01:00
chriseth
33d8b62d06 Grammar for unchecked. 2020-10-19 16:58:37 +02:00
chriseth
346fe1c6c5 Constants at file-level. 2020-10-08 18:56:17 +02:00
Alex Beregszaszi
662f7d8fac Rename Arrow to DoubleArrow 2020-08-27 12:28:27 +01:00
Alex Beregszaszi
4e5b403c37 Introduce RightArrow (->) token in the scanner 2020-08-27 12:28:27 +01:00
Daniel Kirchner
bd21535dd1 Rewrite of the antlr grammar. 2020-08-19 17:55:31 +02:00