effect-grammar 0.2.0 → 0.3.0
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/README.md +164 -76
- package/dist/combinators.d.ts +66 -21
- package/dist/combinators.d.ts.map +1 -1
- package/dist/combinators.js +150 -47
- package/dist/combinators.js.map +1 -1
- package/dist/core.d.ts +111 -39
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +24 -20
- package/dist/core.js.map +1 -1
- package/dist/env.d.ts +20 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +63 -0
- package/dist/env.js.map +1 -0
- package/dist/errors.d.ts +34 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +37 -4
- package/dist/errors.js.map +1 -1
- package/dist/gen.d.ts +7 -0
- package/dist/gen.d.ts.map +1 -0
- package/dist/gen.js +200 -0
- package/dist/gen.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/parse.d.ts.map +1 -1
- package/dist/parse.js +152 -114
- package/dist/parse.js.map +1 -1
- package/dist/pattern.d.ts +5 -0
- package/dist/pattern.d.ts.map +1 -0
- package/dist/pattern.js +46 -0
- package/dist/pattern.js.map +1 -0
- package/dist/print.d.ts +2 -1
- package/dist/print.d.ts.map +1 -1
- package/dist/print.js +201 -89
- package/dist/print.js.map +1 -1
- package/dist/recovery.d.ts +10 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +296 -0
- package/dist/recovery.js.map +1 -0
- package/dist/render.d.ts +4 -4
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +133 -42
- package/dist/render.js.map +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +11 -4
- package/dist/schema.js.map +1 -1
- package/package.json +32 -16
package/README.md
CHANGED
|
@@ -8,24 +8,22 @@ expressions, search queries, or DSLs.
|
|
|
8
8
|
|
|
9
9
|
You write the grammar definition once. You get four outputs:
|
|
10
10
|
|
|
11
|
-
- **A
|
|
11
|
+
- **A parser.** Reads text and outputs structured data, with line and column
|
|
12
12
|
error messages.
|
|
13
|
-
- **A
|
|
14
|
-
- **A `Schema.Codec<A, string
|
|
15
|
-
|
|
16
|
-
- **A
|
|
13
|
+
- **A printer.** Converts structured data back to canonical text.
|
|
14
|
+
- **A `Schema.Codec<A, string>`.** Decoding parses, encoding prints, and Schema
|
|
15
|
+
refinements compose.
|
|
16
|
+
- **A text renderer.** Formats the grammar as readable text, for documentation
|
|
17
17
|
and schema descriptions.
|
|
18
18
|
|
|
19
19
|
## Why effect-grammar?
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
- **`effect-grammar`**: Automatically derives the parser and printer for formats
|
|
26
|
-
with optional parts, repetition, alternation, and recursion.
|
|
21
|
+
`Schema.transformOrFail` makes you write and maintain both directions by hand.
|
|
22
|
+
`Schema.TemplateLiteralParser` only handles flat `${a}-${b}` patterns.
|
|
23
|
+
`effect-grammar` derives both directions for you. It handles optional parts,
|
|
24
|
+
repetition, alternation, recursion, and parts that depend on earlier parts.
|
|
27
25
|
|
|
28
|
-
This is for format strings, not documents. The parser backtracks
|
|
26
|
+
This is for format strings, not documents. The parser backtracks. There is no
|
|
29
27
|
memoization and no left recursion. Printing is canonical, not pretty.
|
|
30
28
|
|
|
31
29
|
## Install
|
|
@@ -34,105 +32,164 @@ memoization and no left recursion. Printing is canonical, not pretty.
|
|
|
34
32
|
pnpm add effect-grammar
|
|
35
33
|
```
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
Requires Effect `4.0.0-rc.112` or newer in the Effect 4 line.
|
|
38
36
|
|
|
39
37
|
## A grammar
|
|
40
38
|
|
|
41
39
|
```ts
|
|
42
|
-
import { Schema } from "effect"
|
|
43
40
|
import * as Grammar from "effect-grammar"
|
|
44
41
|
|
|
45
42
|
const endpoint = Grammar.gen(function* () {
|
|
46
43
|
yield* Grammar.literal("https://")
|
|
47
|
-
const host = yield* Grammar.
|
|
48
|
-
const port = yield* Grammar.
|
|
49
|
-
|
|
50
|
-
Grammar.optional(Grammar.prefix(":", Grammar.integer)),
|
|
51
|
-
)
|
|
52
|
-
return { host, port: port ?? 443 }
|
|
44
|
+
const host = yield* Grammar.regex(/[^:/?#]+/, "host")
|
|
45
|
+
const port = yield* Grammar.optional(Grammar.prefix(":", Grammar.integer))
|
|
46
|
+
return { host, port }
|
|
53
47
|
})
|
|
54
48
|
|
|
55
49
|
Grammar.parse(endpoint, "https://effect.website:8080")
|
|
56
50
|
// Result.succeed({ host: "effect.website", port: 8080 })
|
|
51
|
+
|
|
57
52
|
Grammar.parse(endpoint, "https://effect.website:abc")
|
|
58
53
|
// Result.fail(ParseError: line 1, column 24: expected integer, found "a")
|
|
54
|
+
|
|
59
55
|
Grammar.print(endpoint, { host: "effect.website", port: 443 })
|
|
60
56
|
// Result.succeed("https://effect.website:443")
|
|
57
|
+
|
|
61
58
|
Grammar.render(endpoint)
|
|
62
59
|
// "https://" host:<host> port:(":" <integer>)?
|
|
63
60
|
```
|
|
64
61
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
`gen` runs the generator once, when you build the grammar. Nothing is parsed
|
|
63
|
+
yet.
|
|
64
|
+
|
|
65
|
+
Inside the generator, `yield*` on a value grammar does not give you a value. It
|
|
66
|
+
gives you a `Ref<A>`: a stand-in for the value that will exist at parse and
|
|
67
|
+
print time. `yield*` on a silent grammar, such as `literal` or `symbol`, gives
|
|
68
|
+
nothing back. Silent grammars carry no value.
|
|
69
|
+
|
|
70
|
+
The generator's return value is a pattern over those refs. It can be a bare ref,
|
|
71
|
+
an object, an array, or constants around them. Parsing fills the pattern in.
|
|
72
|
+
Printing reads each ref back out of the value you hand it. That is what makes
|
|
73
|
+
the grammar invertible.
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
const nested = Grammar.gen(function* () {
|
|
77
|
+
const host = yield* Grammar.regex(/[^:]+/, "host")
|
|
78
|
+
yield* Grammar.literal(":")
|
|
79
|
+
const port = yield* Grammar.integer
|
|
80
|
+
return { kind: "endpoint", address: { host, port } } as const
|
|
81
|
+
})
|
|
82
|
+
// Grammar<{ kind: "endpoint"; address: { host: string; port: number } }>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## The one rule
|
|
68
86
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
types enforce it. Return nothing and you get the object of fields.
|
|
87
|
+
Every binding must appear in the return pattern exactly once. `gen` throws at
|
|
88
|
+
build time if one does not. A binding the return does not hold is a value the
|
|
89
|
+
printer could not print.
|
|
73
90
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
straight-line, as above. If the generator branches on a parsed value, render
|
|
77
|
-
still runs with no values. `if (kind === "a") yield* ...` shows only the path
|
|
78
|
-
`undefined` takes, with no warning. Put the branch in `choice` instead, which
|
|
79
|
-
renders every option.
|
|
91
|
+
To parse something and then drop it, wrap it with `skip`. The grammar prints its
|
|
92
|
+
canonical form instead.
|
|
80
93
|
|
|
81
|
-
|
|
82
|
-
|
|
94
|
+
## Refs are not values
|
|
95
|
+
|
|
96
|
+
A ref is a stand-in, so JavaScript cannot look inside it. Comparing a ref with
|
|
97
|
+
`===` is a type error. Interpolating one into a string throws.
|
|
98
|
+
|
|
99
|
+
Branching on a ref is `match`, described below. For everything else there are
|
|
100
|
+
small helpers: `defaulted` supplies a value when a part is absent.
|
|
101
|
+
`get(ref, key)` reads a property of a ref, including reserved names such as
|
|
102
|
+
`then` and `toJSON`.
|
|
103
|
+
|
|
104
|
+
## Depending on an earlier part
|
|
105
|
+
|
|
106
|
+
`match` picks a grammar based on an earlier binding. The printer runs the same
|
|
107
|
+
choice backwards.
|
|
83
108
|
|
|
84
109
|
```ts
|
|
85
|
-
const
|
|
86
|
-
Grammar.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
)
|
|
90
|
-
|
|
110
|
+
const tagged = Grammar.gen(function* () {
|
|
111
|
+
const kind = yield* Grammar.choice(
|
|
112
|
+
Grammar.literal("n:").pipe(Grammar.as("num")),
|
|
113
|
+
Grammar.literal("w:").pipe(Grammar.as("word")),
|
|
114
|
+
)
|
|
115
|
+
const value = yield* Grammar.match(kind, {
|
|
116
|
+
num: Grammar.integer,
|
|
117
|
+
word: Grammar.regex(/[a-z]+/, "word"),
|
|
118
|
+
})
|
|
119
|
+
return { kind, value }
|
|
120
|
+
})
|
|
121
|
+
// parses "n:12" → { kind: "num", value: 12 }
|
|
91
122
|
```
|
|
92
123
|
|
|
93
|
-
|
|
124
|
+
`match` requires the cases to cover every literal of the selector's type.
|
|
125
|
+
`matchValue` is the same idea with number or mixed literal keys. Keys keep their
|
|
126
|
+
type, so `1` and `"1"` are distinct cases.
|
|
94
127
|
|
|
95
|
-
|
|
96
|
-
|
|
128
|
+
A property of a ref is a ref to that property. A header parsed by one grammar
|
|
129
|
+
can steer the body of another:
|
|
97
130
|
|
|
98
131
|
```ts
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
132
|
+
const frame = Grammar.gen(function* () {
|
|
133
|
+
const header = yield* headerGrammar // { kind: "text" | "bin"; size: number }
|
|
134
|
+
yield* Grammar.literal(":")
|
|
135
|
+
const body = yield* Grammar.match(header.kind, {
|
|
136
|
+
text: Grammar.take(header.size),
|
|
137
|
+
bin: Grammar.repeat(Grammar.regex(/[01]/, "bit"), header.size),
|
|
138
|
+
})
|
|
139
|
+
return { header, body }
|
|
140
|
+
})
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
`take(n)` reads exactly `n` characters (UTF-16 code units). `repeat(g, n)` reads
|
|
144
|
+
exactly `n` repetitions. The count is a value like any other: return it, and
|
|
145
|
+
printing reads it back. A netstring is:
|
|
107
146
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
147
|
+
```ts
|
|
148
|
+
const netstring = Grammar.gen(function* () {
|
|
149
|
+
const length = yield* Grammar.integer
|
|
150
|
+
yield* Grammar.literal(":")
|
|
151
|
+
const payload = yield* Grammar.take(length)
|
|
152
|
+
yield* Grammar.literal(",")
|
|
153
|
+
return { length, payload }
|
|
154
|
+
})
|
|
155
|
+
// "5:hello," ⇄ { length: 5, payload: "hello" }
|
|
112
156
|
```
|
|
113
157
|
|
|
158
|
+
`seq(...silents)` builds a silent sequence.
|
|
159
|
+
|
|
114
160
|
## Values and alternatives
|
|
115
161
|
|
|
116
|
-
`transform` maps
|
|
117
|
-
|
|
118
|
-
|
|
162
|
+
`transform` maps between two types, in both directions. Write plain functions.
|
|
163
|
+
If a callback throws, the grammar fails cleanly. Use `transformOrFail` when a
|
|
164
|
+
direction should return a `Result` instead:
|
|
119
165
|
|
|
120
166
|
```ts
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
167
|
+
const jsonString = Grammar.regex(/"(?:[^"\\]|\\.)*"/, "string").pipe(
|
|
168
|
+
Grammar.transformOrFail({
|
|
169
|
+
decode: (text) =>
|
|
170
|
+
Result.try({
|
|
171
|
+
try: () => JSON.parse(text),
|
|
172
|
+
catch: (error) => ({ message: String(error) }),
|
|
173
|
+
}),
|
|
174
|
+
encode: (value) => Result.succeed(JSON.stringify(value)),
|
|
126
175
|
}),
|
|
127
176
|
)
|
|
128
177
|
```
|
|
129
178
|
|
|
130
|
-
`
|
|
131
|
-
boolean
|
|
179
|
+
`decodeTo` checks the value against a Schema on parse and on print. `as` turns a
|
|
180
|
+
silent grammar into a constant. `flag` turns presence into a boolean.
|
|
181
|
+
|
|
182
|
+
`choice` tries its options in order and backtracks. It has one round-trip rule:
|
|
183
|
+
the text printed for a branch must not parse as a different value through an
|
|
184
|
+
earlier branch. `taggedChoice` records the chosen branch in the result.
|
|
132
185
|
|
|
133
186
|
```ts
|
|
134
|
-
const
|
|
135
|
-
|
|
187
|
+
const value = Grammar.taggedChoice("kind", {
|
|
188
|
+
number: Grammar.integer,
|
|
189
|
+
word: Grammar.regex(/[a-z]+/, "word"),
|
|
190
|
+
})
|
|
191
|
+
// parses "12" → { kind: "number", value: 12 }
|
|
192
|
+
// prints the same → "12"
|
|
136
193
|
```
|
|
137
194
|
|
|
138
195
|
Recursion uses `suspend`:
|
|
@@ -152,16 +209,47 @@ const jsonValue: Grammar.Grammar<Json> = Grammar.suspend(
|
|
|
152
209
|
)
|
|
153
210
|
```
|
|
154
211
|
|
|
155
|
-
See `examples/` for JSON, Scheme, a Postgres DSN, netstrings,
|
|
156
|
-
search syntax.
|
|
212
|
+
See `examples/` for JSON, Scheme, a Postgres DSN, netstrings, a wire protocol,
|
|
213
|
+
and GitHub's search syntax.
|
|
157
214
|
|
|
158
|
-
##
|
|
215
|
+
## Products, delimiters, and trivia
|
|
159
216
|
|
|
160
|
-
`
|
|
161
|
-
|
|
217
|
+
`struct` and `tuple` build products without a generator. Their staged form is
|
|
218
|
+
the same as what `gen` builds.
|
|
162
219
|
|
|
220
|
+
Delimiter combinators work data-first and data-last:
|
|
221
|
+
|
|
222
|
+
```ts
|
|
223
|
+
const port = Grammar.integer.pipe(
|
|
224
|
+
Grammar.prefix(":"),
|
|
225
|
+
Grammar.optional(),
|
|
226
|
+
Grammar.defaulted(443),
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
const pair = Grammar.tuple(
|
|
230
|
+
Grammar.integer,
|
|
231
|
+
Grammar.integer.pipe(Grammar.prefix(",")),
|
|
232
|
+
)
|
|
163
233
|
```
|
|
164
|
-
line 1, column 7: expected one of "null", "true", "false", number, string, "[", "{", found end of input
|
|
165
|
-
```
|
|
166
234
|
|
|
167
|
-
`
|
|
235
|
+
`between` is the two-sided delimiter. `wrap` is another name for it. `lexeme`
|
|
236
|
+
skips trailing whitespace after a token, and prints none. `symbol` is a literal
|
|
237
|
+
lexeme. `space` is one exact space. `spaces` accepts one or more whitespace
|
|
238
|
+
characters and prints one canonical space.
|
|
239
|
+
|
|
240
|
+
## Rendering
|
|
241
|
+
|
|
242
|
+
`render` formats a grammar as readable text, including binding paths. `describe`
|
|
243
|
+
returns a short name for a grammar.
|
|
244
|
+
|
|
245
|
+
The interpreter AST is private. Public grammars expose only `Grammar<A>`,
|
|
246
|
+
`Ref<A>`, and the combinators.
|
|
247
|
+
|
|
248
|
+
## Errors
|
|
249
|
+
|
|
250
|
+
Parse errors report the furthest position reached, with every expected form at
|
|
251
|
+
that position, plus line and column.
|
|
252
|
+
|
|
253
|
+
Print errors carry a `PrintIssue` tree. It records structural paths, missing
|
|
254
|
+
fields, branch failures, and value mismatches. `PrintError.format` renders the
|
|
255
|
+
tree as text.
|
package/dist/combinators.d.ts
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { Schema } from "effect";
|
|
2
|
-
import { type
|
|
3
|
-
export {
|
|
1
|
+
import { Result, Schema } from "effect";
|
|
2
|
+
import { type Grammar, type GrammarInternal, type GrammarIssue, type MatchKey, type Ref, type Silent, type Type } from "./core.ts";
|
|
3
|
+
export { gen, type GenGrammar, get, seq } from "./gen.ts";
|
|
4
4
|
export declare const literal: (value: string) => Silent;
|
|
5
5
|
export declare const empty: Silent;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare function
|
|
10
|
-
export declare
|
|
11
|
-
export declare function
|
|
12
|
-
export declare
|
|
6
|
+
export declare const regex: (expression: RegExp, name: string) => Grammar<string>;
|
|
7
|
+
type PreserveGrammar<G extends GrammarInternal> = G extends Silent ? Silent : G extends Grammar<infer A> ? Grammar<A> : never;
|
|
8
|
+
type OptionalGrammar<G extends GrammarInternal> = G extends Silent ? Silent : G extends Grammar<infer A> ? Grammar<A | undefined> : never;
|
|
9
|
+
export declare function between(open: Silent | string, close: Silent | string): <G extends GrammarInternal>(inner: G) => PreserveGrammar<G>;
|
|
10
|
+
export declare function between(open: Silent | string, inner: Silent, close: Silent | string): Silent;
|
|
11
|
+
export declare function between<A>(open: Silent | string, inner: Grammar<A>, close: Silent | string): Grammar<A>;
|
|
12
|
+
export declare const wrap: typeof between;
|
|
13
|
+
export declare function prefix(open: Silent | string): <G extends GrammarInternal>(inner: G) => PreserveGrammar<G>;
|
|
13
14
|
export declare function prefix(open: Silent | string, inner: Silent): Silent;
|
|
14
15
|
export declare function prefix<A>(open: Silent | string, inner: Grammar<A>): Grammar<A>;
|
|
16
|
+
export declare function suffix(close: Silent | string): <G extends GrammarInternal>(inner: G) => PreserveGrammar<G>;
|
|
15
17
|
export declare function suffix(inner: Silent, close: Silent | string): Silent;
|
|
16
18
|
export declare function suffix<A>(inner: Grammar<A>, close: Silent | string): Grammar<A>;
|
|
17
|
-
export declare const choice: <const
|
|
19
|
+
export declare const choice: <const Grammars extends readonly [GrammarInternal, ...Array<GrammarInternal>]>(...options: Grammars) => Grammar<Type<Grammars[number]>>;
|
|
20
|
+
export declare function optional(): <G extends GrammarInternal>(inner: G) => OptionalGrammar<G>;
|
|
18
21
|
export declare function optional(inner: Silent): Silent;
|
|
19
22
|
export declare function optional<A>(inner: Grammar<A>): Grammar<A | undefined>;
|
|
20
23
|
export interface RepeatOptions {
|
|
@@ -22,12 +25,23 @@ export interface RepeatOptions {
|
|
|
22
25
|
readonly max?: number;
|
|
23
26
|
}
|
|
24
27
|
export declare const many: {
|
|
25
|
-
<A>(inner: Grammar<A>,
|
|
26
|
-
(
|
|
28
|
+
<A>(inner: Grammar<A>, options?: RepeatOptions): Grammar<ReadonlyArray<A>>;
|
|
29
|
+
(options?: RepeatOptions): <A>(inner: Grammar<A>) => Grammar<ReadonlyArray<A>>;
|
|
27
30
|
};
|
|
28
31
|
export declare const sepBy: {
|
|
29
|
-
<A>(inner: Grammar<A>,
|
|
30
|
-
(
|
|
32
|
+
<A>(inner: Grammar<A>, separator: Silent | string, options?: RepeatOptions): Grammar<ReadonlyArray<A>>;
|
|
33
|
+
(separator: Silent | string, options?: RepeatOptions): <A>(inner: Grammar<A>) => Grammar<ReadonlyArray<A>>;
|
|
34
|
+
};
|
|
35
|
+
type FiniteString<K extends string> = string extends K ? never : K;
|
|
36
|
+
type CaseOutput<Cases> = Cases extends Readonly<Record<PropertyKey, GrammarInternal>> ? Type<Cases[keyof Cases]> : never;
|
|
37
|
+
export declare const match: <K extends string, const Cases extends Readonly<Record<K, GrammarInternal>>>(scrutinee: Ref<FiniteString<K>>, cases: Cases) => Grammar<CaseOutput<Cases>>;
|
|
38
|
+
type EntryOutput<Entries extends ReadonlyArray<readonly [MatchKey, GrammarInternal]>> = Type<Entries[number][1]>;
|
|
39
|
+
type CompleteEntries<K extends MatchKey, Entries extends ReadonlyArray<readonly [MatchKey, GrammarInternal]>> = Exclude<K, Entries[number][0]> extends never ? Entries : never;
|
|
40
|
+
export declare const matchValue: <K extends MatchKey, const Entries extends ReadonlyArray<readonly [K, GrammarInternal]>>(scrutinee: Ref<K>, entries: CompleteEntries<K, Entries>) => Grammar<EntryOutput<Entries>>;
|
|
41
|
+
export declare const take: (count: Ref<number>) => Grammar<string>;
|
|
42
|
+
export declare const repeat: {
|
|
43
|
+
<A>(inner: Grammar<A>, count: Ref<number>): Grammar<ReadonlyArray<A>>;
|
|
44
|
+
(count: Ref<number>): <A>(inner: Grammar<A>) => Grammar<ReadonlyArray<A>>;
|
|
31
45
|
};
|
|
32
46
|
export interface TransformOptions<A, B> {
|
|
33
47
|
readonly decode: (a: A) => B;
|
|
@@ -36,18 +50,28 @@ export interface TransformOptions<A, B> {
|
|
|
36
50
|
readonly name?: string;
|
|
37
51
|
}
|
|
38
52
|
export declare const transform: {
|
|
39
|
-
<A, B>(
|
|
40
|
-
<A, B>(inner: Grammar<A>,
|
|
53
|
+
<A, B>(options: TransformOptions<A, B>): (inner: Grammar<A>) => Grammar<B>;
|
|
54
|
+
<A, B>(inner: Grammar<A>, options: TransformOptions<A, B>): Grammar<B>;
|
|
55
|
+
};
|
|
56
|
+
export interface TransformOrFailOptions<A, B> {
|
|
57
|
+
readonly decode: (a: A) => Result.Result<B, GrammarIssue>;
|
|
58
|
+
readonly encode: (b: B) => Result.Result<A, GrammarIssue>;
|
|
59
|
+
readonly is?: (value: B) => boolean;
|
|
60
|
+
readonly name?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare const transformOrFail: {
|
|
63
|
+
<A, B>(options: TransformOrFailOptions<A, B>): (inner: Grammar<A>) => Grammar<B>;
|
|
64
|
+
<A, B>(inner: Grammar<A>, options: TransformOrFailOptions<A, B>): Grammar<B>;
|
|
41
65
|
};
|
|
42
66
|
export interface DecodeToOptions<A, T> extends Omit<TransformOptions<A, T>, "is"> {
|
|
43
67
|
readonly is?: ((value: T) => boolean) | undefined;
|
|
44
68
|
}
|
|
45
|
-
export declare const decodeTo: <T>(schema: Schema.Codec<T, unknown, unknown, unknown>) => <A>(
|
|
69
|
+
export declare const decodeTo: <T>(schema: Schema.Codec<T, unknown, unknown, unknown>) => <A>(options: DecodeToOptions<A, T>) => (inner: Grammar<A>) => Grammar<T>;
|
|
46
70
|
export declare const as: {
|
|
47
71
|
<const V>(value: V): (inner: Silent) => Grammar<V>;
|
|
48
72
|
<const V>(inner: Silent, value: V): Grammar<V>;
|
|
49
73
|
};
|
|
50
|
-
export declare const flag: (
|
|
74
|
+
export declare const flag: (value: Silent | string) => Grammar<boolean>;
|
|
51
75
|
export declare const skip: {
|
|
52
76
|
<A>(printAs: A): (inner: Grammar<A>) => Silent;
|
|
53
77
|
<A>(inner: Grammar<A>, printAs: A): Silent;
|
|
@@ -57,9 +81,30 @@ export declare const label: {
|
|
|
57
81
|
<A>(inner: Grammar<A>, name: string): Grammar<A>;
|
|
58
82
|
};
|
|
59
83
|
export declare const suspend: <A>(thunk: () => Grammar<A>, name?: string) => Grammar<A>;
|
|
60
|
-
export declare const
|
|
84
|
+
export declare const defaulted: {
|
|
85
|
+
<A>(value: A): (inner: Grammar<A | undefined>) => Grammar<A>;
|
|
86
|
+
<A>(inner: Grammar<A | undefined>, value: A): Grammar<A>;
|
|
87
|
+
};
|
|
88
|
+
type StructFields = Readonly<Record<string, GrammarInternal>>;
|
|
89
|
+
type StructValue<Fields extends StructFields> = {
|
|
90
|
+
readonly [K in keyof Fields]: Type<Fields[K]>;
|
|
91
|
+
};
|
|
92
|
+
export declare const struct: <const Fields extends StructFields>(fields: Fields) => Grammar<StructValue<Fields>>;
|
|
93
|
+
type TupleValue<Elements extends ReadonlyArray<GrammarInternal>> = {
|
|
94
|
+
readonly [K in keyof Elements]: Type<Elements[K]>;
|
|
95
|
+
};
|
|
96
|
+
export declare const tuple: <const Elements extends ReadonlyArray<GrammarInternal>>(...elements: Elements) => Grammar<TupleValue<Elements>>;
|
|
97
|
+
type TaggedValue<Tag extends string, Cases extends Readonly<Record<string, GrammarInternal>>> = {
|
|
98
|
+
readonly [K in keyof Cases & string]: Readonly<Record<Tag, K>> & {
|
|
99
|
+
readonly value: Type<Cases[K]>;
|
|
100
|
+
};
|
|
101
|
+
}[keyof Cases & string];
|
|
102
|
+
export declare const taggedChoice: <const Tag extends string, const Cases extends Readonly<Record<string, GrammarInternal>>>(tag: Tag, cases: Cases) => Grammar<TaggedValue<Tag, Cases>>;
|
|
103
|
+
export declare const trivia: Silent;
|
|
104
|
+
export declare const space: Silent;
|
|
105
|
+
export declare const spaces: Silent;
|
|
61
106
|
export declare function lexeme(inner: Silent): Silent;
|
|
62
107
|
export declare function lexeme<A>(inner: Grammar<A>): Grammar<A>;
|
|
63
|
-
export declare const symbol: (
|
|
108
|
+
export declare const symbol: (value: string) => Silent;
|
|
64
109
|
export declare const integer: Grammar<number>;
|
|
65
110
|
//# sourceMappingURL=combinators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combinators.d.ts","sourceRoot":"","sources":["../src/combinators.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"combinators.d.ts","sourceRoot":"","sources":["../src/combinators.ts"],"names":[],"mappings":"AAAA,OA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