Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.

Commit a3fff2f

Browse files
langpavelleebyron
authored andcommitted
Support null (#51)
1 parent 2e8983d commit a3fff2f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/utils/Rules.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,16 @@ export const ParseRules = {
144144
switch (token.value) {
145145
case 'true': case 'false': return 'BooleanValue';
146146
}
147+
if (token.value === 'null') {
148+
return 'NullValue';
149+
}
147150
return 'EnumValue';
148151
}
149152
},
150153
NumberValue: [ t('Number', 'number') ],
151154
StringValue: [ t('String', 'string') ],
152155
BooleanValue: [ t('Name', 'builtin') ],
156+
NullValue: [ t('Name', 'keyword') ],
153157
EnumValue: [ name('string-2') ],
154158
ListValue: [ p('['), list('Value'), p(']') ],
155159
ObjectValue: [ p('{'), list('ObjectField'), p('}') ],

0 commit comments

Comments
 (0)