Skip to content

[DO NOT MERGE] Backlog for recovery-related changes #718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
37e791c
Implement recovery in `eat`
ahoppen Sep 1, 2022
7b293c9
Eliminate `eat` from the parser
ahoppen Sep 2, 2022
1a4abbd
Sink a few functions from Parser down to TokenConsumer
ahoppen Sep 3, 2022
68f04a6
Improve token precedence classifications
ahoppen Sep 5, 2022
344d281
Some trivial similifications of `self.at` to `consume(if:)` or `at(an…
ahoppen Sep 3, 2022
aa66919
Transformations from `self.at` to `self.at(anyIn:)`
ahoppen Sep 3, 2022
1c1d2c3
Rename expectWithoutLookahead to expectWithoutRecovery
ahoppen Sep 5, 2022
4ad4b08
Change `consume(ifAny:)` to take an array instead of variadig arguments
ahoppen Sep 5, 2022
1f3e947
Sink some more parser primitives to TokenConsumer
ahoppen Sep 5, 2022
a658e47
Rename consumeIdentifer -> expectIdentifier and remove consumeInteger
ahoppen Sep 5, 2022
cf4605f
Implement a common paradigm for `at`, `consume` and `expectWithoutRec…
ahoppen Sep 5, 2022
839c091
Remove variadic arguments version of `at(any:)`
ahoppen Sep 5, 2022
2ee43c3
Rename `consume(remapping:)` -> `consumeAnyToken(remapping:)`
ahoppen Sep 5, 2022
2ffee35
Eliminate isIdentifier from Lexeme
ahoppen Sep 5, 2022
c25ecc1
AMEND: Implement a common paradigm for `at`, `consume` and `expectWit…
ahoppen Sep 5, 2022
675af89
Replace `isContextualKeyword` by `atContextualKeyword` where possible
ahoppen Sep 5, 2022
e3a2a43
Replace access to currentToken.tokenText by higher level parser primi…
ahoppen Sep 5, 2022
cab4d3f
Replace currentToken.tokenKind by higher level parser primitives wher…
ahoppen Sep 5, 2022
0c87d66
Migrate some more accesses to `currentToken` regarding punctuators to…
ahoppen Sep 5, 2022
ed8d90c
Prevent lookahead from `RawTokenKindSubset`
ahoppen Sep 5, 2022
7d97c2e
Allow checking whether a lexeme matches the specification in `RawToke…
ahoppen Sep 5, 2022
db41d31
Migrate `canBeArgumentLabel` to a `RawTokenKindSubset`
ahoppen Sep 5, 2022
d1efd64
Migrate `isBinaryOperator` and `isAnyOperator` to `RawTokenKindSubset`
ahoppen Sep 5, 2022
7c3eb1a
Allow specifying how tokens should be remapped in `RawTokenKindSubset`
ahoppen Sep 5, 2022
887e4fb
Migrate `isEffectsSpecifier` to RawTokenKindSubset
ahoppen Sep 5, 2022
17e83aa
Migate `isPossibleDeclStart` to `RawTokenKindSubset`
ahoppen Sep 5, 2022
8e2f865
Migate a few places of currentToken.isAtStartOfLine to `at(:where:)`
ahoppen Sep 5, 2022
4a4ac37
Remove parser `where` condtion in parser primitives
ahoppen Sep 5, 2022
f91e6c0
Migrate `isStartOfStatement` to `RawTokenKindSubset`
ahoppen Sep 5, 2022
55860dc
Migrate a few uses of `consumeAnyToken` to higher level parser constr…
ahoppen Sep 6, 2022
735f358
Rewrite isStartOfDeclaration to more closesly match the parser implem…
ahoppen Sep 5, 2022
aca5e7d
Add a check whether a code block item appears to be an expression
ahoppen Sep 1, 2022
beffd61
Change precedence of `import` keyword to `declKeyword`
ahoppen Sep 1, 2022
7c9a29b
Remove check that a token’s SyntaxArena must contain the token’s text
ahoppen Sep 6, 2022
20debb1
Support recovery in front of declarations
ahoppen Sep 6, 2022
baa8386
Improve diagnostic message if unexpected tokens are found at the star…
ahoppen Sep 1, 2022
ef84ec3
Refactor loop for `#if` directive parsing
ahoppen Sep 1, 2022
c86e7af
Refactor `canRecoverTo` to return a `RecoveryConsumptionHandle`
ahoppen Sep 6, 2022
05be28f
Improve recovery in `#if` blocks
ahoppen Sep 6, 2022
2f31cbc
Add a `nameForDiagnostics` to tokens
ahoppen Sep 6, 2022
05b8d47
Make `TokenKind` composition and decomposition work based on `String`…
ahoppen Aug 30, 2022
437a61e
Improve diagnostic in `testMissingArgumentToAttribute`
ahoppen Aug 30, 2022
1a33c49
Use token nameForDiagnostics to generate diagnostic messages
ahoppen Sep 6, 2022
fd550c3
Improve diagnostics for invalid identifiers
ahoppen Sep 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ let package = Package(
),
.target(
name: "SwiftParser",
dependencies: ["SwiftDiagnostics", "SwiftSyntax"],
dependencies: ["SwiftDiagnostics", "SwiftSyntax", "SwiftSyntaxBuilder"],
exclude: [
"CMakeLists.txt",
"README.md",
Expand Down
Loading