mirror of
https://github.com/ijprest/keyboard-layout-editor.git
synced 2026-04-27 17:40:44 -07:00
Made JSON-L parser even more lenient
-- Now allows "empty" values in arrays, e.g., "[1,,,,3]"
This commit is contained in:
parent
ae3e23d395
commit
5e972cd114
1 changed files with 4 additions and 1 deletions
|
|
@ -69,9 +69,12 @@ exports.grammar = {
|
|||
|
||||
"JSONArray": [[ "[ ]", "$$ = [];" ],
|
||||
[ "[ JSONElementList ]", "$$ = $2;" ]],
|
||||
|
||||
"JSONArrayValue": [[ "JSONValue", "$$ = $1;" ],
|
||||
[ "", "$$ = undefined;" ]],
|
||||
|
||||
"JSONElementList": [[ "JSONValue", "$$ = [$1];" ],
|
||||
[ "JSONElementList , JSONValue", "$$ = $1; $1.push($3);" ]]
|
||||
[ "JSONElementList , JSONArrayValue", "$$ = $1; $1.push($3);" ]]
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue