Lazaridis
e454737a3c
adapt to latest code changes
2018-11-23 17:27:52 +01:00
Christian Parpart
ec47c8946b
Isolating libyul library API into its own namespace yul
.
2018-11-23 14:29:00 +01:00
Christian Parpart
713d94476e
Reorder some include files and group <libyul/>'s together (as much as possible)
2018-11-23 12:37:19 +01:00
Christian Parpart
0f4ed52a71
Rewrite header paths to adapt to recent git mv
of libsolidity/inlineasm to libyul
2018-11-23 11:18:57 +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
Leonardo Alt
9a4fd946c3
Add Scanner function that prints source based on SourceLocation
2018-11-13 13:49:29 +01:00
chriseth
af65bac737
Remove trailing whitespace.
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
chriseth
06200b4b64
Merge pull request #5180 from ethereum/cpp-cleanup
...
Some C++ cleanup
2018-10-10 11:43:42 +02:00
Alex Beregszaszi
6c3d12d85b
Do not require ctype/stdio if not needed
2018-10-09 19:06:22 +01:00
Lazaridis
4bcd89105c
provide general hex-literal error message, fixes #1802
...
dummy
2018-10-09 06:51:19 +03:00
Alex Beregszaszi
fa0ce6a7e7
Use empty() instead of size() == 0
2018-10-09 04:29:37 +01:00
chriseth
d76bfcd935
Fix typos.
2018-10-04 13:28:16 +02:00
hydai
b409faa675
Disallow uppercase X in hex number literals
2018-09-19 22:01:15 +08:00
Daniel Kirchner
1ce3581a52
Accept `address payable
` during parsing.
2018-09-11 14:52:23 +02:00
chriseth
0b7b8162ca
This fixes several bugs with regards to line breaks and comments:
...
- any unicode line break (line feed, vertical tab, form feed, carriage
return, NEL, LS and PS) is considered to terminate a single-line
comment. The line break itself is considered to be the next token
after the comment, leading to a parser error if it is not an
ascii character (i.e. for NEL, LS and PS).
- unterminated multiline comments are considered illegal tokens
- '/** /' is considered an unterminated multiline comment
(previously, whitespace was allowed before the last '/'
2018-09-06 16:42:59 +02:00
chriseth
977ac9c390
Refactor handling of whitespace.
2018-09-06 16:42:59 +02:00
Daniel Kirchner
f020f96b6c
More consistently use parse*() functions without argument in the parser.
2018-09-06 14:55:07 +02:00
chriseth
85debe77d9
Merge pull request #4866 from bakaoh/issue4743
...
Fix#4743: Incorrect source location for nameless parameters
2018-09-04 20:21:03 +02:00
Daniel Kirchner
a102f3b783
Remove trailing whitespace for all files in the repository.
2018-09-04 11:30:30 +02:00
bakaoh
c458f5988b
Fix#4743: Incorrect source location for nameless parameters
2018-08-28 11:11:40 +07:00
Chase McDermott
551e0bf47c
Rename Location::Default to Location::Unspecified.
2018-08-17 18:15:22 -05:00
Christian Parpart
b9222808f6
Cleanup & polish numbers-with-underscores parsing, also improving tests.
2018-08-08 13:38:46 +02:00
Balajiganapathi S
09a36cba02
Add stricter hex underscore rules
2018-08-08 12:05:51 +02:00
Balajiganapathi S
0000bfc604
Allow underscores in numbers.
2018-08-08 12:05:51 +02:00
Erik Kundt
182a0a9551
Disallows old constructor syntax.
2018-07-18 14:29:01 +02:00
Cryptomental
140dbfdbd8
Code, Changelog, ReleaseChecklist: Fix typos.
...
Refs: #4442
2018-07-11 00:26:23 +02:00
Daniel Kirchner
3984beef7d
Remove constant keyword from parser.
2018-07-03 15:31:34 +02:00
Daniel Kirchner
e4b7b2160e
Add new reserved keywords.
2018-06-12 16:02:53 +02:00
Erik Kundt
2e9f5d1c98
Introduces emit token and removes identifier workaround.
2018-06-11 21:21:22 +01:00
Leonardo Alt
ac68710789
Disallow trailing dots that are not followed by a number
2018-05-30 15:14:53 +01:00
mingchuan
b7cafcbdf9
Allow using calldata
keyword to specify data location
2018-05-30 18:05:55 +08:00
chriseth
3ca6738114
Add assert about source location.
2018-05-16 03:52:24 +02:00
chriseth
67d208d144
Parse multi variable declaration statement.
2018-05-16 03:22:45 +02:00
Alex Beregszaszi
868d449c38
Merge pull request #4047 from ethereum/refactorToMulti
...
Refactor to allow implementing multi variable declarations.
2018-05-09 15:37:19 +01:00
chriseth
fe8f38a7a4
Assert integrity of empty IndexAccessPath structure.
2018-05-09 14:55:36 +02:00
Daniel Kirchner
02380113d4
Use the entire token as source location for parser errors.
2018-05-09 14:08:22 +02:00
chriseth
be54f48197
Further refactor.
2018-05-09 11:48:21 +02:00
chriseth
86b7adc18f
Refactor expression parser.
2018-05-09 11:48:21 +02:00
Alex Beregszaszi
cc10839073
Have more uniform parser errors
2018-05-04 13:27:05 +01:00
Alex Beregszaszi
c7ee649d80
More user friendly output in case of Identifier and Token keywords
2018-05-04 13:27:05 +01:00
Alex Beregszaszi
882248ce75
Remove code duplication in expectToken
2018-05-04 13:27:05 +01:00
Alex Beregszaszi
252bde8542
Introduce Token::friendlyName() helper
2018-05-04 13:11:23 +01:00
Alex Beregszaszi
e3279d8af8
Display nicer error messages in the parser (display tokens and not internal names)
2018-05-04 12:39:37 +01:00
Alex Beregszaszi
ed9f80690b
Simplify expectIdentifierToken by using expectToken
2018-05-03 22:10:51 +01:00
Alex Beregszaszi
73c99d15cd
Remove useless helper expectAssignmentOperator in parser
2018-05-03 21:35:38 +01:00
chriseth
d44fb03322
Refactor parser.
2018-04-26 10:59:02 +02:00
Leo Arias
b74566e4ea
docstring: add missing space
2018-04-23 21:47:53 +00:00
Daniel Kirchner
6862f22943
Fix internal compiler error when parsing `var
` declaration without identifier.
2018-04-12 14:57:14 +02:00
chriseth
b5a696ad48
Properly cope with constructor headers.
2018-04-11 22:00:21 +02:00
chriseth
2ad1acaf72
Warn if modifiers are applied to functions without implementation.
2018-04-11 22:00:21 +02:00
chriseth
6d289783b4
Fix state variable parsing.
2018-04-11 22:00:04 +02:00
Daniel Kirchner
3eedbc6a9c
Error when using no parentheses in modifier-style constructor calls.
2018-04-10 12:09:34 +02:00
chriseth
5b1c0506fa
Allow `memory
` suffix for internal elementary type parsing.
2018-04-05 16:06:04 +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
8f66390f56
Set isConstructor to false unconditionally and update to true later for constructors.
2018-04-03 18:21:55 +02:00
Daniel Kirchner
e2dac9ed39
Set header.isConstructor for old style constructors in parseFunctionHeader as well.
2018-04-03 18:21:55 +02:00
Daniel Kirchner
d664a599e6
Constructors are defined using the `constructor
` keyword.
2018-04-03 18:21:55 +02:00
Daniel Kirchner
0d0c9b8688
DocStringParser: Fix error message for empty parameter description.
2018-03-14 10:14:35 +01:00
chriseth
388718b59f
Introduce emit statement.
2018-02-22 15:17:30 +01:00
chriseth
e2bf5de8a2
Expect end of string at end of top-level block for assembly parser.
2018-02-21 00:41:39 +01:00
Federico Bond
14fd647b85
Fix event parsing. Refs #3175
2017-11-22 23:08:12 -03:00
chriseth
639b85f498
Fix source location of VariableDeclarationStatement.
2017-09-27 19:27:36 +02:00
wadeAlexC
0099911ace
Better error message for unexpected trailing comma in parameter lists
2017-09-25 10:42:01 +01:00
Alex Beregszaszi
6948758156
Limit parser recursion depth further (needed by increased assembly data structure size)
2017-09-20 11:16:23 +02:00
chriseth
122e65f8f4
Crash fix, parseTypeName can return null.
2017-08-28 15:13:02 +02:00
Alex Beregszaszi
da56bde58f
Move the break in switch for readability
2017-08-25 16:02:05 +01:00
Alex Beregszaszi
f2317670fa
Remove two other fall-through cases in Parser
2017-08-25 14:24:07 +01:00
Alex Beregszaszi
ef8355da7f
Remove fallthrough from literal parsing
2017-08-25 14:22:59 +01:00
Alex Beregszaszi
5668377c72
Introduce pure specifier on functions
2017-08-24 13:46:18 +01:00
chriseth
8af6f193bc
Merge pull request #2770 from ethereum/recursionInAsm
...
Also prevent too much recursion in the assembly parser.
2017-08-24 11:14:01 +02:00
Alex Beregszaszi
efe4d68a7b
Introduce view (and keep constant as an alias)
2017-08-22 18:24:22 +01:00
chriseth
628b54ce35
Reduce max recursion depth.
2017-08-22 12:44:23 +02:00
chriseth
692e4c57e8
Check recursion depth in assembly parser.
2017-08-22 12:44:22 +02:00
Alex Beregszaszi
2a5772cff7
Mark appropriate constructors explicit
2017-08-22 10:51:46 +01:00
Alex Beregszaszi
e2cfc9ee92
Mark a lot of functions const (where possible)
2017-08-22 10:51:46 +01:00
chriseth
32e43477c3
Prevent too deep recursion in parser.
2017-08-14 22:19:15 +02:00
Alex Beregszaszi
2a9ba937ba
Replace constant/payable with StateMutability in AST
2017-08-14 14:21:47 +01:00
Federico Bond
a8c047f48d
Enforce commas in tuple syntax
2017-08-11 17:28:48 +01:00
Alex Beregszaszi
b210db8058
Make toString(visibility) a helper
2017-08-09 14:58:59 +01:00
Alex Beregszaszi
efd45f64a5
Show previous visibility specifier in parser error
2017-08-09 14:30:17 +01:00
Alex Beregszaszi
a8ca623a0f
Add test for multiple visibilites on functions
2017-08-09 14:30:02 +01:00
Alex Beregszaszi
3b41cd3c23
Rename Token::Const to Token::Constant
2017-08-09 12:50:53 +01:00
chriseth
72917c4f35
Cleanup fixed point type changes
2017-07-19 22:13:42 +01:00
VoR0220
78769f3b39
Change fixed point types to have digit count
...
Signed-off-by: VoR0220 <rj@erisindustries.com>
2017-07-19 21:49:01 +01:00
Alex Beregszaszi
c99d049ac0
Update parser error for pragma/import/contract
2017-07-18 21:23:49 +01:00
Alex Beregszaszi
b615b01449
Move UndefMacros from libdevcore to libsolidity/parsing
2017-07-02 00:09:46 +01:00
Alex Beregszaszi
007ffe9430
Avoid including Scanner.h in ParserBase.h
2017-06-22 22:22:19 +01:00
Alex Beregszaszi
d5f8ce90c7
Merge interface/Exceptions and interface/Utils
2017-06-22 11:25:07 +01:00
chriseth
622703c0c0
Merge pull request #2409 from federicobond/trailing-commas-2
...
Improve error reporting of trailing commas
2017-06-19 12:01:19 +02:00
Federico Bond
d170ceaf3d
Display error if payable or constant is specified multiple times
2017-06-17 12:21:46 -03:00
Federico Bond
0eaae03bbf
Try to recover from parser errors where possible
2017-06-15 21:14:05 -03:00
Federico Bond
60bfae75e5
Improve error reporting of trailing commas
2017-06-15 13:10:08 -03:00
Federico Bond
fd8365df08
Forbid trailing commas in named arguments
2017-06-14 00:15:27 -03:00
Rhett Aultman
89b60ffbd4
Refactor error reporting
...
This commit introduces ErrorReporter, a utility class which consolidates
all of the error logging functionality into a common set of functions.
It also replaces all direct interactions with an ErrorList with calls to
an ErrorReporter.
This commit resolves issue #2209
2017-05-30 07:28:31 -07:00
Alex Beregszaszi
751c97ca19
Pull out common code to a helper
2017-05-26 21:40:14 +01:00
Alex Beregszaszi
48f58aa3f9
Remove duplicate code
2017-05-26 21:02:31 +01:00
Alex Beregszaszi
3459052ae8
Add scanner helpers to ParserBase
2017-05-26 20:44:34 +01:00
Alex Beregszaszi
2fefe3b549
Move Solidity specific methods from ParserBase to the Solidity Parser
2017-05-26 20:44:34 +01:00