Skip to content

[Integration] main (f779459) -> swift/main #400

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

Merged
merged 29 commits into from
May 11, 2022

Conversation

hamishknight
Copy link
Contributor

No description provided.

natecook1000 and others added 29 commits May 2, 2022 15:05
This is defined in UAX#44 as being equivalent to
`Lu | Ll | Lt`.
This is a PCRE spelling for a cased letter.
* Add tests for AnyRegexOutput

Fix a few missing areas of functionality while we're at it
This switches `(...)` groups to being non-capturing,
with only named groups capturing.
* Add tests for UTS18 level support (incomplete)
* Implement canonical equivalence tests
* Fix canonical equivalence at different levels
* Test named chars x semantic level
* Enable loose matching on \N{...} scalar names
* Make Unicode property classes work with semantics
This allows specifying whether or not to perform
semantic checks on the AST. Some clients, e.g
syntax coloring, only care about the syntactic
structure. But other clients want errors to be
emitted for e.g unsupported constructs.
Start emitting errors for unsupported constructs,
and other semantic errors such as duplicate group
names.

Once we start emitting bytecode for regex at
compile time, these errors could potentially be
subsumed into the bytecode generator. But for now,
implement them as a separate pass.
Begin storing source location on capture lists,
and start erroring on duplicate named captures.
- Make `\h` and `\H` supported for now
- Check character class ranges
- Diagnose unquantifiable escape sequences
Implement \R, \v, \h for character/scalar modes and 
audit assertions and anchors for semantic level.
Removing this deprecation warning, as it's just generating noise.
We may still eventually want to remove _CharacterClassModel.matchLevel
along with other refactoring in the future.
I wasn't aware of this Unicode property when
initially implementing this. It's a more restricted
set of whitespace that Unicode reccommends for
parsing patterns. It's the same set of whitespace
used for extended syntax.

UAX44-LM3 itself doesn't appear to specify the
exact set of whitespace to match against, but this
is no more restrictive than the engines I'm aware
of.
This allows us to store the source location of the
inner scalar value.
Allow a whitespace-separated list of scalars within
the `\u{...}` syntax. This is syntactic sugar that
gets implicitly splatted out, for example `\u{A B C}`
becomes `\u{A}\u{B}\u{C}`.
`curIdx` is an index of `astChildren`, not
`children`.
The `predicate` may independently advance the
location before bailing, and we don't want that
to affect the recorded location of the result. We
probably ought to replace `lexUntil` with a better
API.
…tlang#392)

- Explicitly ask the compiler not to implicitly import _StringProessing. This is to avoid a circular dependency when `-enable-experimental-string-processing` is enabled by default.
- Unify the build flags for modules that are built in the compiler repo into a `stdlibSettings` value.
- Disable implicit _Concurrency import as well since it is how it's built in the compiler repo. This helps us catch errors before we integrate with the compiler repo.
- Remove `-enable-experimental-pairwise-build-block` since SE-0348 has been implemented and enabled.
- Update the minimum toolchain requirement to 2022-04-20.
This adds start/end anchors ^ and $, groups that form zero-width
assertions, and option-changing groups without content `(?i)...`
@hamishknight
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@milseman milseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hamishknight hamishknight merged commit f0a4590 into swiftlang:swift/main May 11, 2022
@hamishknight hamishknight deleted the main-merge branch May 11, 2022 17:25
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.

4 participants