aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/json
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-05 03:17:01 +0900
committernsfisis <nsfisis@gmail.com>2026-06-05 03:17:01 +0900
commit53800ab77565de1c16fb8a95e047eba1cb3a160c (patch)
tree9dbfa9f098f7c2b75651c16220d3c57a9bbbd1a1 /crates/shirabe/src/json
parent9a25fcfc82b72f60facd381786ca5490acca032c (diff)
downloadphp-shirabe-53800ab77565de1c16fb8a95e047eba1cb3a160c.tar.gz
php-shirabe-53800ab77565de1c16fb8a95e047eba1cb3a160c.tar.zst
php-shirabe-53800ab77565de1c16fb8a95e047eba1cb3a160c.zip
feat(json-lint): port ParsingException details into a typed struct
Replace the Phase B stub that discarded ParsingException details with a dedicated ParsingExceptionDetails struct (text/token/line/loc/expected), modeling the PHP string|int token union as a ParsingExceptionToken enum. Wire JsonFile::validate_syntax to forward the source details and let Application read the error line from the typed accessor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/json')
-rw-r--r--crates/shirabe/src/json/json_file.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/src/json/json_file.rs b/crates/shirabe/src/json/json_file.rs
index 33496df..0b1b010 100644
--- a/crates/shirabe/src/json/json_file.rs
+++ b/crates/shirabe/src/json/json_file.rs
@@ -535,7 +535,7 @@ impl JsonFile {
"The input does not contain valid JSON\n{}",
result.get_message()
),
- None,
+ result.get_details().clone(),
),
Some(f) => ParsingException::new(
format!(
@@ -543,7 +543,7 @@ impl JsonFile {
f,
result.get_message()
),
- None,
+ result.get_details().clone(),
),
}
.into())