clarity-pattern-parser 8.4.0 → 8.4.2
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/ast/Node.d.ts +1 -0
- package/dist/grammar/patterns/repeatLiteral.d.ts +0 -1
- package/dist/index.browser.js +18 -12
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +18 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +18 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/grammar/Grammar.test.ts +0 -16
- package/src/grammar/Grammar.ts +1 -2
- package/src/grammar/patterns/repeatLiteral.ts +1 -7
|
@@ -5,14 +5,8 @@ import { Regex } from "../../patterns/Regex";
|
|
|
5
5
|
import { name } from "./name";
|
|
6
6
|
import { spaces } from "./spaces";
|
|
7
7
|
|
|
8
|
-
const optionalIsOptional = new Literal("is-optional", "?", true);
|
|
9
8
|
const patternName = name.clone("pattern-name");
|
|
10
9
|
|
|
11
|
-
export const pattern = new And("pattern", [
|
|
12
|
-
patternName,
|
|
13
|
-
optionalIsOptional,
|
|
14
|
-
]);
|
|
15
|
-
|
|
16
10
|
const optionalSpaces = spaces.clone("optional-spaces", true);
|
|
17
11
|
const dividerPattern = name.clone("divider-pattern");
|
|
18
12
|
|
|
@@ -62,7 +56,7 @@ dividerComma.setTokens([", "]);
|
|
|
62
56
|
export const repeatLiteral = new And("repeat-literal", [
|
|
63
57
|
openParen,
|
|
64
58
|
optionalSpaces,
|
|
65
|
-
|
|
59
|
+
patternName,
|
|
66
60
|
optional,
|
|
67
61
|
new And("optional-divider-section", [dividerComma, dividerPattern], true),
|
|
68
62
|
optionalSpaces,
|