Commit Graph
14 Commits
Author SHA1 Message Date
alex 3416c029cf Relaxed assert in AsmJsonImporter::createAsmNode. 2020-02-04 20:37:51 +01:00
alex 211227f50b Modified SourceLocation::hasText() to allow empty source. 2020-02-04 04:19:28 +01:00
alex e4b18e85e6 Replaced SourceLocation::isEmpty() with isValid() and hasText().
The function SourceLocation::isEmpty() had somewhat dual role.
Sometimes it indicates that the SourceLocation is invalid.
Sometimes it means that there is no corresponding source text.

Hence the proposal is to replace it with two functions, isValid() and hasText().

I also removed Scanner::sourceAt(). (Do we have a rule of thumb to remove unused code?)

Since hasText() checks that start and end are valid indices for source, I adjusted a couple of tests to avoid empty source strings.
2020-02-03 08:04:21 +01:00
Mathias Baumann 00e4d13975 TestFramework: Merge Options.h into Common.h 2020-01-29 12:27:05 +01:00
Mathias Baumann 2f1f8e25c1 TestFramework: Remove headers from Options.h 2020-01-28 17:29:22 +01:00
Christian Parpart ed45b000d1 Adapt tests directory to C++ namespace changes. 2020-01-07 15:51:50 +01:00
rockyandchriseth ca3afea1d7 Add Steve Johnson-style parser recovery rules:
SourceUnit = Error $
    Block = '{' Error '}'
    ContractDefinition = '{' Error '}'
    Statement = Error ';'

Co-Authored-By: chriseth <chris@ethereum.org>
2019-06-17 14:47:07 +02:00
chriseth 4ee703e6e5 Revert "Add Steve Johnson-style parser recovery rules:"
This reverts commit 97f8ee0d1b.
2019-05-28 18:09:24 +02:00
rockyandchriseth 97f8ee0d1b Add Steve Johnson-style parser recovery rules:
SourceUnit = Error $
    Block = '{' Error '}'
    ContractDefinition = '{' Error '}'
    Statement = Error ';'

Co-Authored-By: chriseth <chris@ethereum.org>
2019-05-28 15:06:34 +02:00
chriseth 1a823f0bf8 Fix tabs/spaces. 2019-02-13 17:05:48 +01:00
Christian Parpart d10bae245e liblangutil: SourceLocation to default initialize data members (w/o the use of ctor)
See: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c45-dont-define-a-default-constructor-that-only-initializes-data-members-use-in-class-member-initializers-instead
2018-12-19 11:21:45 +01:00
Christian Parpart c48a5264be liblangutil: SourceLocation: adds (shared) pointer to underlying CharStream source, eliminating sourceName
Also, adapted affecting code to those changes.
2018-11-30 17:07:12 +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