aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/seld/json_lint
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-09 11:20:24 +0900
committernsfisis <nsfisis@gmail.com>2026-08-09 11:20:24 +0900
commita8a4b54b90e6433cf4a25a88a4765243f831ebef (patch)
tree91cceee5d792c6973e7a053a36d60441ce30bf64 /crates/shirabe-external-packages/src/seld/json_lint
parent6051927c8fa32cfffa102d2a170c5a6cf747a1b9 (diff)
downloadphp-shirabe-a8a4b54b90e6433cf4a25a88a4765243f831ebef.tar.gz
php-shirabe-a8a4b54b90e6433cf4a25a88a4765243f831ebef.tar.zst
php-shirabe-a8a4b54b90e6433cf4a25a88a4765243f831ebef.zip
refactor(seld-json-lint): extract seld/json_lint into the shirabe-seld-json-lint crate
Move `Seld\JsonLint` out of shirabe-external-packages and into its own crate, so the path is `shirabe_seld_json_lint::ParsingException` instead of `shirabe_external_packages::seld::json_lint::ParsingException`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src/seld/json_lint')
-rw-r--r--crates/shirabe-external-packages/src/seld/json_lint/parsing_exception.rs45
1 files changed, 0 insertions, 45 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
deleted file mode 100644
index 9d3eaa57..00000000
--- a/crates/shirabe-external-packages/src/seld/json_lint/parsing_exception.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-//! ref: composer/vendor/seld/jsonlint/src/Seld/JsonLint/ParsingException.php
-
-#[derive(Debug, Clone, Default)]
-pub struct ParsingExceptionLoc {
- pub first_line: i64,
- pub first_column: i64,
- pub last_line: i64,
- pub last_column: i64,
-}
-
-#[derive(Debug, Clone)]
-pub enum ParsingExceptionToken {
- Name(String),
- Symbol(i64),
-}
-
-#[derive(Debug, Clone, Default)]
-pub struct ParsingExceptionDetails {
- pub text: Option<String>,
- pub token: Option<ParsingExceptionToken>,
- pub line: Option<i64>,
- pub loc: Option<ParsingExceptionLoc>,
- pub expected: Option<Vec<String>>,
-}
-
-#[derive(Debug)]
-pub struct ParsingException {
- inner: shirabe_php_shim::Exception,
- pub(crate) details: Box<ParsingExceptionDetails>,
-}
-
-impl ParsingException {
- pub fn new(message: String, details: ParsingExceptionDetails) -> Self {
- Self {
- inner: shirabe_php_shim::Exception::new(message),
- details: Box::new(details),
- }
- }
-
- pub fn get_details(&self) -> &ParsingExceptionDetails {
- &self.details
- }
-}
-
-shirabe_php_shim::impl_php_exception!(ParsingException, inner, r"Seld\JsonLint\ParsingException");