Kaydet (Commit) 270e3232 authored tarafından Colomban Wendling's avatar Colomban Wendling

json: Enable tag parser and adapt test case for Geany

üst 0bd95857
......@@ -5,6 +5,7 @@ primary=true false null
[settings]
lexer_filetype=Javascript
tag_parser=JSON
extension=json
mime_type=application/json
......
......@@ -69,12 +69,12 @@ typedef enum {
static langType Lang_json;
static kindOption JsonKinds [] = {
{ TRUE, 'o', "object", "objects" },
{ TRUE, 'a', "array", "arrays" },
{ TRUE, 'n', "number", "numbers" },
{ TRUE, 's', "string", "strings" },
{ TRUE, 'b', "boolean", "booleans" },
{ TRUE, 'z', "null", "nulls" }
{ TRUE, 'o', "member", "objects" },
{ TRUE, 'a', "member", "arrays" },
{ TRUE, 'n', "member", "numbers" },
{ TRUE, 's', "member", "strings" },
{ TRUE, 'b', "member", "booleans" },
{ TRUE, 'z', "member", "nulls" }
};
static tokenInfo *newToken (void)
......
......@@ -246,6 +246,7 @@ test_sources = \
simple.d \
simple.html \
simple.js \
simple.json \
simple.ksh \
simple.lua \
simple.mak \
......
0 input.json /^ {$/;" o array:phoneNumbers
1 input.json /^ {$/;" o array:phoneNumbers
address input.json /^ "address": {$/;" o
age input.json /^ "age": 25,$/;" n
children input.json /^ "children": [],$/;" a
city input.json /^ "city": "New York",$/;" s object:address
firstName input.json /^ "firstName": "John",$/;" s
height_cm input.json /^ "height_cm": 167.6,$/;" n
isAlive input.json /^ "isAlive": true,$/;" b
lastName input.json /^ "lastName": "Smith",$/;" s
number input.json /^ "number": "212 555-1234"$/;" s object:phoneNumbers.0
number input.json /^ "number": "646 555-4567"$/;" s object:phoneNumbers.1
phoneNumbers input.json /^ "phoneNumbers": [$/;" a
postalCode input.json /^ "postalCode": "10021-3100"$/;" s object:address
spouse input.json /^ "spouse": null$/;" z
state input.json /^ "state": "NY",$/;" s object:address
streetAddress input.json /^ "streetAddress": "21 2nd Street",$/;" s object:address
type input.json /^ "type": "home",$/;" s object:phoneNumbers.0
type input.json /^ "type": "office",$/;" s object:phoneNumbers.1
# format=tagmanager
064phoneNumbers0
164phoneNumbers0
address640
age640
children640
city64address0
firstName640
height_cm640
isAlive640
lastName640
number64phoneNumbers.00
number64phoneNumbers.10
phoneNumbers640
postalCode64address0
spouse640
state64address0
streetAddress64address0
type64phoneNumbers.00
type64phoneNumbers.10
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment