-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[smithy-rs] Compile regexes for
@pattern
strings early (#2058)
* Add docs for `compile_regex()` * Try to pass `@pattern` string shapes to service visitor * Add `compile_rege` calls * Remove unwanted changes * Fix python code generator * Add hack for `@pattern` + `@enum` trait * Generate tests for regexes * Move some functionality to `TraitInfo` * Add docs for `Symbol.testModule` * Improve docs for `Symbol.testModule` * Update codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ConstrainedStringGenerator.kt Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com> * Refactor `regex_compiles` test rendering * Refactor `Symbol.testModule` -> `SymbolProvider.testModuleForShape` * Use `RustWriter.unitTest` instead of manually annotating `#[test]`s * Refactor `mapNotNull` -> `filter` + `map` * Only render doc comment when there's `@pattern` strings * Rename `String.toRustName` -> `´String.unsafeToRustName` * Add kotlin test for pattern with lookahead * Update `Attribute.Cfg` to new `Attribute.CfgTest` * Prepend `@pattern` docs * Fix test name Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>
- Loading branch information
1 parent
9cdc0bc
commit b9e5eb7
Showing
2 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters