json: Enable tag parser and adapt test case for Geany
This commit is contained in:
parent
0bd9585704
commit
270e32327f
@ -5,6 +5,7 @@ primary=true false null
|
|||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
lexer_filetype=Javascript
|
lexer_filetype=Javascript
|
||||||
|
tag_parser=JSON
|
||||||
extension=json
|
extension=json
|
||||||
mime_type=application/json
|
mime_type=application/json
|
||||||
|
|
||||||
|
@ -69,12 +69,12 @@ typedef enum {
|
|||||||
static langType Lang_json;
|
static langType Lang_json;
|
||||||
|
|
||||||
static kindOption JsonKinds [] = {
|
static kindOption JsonKinds [] = {
|
||||||
{ TRUE, 'o', "object", "objects" },
|
{ TRUE, 'o', "member", "objects" },
|
||||||
{ TRUE, 'a', "array", "arrays" },
|
{ TRUE, 'a', "member", "arrays" },
|
||||||
{ TRUE, 'n', "number", "numbers" },
|
{ TRUE, 'n', "member", "numbers" },
|
||||||
{ TRUE, 's', "string", "strings" },
|
{ TRUE, 's', "member", "strings" },
|
||||||
{ TRUE, 'b', "boolean", "booleans" },
|
{ TRUE, 'b', "member", "booleans" },
|
||||||
{ TRUE, 'z', "null", "nulls" }
|
{ TRUE, 'z', "member", "nulls" }
|
||||||
};
|
};
|
||||||
|
|
||||||
static tokenInfo *newToken (void)
|
static tokenInfo *newToken (void)
|
||||||
|
@ -246,6 +246,7 @@ test_sources = \
|
|||||||
simple.d \
|
simple.d \
|
||||||
simple.html \
|
simple.html \
|
||||||
simple.js \
|
simple.js \
|
||||||
|
simple.json \
|
||||||
simple.ksh \
|
simple.ksh \
|
||||||
simple.lua \
|
simple.lua \
|
||||||
simple.mak \
|
simple.mak \
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
0 input.json /^ {$/;" o array:phoneNumbers
|
# format=tagmanager
|
||||||
1 input.json /^ {$/;" o array:phoneNumbers
|
0Ì64ÎphoneNumbersÖ0
|
||||||
address input.json /^ "address": {$/;" o
|
1Ì64ÎphoneNumbersÖ0
|
||||||
age input.json /^ "age": 25,$/;" n
|
addressÌ64Ö0
|
||||||
children input.json /^ "children": [],$/;" a
|
ageÌ64Ö0
|
||||||
city input.json /^ "city": "New York",$/;" s object:address
|
childrenÌ64Ö0
|
||||||
firstName input.json /^ "firstName": "John",$/;" s
|
cityÌ64ÎaddressÖ0
|
||||||
height_cm input.json /^ "height_cm": 167.6,$/;" n
|
firstNameÌ64Ö0
|
||||||
isAlive input.json /^ "isAlive": true,$/;" b
|
height_cmÌ64Ö0
|
||||||
lastName input.json /^ "lastName": "Smith",$/;" s
|
isAliveÌ64Ö0
|
||||||
number input.json /^ "number": "212 555-1234"$/;" s object:phoneNumbers.0
|
lastNameÌ64Ö0
|
||||||
number input.json /^ "number": "646 555-4567"$/;" s object:phoneNumbers.1
|
numberÌ64ÎphoneNumbers.0Ö0
|
||||||
phoneNumbers input.json /^ "phoneNumbers": [$/;" a
|
numberÌ64ÎphoneNumbers.1Ö0
|
||||||
postalCode input.json /^ "postalCode": "10021-3100"$/;" s object:address
|
phoneNumbersÌ64Ö0
|
||||||
spouse input.json /^ "spouse": null$/;" z
|
postalCodeÌ64ÎaddressÖ0
|
||||||
state input.json /^ "state": "NY",$/;" s object:address
|
spouseÌ64Ö0
|
||||||
streetAddress input.json /^ "streetAddress": "21 2nd Street",$/;" s object:address
|
stateÌ64ÎaddressÖ0
|
||||||
type input.json /^ "type": "home",$/;" s object:phoneNumbers.0
|
streetAddressÌ64ÎaddressÖ0
|
||||||
type input.json /^ "type": "office",$/;" s object:phoneNumbers.1
|
typeÌ64ÎphoneNumbers.0Ö0
|
||||||
|
typeÌ64ÎphoneNumbers.1Ö0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user