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
Please register or sign in to comment