From 53800ab77565de1c16fb8a95e047eba1cb3a160c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 5 Jun 2026 03:17:01 +0900 Subject: 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) --- crates/shirabe/src/json/json_file.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/json/json_file.rs') 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()) -- cgit v1.3.1