aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/seld/json_lint/parsing_exception.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-20 08:33:49 +0900
committernsfisis <nsfisis@gmail.com>2026-05-20 08:33:57 +0900
commitf31b101ce1e921a026ba234b1f0a83b0392bc118 (patch)
treeb7ac2aa84d71ebd162cc21aeab0240e7e0544988 /crates/shirabe-external-packages/src/seld/json_lint/parsing_exception.rs
parent5e31fa33c3b5cf726a57a063b8e7a070869250fe (diff)
downloadphp-shirabe-f31b101ce1e921a026ba234b1f0a83b0392bc118.tar.gz
php-shirabe-f31b101ce1e921a026ba234b1f0a83b0392bc118.tar.zst
php-shirabe-f31b101ce1e921a026ba234b1f0a83b0392bc118.zip
fix(compile): fix all remaining compile errors
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src/seld/json_lint/parsing_exception.rs')
-rw-r--r--crates/shirabe-external-packages/src/seld/json_lint/parsing_exception.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/shirabe-external-packages/src/seld/json_lint/parsing_exception.rs b/crates/shirabe-external-packages/src/seld/json_lint/parsing_exception.rs
index 3ec6b6b..b756c1b 100644
--- a/crates/shirabe-external-packages/src/seld/json_lint/parsing_exception.rs
+++ b/crates/shirabe-external-packages/src/seld/json_lint/parsing_exception.rs
@@ -4,6 +4,21 @@ pub struct ParsingException {
pub code: i64,
}
+impl ParsingException {
+ pub fn new(message: String, _details: Option<shirabe_php_shim::PhpMixed>) -> Self {
+ Self { message, code: 0 }
+ }
+
+ pub fn get_message(&self) -> &str {
+ &self.message
+ }
+
+ pub fn get_details(&self) -> indexmap::IndexMap<String, shirabe_php_shim::PhpMixed> {
+ // TODO(phase-b): PHP ParsingException exposes ['text', 'line', 'token'] details
+ indexmap::IndexMap::new()
+ }
+}
+
impl std::fmt::Display for ParsingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.message)