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
2d1e7d9504
Merge pull request #8931 from random-internet-cat/lazy-init
...
Add LazyInit
2020-05-14 18:54:19 +02:00
Jason Cobb
cffd1eaff1
Use LazyInit for ContractDefinition::m_interfaceFunctionList
2020-05-14 10:32:01 -04:00
Jason Cobb
413fa92cee
Use LazyInit for ContractDefinition::m_interfaceEvents
2020-05-14 10:29:29 -04:00
chriseth
3872a1f000
Add support for SPDX license identifiers.
2020-05-13 18:16:59 +02:00
hrkrshnn
e2e32d372f
virtual modifiers (in Abstract contracts) allow empty bodies
2020-04-23 17:26:59 +05:30
chriseth
a371910674
Merge pull request #8642 from ethereum/interfaceid
...
Add support for interfaceId.
2020-04-23 12:24:49 +02:00
Alexander Arlt
3754a86ab2
Add support for interfaceID.
2020-04-16 12:17:40 -05:00
Daniel Kirchner
f6d1cee06b
Ensure that public callable parameters are valid for calldata.
2020-04-16 17:23:20 +02:00
Daniel Kirchner
df1809f8da
Annotate struct definitions with a recursive flag.
2020-04-16 16:42:12 +02:00
chriseth
aff1e93caa
Merge pull request #8571 from aarlt/clang-tidy-apply-modernize-pass-by-value
...
clang-tidy: Apply modernize-pass-by-value.
2020-04-15 12:06:25 +02:00
Christian Parpart
3b83365b42
[libsolidity] TryStatement: Adding AST accessors for success/structured/fail clauses.
2020-04-14 18:39:08 +02:00
Alexander Arlt
aac7a1e434
Apply modernize-pass-by-value.
2020-04-14 10:32:13 -05:00
chriseth
236eff8416
Export immutability.
2020-04-07 17:30:54 +02:00
Djordje Mijovic
8cc16eb128
Refactoring nextConstructor by moving it from CompilerContext to ContractDefinition
2020-04-06 17:35:08 +02:00
Mathias Baumann
ac7b31e559
Validate immutable variables
2020-04-02 13:52:27 +02:00
Mathias Baumann
9a8ca6ca33
Always return this
for EventDefinition::resolveVirtual
...
Instead of asserting.
2020-04-02 13:52:27 +02:00
chriseth
173f234860
Refactor: Replace inheritance hierarchy by most derived contract.
2020-03-26 18:27:39 +01: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
Jason Cobb
6db0d50094
Don't use identifiers starting with an underscore followed by an uppercase letter
2020-02-17 12:44:39 -05:00
Erik Kundt
f2701db0aa
Adds documentation for Solidity source upgrader.
2020-02-05 16:52:54 +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
Daniel Kirchner
ee5ff4df4e
Clean up visibility via contract name and fix ICE on calling unimplemented base function.
2020-01-16 19:13:04 +01:00
djudjuu
e8556fa1b2
Ast-Import from standard-json
2020-01-14 17:15:53 +01:00
Jason Cobb
3726f7448e
Remove now-unused abstractAnnotation helper
2020-01-09 08:44:24 -05:00
Jason Cobb
dc380f017f
Make CallableDeclaration::annotation pure virtual
2020-01-09 08:37:32 -05:00
Jason Cobb
dc6c19cafa
Add methods for AST annotation implementation
2020-01-09 08:37:32 -05: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
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
Jason Cobb
529405deb6
Move ContractKind from ContractDefinition to file-scope
2020-01-07 09:11:29 -05:00
Jason Cobb
6679f92c8a
Move all references to scope into annotation
2019-12-19 21:45:16 -05:00
Jason Cobb
69fd185903
Add new annotations for Scopables
2019-12-19 21:45:16 -05:00
Jason Cobb
be14d5f28d
Add DeclarationAnnotation
2019-12-19 21:45:16 -05:00
Gaith Hallak
371e6a4801
Add function selector to FunctionDefinition AST JSON
2019-12-16 15:16:54 +03:00
chriseth
90feb8f72a
Move Visibility out of Declaration.
2019-12-11 00:38:59 +01:00
chriseth
152f42c6b2
Make ambigous override checker generic.
2019-12-09 18:41:39 +01:00
chriseth
1ebcc757e1
Merge remote-tracking branch 'origin/develop' into develop_060
2019-11-27 19:14:08 +01:00
chriseth
23181f549e
Remove plain new operators from AST.
2019-11-27 18:03:09 +01:00
Mathias Baumann
5b8ff78176
Implement virtual keyword
2019-11-14 11:49:39 +01:00
Mathias Baumann
7d4e4b6088
Parse "virtual" keyword
2019-11-13 13:28:01 +01:00
Daniel Kirchner
8148619d5b
Merge branch 'develop' into develop_060
2019-11-12 10:32:41 +01:00
Mathias Baumann
e35a23bbcc
Add `switch (..)
to style checker
2019-11-11 17:44:21 +01:00
Daniel Kirchner
3321fc56ea
Split fallback function and introduce "fallback()" and "receive()" syntax.
2019-11-04 17:17:58 +01:00
Alexander Arlt
62950a9234
Support for abstract contracts.
2019-11-01 14:54:47 -05:00
Mathias Baumann
b76106fc4a
Parse override keyword for modifier definitions
2019-10-30 17:31:33 +01:00
chriseth
edf1e83fda
Merge remote-tracking branch 'origin/develop' into develop_060
2019-10-28 15:21:49 +01:00
Christian Parpart
df729b3084
Make use of C++17 std::optional<> instead of boost::optional<>.
2019-10-28 11:39:30 +01:00
chriseth
f884373142
Merge branch 'origin/develop' into develop_060
2019-10-02 16:29:36 +02:00
Christian Parpart
00d7dac15f
Fixes source location in warning for shadowing import delcarations.
2019-09-30 11:45:46 +02:00
chriseth
8e736a9f49
Type Checker for try/catch.
2019-09-23 17:22:56 +02:00
chriseth
a66c354698
AST for try and catch.
2019-09-23 17:22:09 +02:00
Daniel Kirchner
4782c800ec
Initial introduction of array slices with partial implementation for dynamic calldata arrays.
2019-09-13 10:57:53 +02:00
Leonardo Alt
5cfe0b7670
Allow explicit conversion from address to address payable
2019-09-09 23:46:00 +02:00
Mathias Baumann
24716404f8
Parse override keyword
2019-08-26 17:34:21 +02:00
Leonardo Alt
7b22496b1f
[SMTChecker] Fix ICE when inlining functions that use state vars and are in a different source
2019-08-09 17:50:52 +02:00
rocky
7fd7cc1e76
Produce AST even when there are parser errors
2019-08-07 15:25:53 +02:00
chriseth
9a00729ce7
Provide dialect to Parser and InlineAssembly AST nodes.
2019-05-23 00:24:58 +02:00
Leonardo Alt
dcd6cb94bf
Add function that retrieves first FunctionDefinition up the scope path
2019-05-09 09:15:11 +02:00
Christian Parpart
bf43eebea9
libsolidity: Introducing TypeProvider API, for clear type system ownership.
2019-04-16 18:26:45 +02:00
Mathias Baumann
9052a8f050
Move FunctionType::returnParameters() to CallableDeclaration
...
all the other functions of that type are also found there.
2019-03-06 11:13:01 +01:00
Mathias Baumann
b2262d67f0
Remove unused variable Contractdefinition::m_linearizedBaseContracts
2019-03-06 11:13:01 +01:00
Mathias Baumann
c65a96d189
Small documentation fixes in the code
2019-02-21 12:54:39 +01:00
chriseth
1a823f0bf8
Fix tabs/spaces.
2019-02-13 17:05:48 +01:00
Alex Beregszaszi
7b759866cb
Merge pull request #5817 from ethereum/refactoring
...
Refactoring in TypeChecker and ContractDefinition
2019-01-18 11:36:49 +00:00
Daniel Kirchner
a766efc79f
Add ContractDefinition::isInterface.
2019-01-18 12:11:35 +01:00
chriseth
a9fa2658d8
Add helper to show if contract can be deployed.
2019-01-17 20:36:48 +01:00
Leonardo Alt
b185d01a26
Sort includes in libsolidity/ast
2018-12-17 15:33:15 +01:00
Christian Parpart
ec47c8946b
Isolating libyul library API into its own namespace yul
.
2018-11-23 14:29:00 +01:00
Christian Parpart
d67322a186
Introduce namespace langutil
in liblangutil directory.
...
Also:
- Use {}-style list initialisation for SourceLocation construction
- Introduce new system includes
- Changes the API of the Scanner to take source as value (with move) as opposed to as a reference
2018-11-21 19:13:44 +00:00
Christian Parpart
87821c53c3
Isolating files shared between Yul- and Solidity language frontend.
2018-11-21 18:58:12 +00:00
mordax
ea8b7d803e
Removing redundant virtual from override function declaration
...
Remove trailing whitespace
Remove changelog change
2018-11-21 14:37:32 +00:00
chriseth
2cc304fd3f
Fix for style.
2018-11-12 09:15:22 +01:00
Christian Parpart
f112377dd4
Refactor solidity::Token
into an enum class
with TokenTraits
helper namespace
2018-10-22 17:00:51 +02:00
Christian Parpart
9fb835b710
Fixes #5051 (introduced in #4684 ), effectively allowing underscores in address literals.
2018-10-02 15:37:15 +02:00
Daniel Kirchner
1ce3581a52
Accept `address payable
` during parsing.
2018-09-11 14:52:23 +02:00
Chase McDermott
551e0bf47c
Rename Location::Default to Location::Unspecified.
2018-08-17 18:15:22 -05:00
Chase McDermott
683bce1869
Refactor data location check.
2018-08-14 18:07:15 +02:00
Christian Parpart
4c90ddf64a
libsolidity: Remove dead code wrt. VariableDeclaration::canHaveAutoType()
...
Closes #4667
2018-08-07 11:34:13 +02:00
Alex Beregszaszi
bd75d4268b
Move fullyQualifiedName to ContractDefinition only
2018-08-06 18:58:27 +02:00
Erik Kundt
182a0a9551
Disallows old constructor syntax.
2018-07-18 14:29:01 +02:00
Daniel Kirchner
fc370591f0
Disallow multi variable declarations with mismatching number of values.
2018-07-12 20:33:51 +02:00
Cryptomental
140dbfdbd8
Code, Changelog, ReleaseChecklist: Fix typos.
...
Refs: #4442
2018-07-11 00:26:23 +02:00
chriseth
187eef36ad
Remove mentions of `var
` in VariableDeclarationStatement comment.
2018-07-10 14:55:50 +02:00
mingchuan
b7cafcbdf9
Allow using calldata
keyword to specify data location
2018-05-30 18:05:55 +08:00
Alexander Arlt
f94b793472
Add virtual destructors on base classes.
2018-05-02 13:29:16 +02:00
chriseth
f00bb43593
Allow function overloads involving MagicVariableDeclarations.
2018-04-12 13:09:37 +02:00
chriseth
17fc0f54b5
Use FunctionTypePointer (adds `const
`).
2018-04-12 13:09:37 +02:00
Daniel Kirchner
3eedbc6a9c
Error when using no parentheses in modifier-style constructor calls.
2018-04-10 12:09:34 +02:00
Daniel Kirchner
96eff0ff6a
Error when using empty parenthesis for base class constructors that require arguments.
2018-04-05 11:52:22 +02:00
Daniel Kirchner
d664a599e6
Constructors are defined using the `constructor
` keyword.
2018-04-03 18:21:55 +02:00
Alex Beregszaszi
8bae2dba7c
Introduce inContractKind helper on FunctionDefinition
2018-03-26 11:37:38 +01:00
chriseth
eecc26deec
Make external library functions accessible.
2018-03-13 17:18:46 +01:00
chriseth
6b9dda06f3
Enable C99-scoping with the 0.5.0-experimental pragma.
2018-02-27 12:17:25 +01:00
chriseth
e6d48bb72a
Blocks and for loops can be scopes.
2018-02-27 12:17:25 +01:00
chriseth
5f20129e65
Scopes do not have to be declarations.
2018-02-27 12:17:25 +01:00
chriseth
388718b59f
Introduce emit statement.
2018-02-22 15:17:30 +01:00