json(vm): fix birth dispatch; unify constructor naming (Box.birth/N); JsonNode factories return JsonNodeInstance; quick: enable heavy JSON with probe; builder: NYASH_BUILDER_DEBUG_LIMIT guard; json_query_min(core) harness; docs/tasks updated
This commit is contained in:
@ -15,7 +15,8 @@ box JsonTokenizer {
|
||||
birth(input_text) {
|
||||
// Avoid static module wrapper to ensure constructor args are preserved on VM path
|
||||
// (create_scanner(...) lost the argument under VM fallback in some cases)
|
||||
me.scanner = new JsonScanner(input_text)
|
||||
me.scanner = new JsonScanner("")
|
||||
me.scanner.reset_text(input_text)
|
||||
me.tokens = new ArrayBox()
|
||||
me.errors = new ArrayBox()
|
||||
}
|
||||
@ -60,6 +61,14 @@ box JsonTokenizer {
|
||||
|
||||
return me.tokens
|
||||
}
|
||||
|
||||
// Explicitly set input text (guards against constructor-arg loss)
|
||||
set_input(input_text) {
|
||||
if me.scanner == null {
|
||||
me.scanner = new JsonScanner("")
|
||||
}
|
||||
me.scanner.reset_text(input_text)
|
||||
}
|
||||
|
||||
// 次のトークンを1つ取得
|
||||
next_token() {
|
||||
|
||||
Reference in New Issue
Block a user