Daniel Kirchner
f7cbddb7d5
style fixes
2023-09-05 11:50:14 +02:00
Daniel Kirchner
45f00dda3b
Type inference draft.
2023-09-05 11:50:14 +02:00
Kamil Śliwak
a15ef59eec
Remove the ability to produce an AST in presence of errors in --error-recovery mode
...
This reverts commit 7fd7cc1e76
.
2023-08-21 17:50:41 +02:00
Nikola Matic
5893e099fe
Allow qualified access to events from other contracts
2023-05-26 12:52:52 +02:00
Nikola Matic
8a41f4ac7e
Introduce solidity-next pragma
...
Exclude pragma experimental error from ANTLR tests
Test for first pragma after non-pragma declaration
Resolve import pragmas
Change pragma name from next to solidity
Add Changelog entries
Address review comments
2023-05-15 19:25:13 +02:00
chriseth
1e63615206
Export all events.
...
Update tests.
Additional tests
Revert changes to the Natspec
2023-05-03 14:08:27 -03:00
Marko Veniger
07def48f45
Adds NatSpec to AST for struct definitions.
2023-04-18 13:10:21 +02:00
Christian Parpart
be8752b5d3
Adds natspec to AST for enum definition.
2023-04-05 14:58:32 +02:00
wechman
2e8d50eca2
User-defined operators: Documentation
2023-02-22 00:39:25 +01:00
wechman
9a36438441
User-defined operators: AST
2023-02-22 00:06:17 +01:00
Peter Lemenkov
b3f35f703a
libsolidity: Redundant std::move
...
This patch suppresses warnings like this one:
```
/builddir/build/BUILD/solidity-0.8.18/libsolidity/ast/AST.h: In constructor 'solidity::frontend::FunctionDefinition::FunctionDefinition(int64_t, const solidity::frontend::ASTNode::SourceLocation&, solidity::frontend::ASTPointer<std::__cxx11::basic_string<char> >&, const solidity::frontend::ASTNode::SourceLocation&, solidity::frontend::Visibility, solidity::frontend::StateMutability, bool, solidity::langutil::Token, bool, solidity::frontend::ASTPointer<solidity::frontend::OverrideSpecifier>&, solidity::frontend::ASTPointer<solidity::frontend::StructuredDocumentation>&, solidity::frontend::ASTPointer<solidity::frontend::ParameterList>&, std::vector<std::shared_ptr<solidity::frontend::ModifierInvocation> >, solidity::frontend::ASTPointer<solidity::frontend::ParameterList>&, solidity::frontend::ASTPointer<solidity::frontend::Block>&)':
/builddir/build/BUILD/solidity-0.8.18/libsolidity/ast/AST.h:926:69: error: redundant move in initialization [-Werror=redundant-move]
926 | CallableDeclaration(_id, _location, _name, std::move(_nameLocation), _visibility, _parameters, _isVirtual, _overrides, _returnParameters),
| ~~~~~~~~~^~~~~~~~~~~~~~~
/builddir/build/BUILD/solidity-0.8.18/libsolidity/ast/AST.h:926:69: note: remove 'std::move' call
```
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2023-02-05 12:06:19 +01:00
Nikola Matic
83c1f62026
Source location for named mapping keys
2023-01-17 12:25:23 +01: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
wechman
df1f5eef72
UsingForDirective: Rename m_functions to m_functionsOrLibrary
2022-11-07 23:58:19 +01:00
Marenz
f7cc29bec1
Add std:: qualifier to move() calls
2022-08-30 11:12:15 +02:00
Mathias L. Baumann
d4e2c2cc89
Merge pull request #13185 from ethereum/functionCall_locations
...
Add location for parameter names in FunctionCall ASTNode
2022-07-04 16:40:45 +02:00
Marenz
3a5218d3d5
Add location for parameter names in FunctionCall ASTNode
2022-06-29 18:37:36 +02:00
Marenz
ee710eadd4
Add location for member in MemberAccess ASTNode
2022-06-29 18:37:09 +02:00
Marenz
5d2e134378
Add all path locations to the IdentifierPath ASTNode
2022-06-21 14:19:45 +02:00
Kamil Śliwak
acbdcc3711
Revert the change that made events accessible in other contacts via qualified access
2022-06-14 12:04:14 +02:00
nishant-sachdeva
d4c06d2b4e
Adding event and error selector fields on the lines of the function selector fields
2022-05-23 10:49:16 +02: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
290b1c3a90
Allow memory-safe inline assembly dialect flag.
2022-03-02 17:07:11 +01:00
Marenz
46075d04d9
Include used events in `--hashes
` output
2022-02-09 13:50:42 +01:00
Christian Parpart
86a7e19879
libsolidity: Adding a comment to nameLocation().
2021-10-14 17:33:15 +02:00
hrkrshnn
de01822999
UserDefinedValueType: from simple name to canonical name.
2021-09-15 12:56:29 +02:00
Daniel Kirchner
be29ef70a7
Allow accessing user defined value type members via contract name.
2021-09-14 16:24:14 +02:00
hrkrshnn
d3ae9cf71b
Added AST node UserDefinedValueType
2021-09-07 19:42:51 +02:00
a3d4
70b8b1c834
Do not warn about shadowing parameters in functions without implementation
2021-06-09 12:35:26 +02:00
Mathias Baumann
6a0313c456
Unify function call resolve function used in Analysis & Yul CodeGen
2021-06-07 15:23:32 +02:00
chriseth
0d948ebf81
Cache functions by name.
2021-06-03 11:10:35 +02:00
Alex Beregszaszi
e39433198d
Remove the usage of boost::noncopyable
...
Prior to this half of the codebase used explicit deleted copy constructors, the others used boost::noncopyable.
2021-04-23 14:57:01 +01:00
Mathias Baumann
e590a99f39
Detect circular references for library and free functions
2021-03-30 23:06:30 +02:00
chriseth
e877e2bba7
Use all referenced errors.
2021-03-30 21:15:46 +02:00
chriseth
fb67051467
Revert statement.
2021-03-30 21:15:46 +02:00
chriseth
b04b189959
Syntax for custom errors.
2021-03-30 21:15:18 +02:00
chriseth
99fcf62736
Extract referencedDeclaration as helper.
2021-03-24 17:01:50 +01:00
Mathias Baumann
e197ebbdd1
Replace TypePointer
with Type const*
2021-03-23 11:47:19 +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
chriseth
b965446182
Catch panic.
2020-12-22 11:08:44 +01: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
chriseth
a0a02f2307
Merge remote-tracking branch 'origin/develop' into breaking
2020-11-23 19:28:08 +01:00
Leonardo
ae8f484ed4
Merge pull request #10234 from ethereum/smt_named_arguments
...
[SMTChecker] Support named arguments in function calls
2020-11-20 12:24:51 -01:00
Leonardo Alt
e4339b0526
[SMTChecker] Support named arguments in function calls
2020-11-20 11:52:26 -01:00
Alex Beregszaszi
82997fbf5e
Change AST::interfaceId() to uint32_t
2020-11-19 23:33:08 +00:00
chriseth
5ffee049fa
Merge remote-tracking branch 'origin/develop' into breaking
2020-11-03 14:05:14 +01:00