clarity-pattern-parser 11.1.0 → 11.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.js +3 -3
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/grammar/Grammar.test.ts +14 -0
- package/src/grammar/patterns/decoratorStatement.ts +3 -3
package/dist/index.browser.js
CHANGED
|
@@ -2186,12 +2186,12 @@
|
|
|
2186
2186
|
const closeSquareBracket = new Literal("close-square-bracket", "]");
|
|
2187
2187
|
const optionalAllSpaces = new Optional("optional-all-spaces", allSpaces);
|
|
2188
2188
|
const stringLiteral = new Regex("string-literal", '"(?:\\\\.|[^"\\\\])*"');
|
|
2189
|
-
const numberLiteral = new Regex("number-literal", '[+-]?\\d+(
|
|
2189
|
+
const numberLiteral = new Regex("number-literal", '[+-]?\\d+(\\.\\d+)?([eE][+-]?\\d+)?');
|
|
2190
2190
|
const nullLiteral = new Literal("null-literal", "null");
|
|
2191
2191
|
const trueLiteral = new Literal("true-literal", "true");
|
|
2192
2192
|
const falseLiteral = new Literal("false-literal", "false");
|
|
2193
2193
|
const booleanLiteral = new Options("", [trueLiteral, falseLiteral]);
|
|
2194
|
-
const objectKey =
|
|
2194
|
+
const objectKey = stringLiteral.clone("object-key");
|
|
2195
2195
|
const objectProperty = new Sequence("object-property", [
|
|
2196
2196
|
objectKey,
|
|
2197
2197
|
optionalAllSpaces,
|
|
@@ -2211,7 +2211,7 @@
|
|
|
2211
2211
|
const arrayLiteral = new Sequence("array-literal", [
|
|
2212
2212
|
openSquareBracket,
|
|
2213
2213
|
optionalAllSpaces,
|
|
2214
|
-
arrayItems,
|
|
2214
|
+
new Optional("optional-array-items", arrayItems),
|
|
2215
2215
|
optionalAllSpaces,
|
|
2216
2216
|
closeSquareBracket,
|
|
2217
2217
|
]);
|