nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
manual: CI check with nitunit
[nit.git]
/
lib
/
json
/
error.nit
diff --git
a/lib/json/error.nit
b/lib/json/error.nit
index
dab1689
..
f13d2fc
100644
(file)
--- a/
lib/json/error.nit
+++ b/
lib/json/error.nit
@@
-8,24
+8,16
@@
# You are allowed to redistribute it and sell it, alone or is a part of
# another product.
# You are allowed to redistribute it and sell it, alone or is a part of
# another product.
-# Errors related to JSON parsing.
-module json::error
+# Intro `JsonParseError` which is exposed by all JSON reading APIs
+module error
-import nitcc_runtime
+import parser_base
-# Ill-formed JSON.
+# JSON format error at parsing
class JsonParseError
super Error
class JsonParseError
super Error
+ serialize
- # The location of the error in the original text.
- var position: nullable Position
-
- redef fun to_s do
- var p = position
- if p isa Position then
- return "[{p}] {super}"
- else
- return super
- end
- end
+ # Location of the error in source
+ var location: nullable Location = null
end
end