Skip to content

[Integration] swift/main (51d587f) -> swift/release/5.7 #291

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 86 commits into from

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented Apr 15, 2022

No description provided.

hamishknight and others added 30 commits March 18, 2022 17:57
A quick pass to flip `/.../` out of the alternatives
and into the main syntax. Still needs a bunch of
work.

Also add some commentary on a regex with `]` as the
starting character.
…n. Split out Proposed solution from Detailed design. Parallelize the structure a bit better.
This isn't actually used, as we convert to a DSL
custom character class, and then use that consumer
logic.
Convert AST escape sequences that represent a
scalar value (e.g `\f`, `n`, `\a`) into scalars in
the DSL tree. This allows the matching engine to
match against them.
hamishknight and others added 25 commits April 12, 2022 17:53
- Add Source Compatibility section
- Condense comment syntax ambiguity section
- Mention `/.../` being less popular in some
communities
And remove the old version of the pitch.
Go from matchWhole -> wholeMatch(in:), which is more consistent with firstMatch etc.
This matches the ICU behavior, and appears to be
suggested by UTS#18.
Fix a dead link and example.
Rather than matching and not advancing the input,
we should always return `nil` to never match
against the trivia.
Previously we would check for an empty array of
members when deciding whether an initial `]` is
literal, or if the operands of a set operation are
invalid. Switch to checking whether we have any
semantic members instead.
Fix trivia in custom character classes
Add availability to public, SPI, and test symbols.
This should be unreachable, let's make sure of
that. Doing so requires generalizing the handling
of LocatedError a bit.
Previously we would always parse a
"change matching option" sequence as a group, and
for the isolated syntax e.g `(?x)`, we would have
it implicitly wrap everything after in the same
group by having it do a recursive parse.

This matched the Oniguruma behavior for such
isolated groups, and was easy to implement, but
its behavior is quite unintuitive when it comes
to alternations, as e.g `a(?x)b|c` becomes
`a(?x:b|c)`, which may not be expected.

Instead, let's follow PCRE's behavior by having
such isolated cases affect the syntax options for
the remainder of the current group, including
across alternation branches. This is done by
lexing such cases as atoms (as they aren't really
group-like anymore), and having them change the
syntax options when we encounter them. The existing
scoping rules around groups take care of resetting
the options when we exit the scope.
Tests now have flag `-disable-availability-checking` because XCTests always test the just-built modules, rather than the modules in the OS.
Add remaining availability annotations.
@rxwei rxwei requested a review from stephentyrone April 15, 2022 22:06
@rxwei rxwei changed the base branch from main to swift/release/5.7 April 15, 2022 22:07
@rxwei
Copy link
Contributor Author

rxwei commented Apr 15, 2022

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants