diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-17 04:44:51 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-17 04:57:23 +0900 |
| commit | 90b3be462bd2f91ef366df06c2b5bbae2821a394 (patch) | |
| tree | 06fa0e79b4437619ab59718566c2e632c4c9df89 /crates/shirabe-php-shim/src/lib.rs | |
| parent | 8d6dbf51af859ad0017ed8d1358824d9386d48c8 (diff) | |
| download | php-shirabe-90b3be462bd2f91ef366df06c2b5bbae2821a394.tar.gz php-shirabe-90b3be462bd2f91ef366df06c2b5bbae2821a394.tar.zst php-shirabe-90b3be462bd2f91ef366df06c2b5bbae2821a394.zip | |
fix(class-map-generator): introduce CaptureKey enum and fix class-map-generator compile errors
- Add CaptureKey enum to Preg stub for typed capture access (by index or name)
- Expand Preg stub with complete method set matching the PHP Composer\Pcre\Preg API
- Update class-map-generator, php-file-cleaner, and php-file-parser to use new API
- Add Display impls for exception types in shirabe-php-shim
- Add follow_links/exclude stubs to Finder and new/get_pathname stubs to SplFileInfo
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-shim/src/lib.rs')
| -rw-r--r-- | crates/shirabe-php-shim/src/lib.rs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index 2c09d7c..4b4d719 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -71,36 +71,72 @@ pub struct RuntimeException { pub code: i64, } +impl std::fmt::Display for RuntimeException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct UnexpectedValueException { pub message: String, pub code: i64, } +impl std::fmt::Display for UnexpectedValueException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct InvalidArgumentException { pub message: String, pub code: i64, } +impl std::fmt::Display for InvalidArgumentException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct LogicException { pub message: String, pub code: i64, } +impl std::fmt::Display for LogicException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct BadMethodCallException { pub message: String, pub code: i64, } +impl std::fmt::Display for BadMethodCallException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct OutOfBoundsException { pub message: String, pub code: i64, } +impl std::fmt::Display for OutOfBoundsException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct ErrorException { pub message: String, @@ -110,6 +146,12 @@ pub struct ErrorException { pub lineno: i64, } +impl std::fmt::Display for ErrorException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + pub fn is_bool(value: &PhpMixed) -> bool { todo!() } |
