@rcrsr/rill 0.8.6 → 0.10.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/dist/ast-nodes.d.ts +189 -49
- package/dist/ast-nodes.d.ts.map +1 -1
- package/dist/ast-unions.d.ts +1 -1
- package/dist/ast-unions.d.ts.map +1 -1
- package/dist/constants.d.ts +14 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +30 -0
- package/dist/constants.js.map +1 -0
- package/dist/error-classes.d.ts +3 -1
- package/dist/error-classes.d.ts.map +1 -1
- package/dist/error-classes.js +11 -5
- package/dist/error-classes.js.map +1 -1
- package/dist/error-registry.d.ts.map +1 -1
- package/dist/error-registry.js +313 -11
- package/dist/error-registry.js.map +1 -1
- package/dist/ext/crypto/index.d.ts +2 -1
- package/dist/ext/crypto/index.d.ts.map +1 -1
- package/dist/ext/crypto/index.js +7 -0
- package/dist/ext/crypto/index.js.map +1 -1
- package/dist/ext/exec/index.d.ts +2 -1
- package/dist/ext/exec/index.d.ts.map +1 -1
- package/dist/ext/exec/index.js +6 -0
- package/dist/ext/exec/index.js.map +1 -1
- package/dist/ext/fetch/index.d.ts +2 -1
- package/dist/ext/fetch/index.d.ts.map +1 -1
- package/dist/ext/fetch/index.js +6 -0
- package/dist/ext/fetch/index.js.map +1 -1
- package/dist/ext/fs/index.d.ts +2 -1
- package/dist/ext/fs/index.d.ts.map +1 -1
- package/dist/ext/fs/index.js +3 -0
- package/dist/ext/fs/index.js.map +1 -1
- package/dist/ext/kv/index.d.ts +2 -1
- package/dist/ext/kv/index.d.ts.map +1 -1
- package/dist/ext/kv/index.js +5 -1
- package/dist/ext/kv/index.js.map +1 -1
- package/dist/generated/introspection-data.d.ts +1 -1
- package/dist/generated/introspection-data.d.ts.map +1 -1
- package/dist/generated/introspection-data.js +194 -185
- package/dist/generated/introspection-data.js.map +1 -1
- package/dist/generated/version-data.d.ts +1 -1
- package/dist/generated/version-data.d.ts.map +1 -1
- package/dist/generated/version-data.js +3 -3
- package/dist/generated/version-data.js.map +1 -1
- package/dist/highlight-map.d.ts.map +1 -1
- package/dist/highlight-map.js +8 -2
- package/dist/highlight-map.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/lexer/operators.d.ts.map +1 -1
- package/dist/lexer/operators.js +0 -2
- package/dist/lexer/operators.js.map +1 -1
- package/dist/lexer/readers.d.ts +18 -1
- package/dist/lexer/readers.d.ts.map +1 -1
- package/dist/lexer/readers.js +55 -0
- package/dist/lexer/readers.js.map +1 -1
- package/dist/parser/helpers.d.ts +8 -13
- package/dist/parser/helpers.d.ts.map +1 -1
- package/dist/parser/helpers.js +42 -35
- package/dist/parser/helpers.js.map +1 -1
- package/dist/parser/index.d.ts +1 -0
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +1 -0
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/parser-collect.d.ts.map +1 -1
- package/dist/parser/parser-collect.js +34 -5
- package/dist/parser/parser-collect.js.map +1 -1
- package/dist/parser/parser-control.d.ts +1 -1
- package/dist/parser/parser-control.d.ts.map +1 -1
- package/dist/parser/parser-control.js +11 -2
- package/dist/parser/parser-control.js.map +1 -1
- package/dist/parser/parser-expr.d.ts +3 -1
- package/dist/parser/parser-expr.d.ts.map +1 -1
- package/dist/parser/parser-expr.js +377 -100
- package/dist/parser/parser-expr.js.map +1 -1
- package/dist/parser/parser-extract.d.ts +3 -5
- package/dist/parser/parser-extract.d.ts.map +1 -1
- package/dist/parser/parser-extract.js +37 -69
- package/dist/parser/parser-extract.js.map +1 -1
- package/dist/parser/parser-functions.d.ts +2 -2
- package/dist/parser/parser-functions.d.ts.map +1 -1
- package/dist/parser/parser-functions.js +112 -36
- package/dist/parser/parser-functions.js.map +1 -1
- package/dist/parser/parser-literals.d.ts +5 -4
- package/dist/parser/parser-literals.d.ts.map +1 -1
- package/dist/parser/parser-literals.js +316 -47
- package/dist/parser/parser-literals.js.map +1 -1
- package/dist/parser/parser-script.d.ts.map +1 -1
- package/dist/parser/parser-script.js +25 -12
- package/dist/parser/parser-script.js.map +1 -1
- package/dist/parser/parser-shape.d.ts +13 -0
- package/dist/parser/parser-shape.d.ts.map +1 -0
- package/dist/parser/parser-shape.js +72 -0
- package/dist/parser/parser-shape.js.map +1 -0
- package/dist/parser/parser-types.d.ts +31 -0
- package/dist/parser/parser-types.d.ts.map +1 -0
- package/dist/parser/parser-types.js +78 -0
- package/dist/parser/parser-types.js.map +1 -0
- package/dist/parser/parser-variables.d.ts.map +1 -1
- package/dist/parser/parser-variables.js +10 -1
- package/dist/parser/parser-variables.js.map +1 -1
- package/dist/runtime/core/callable.d.ts +27 -22
- package/dist/runtime/core/callable.d.ts.map +1 -1
- package/dist/runtime/core/callable.js +30 -26
- package/dist/runtime/core/callable.js.map +1 -1
- package/dist/runtime/core/context.d.ts.map +1 -1
- package/dist/runtime/core/context.js +8 -8
- package/dist/runtime/core/context.js.map +1 -1
- package/dist/runtime/core/equals.d.ts.map +1 -1
- package/dist/runtime/core/equals.js +179 -30
- package/dist/runtime/core/equals.js.map +1 -1
- package/dist/runtime/core/eval/base.d.ts +2 -2
- package/dist/runtime/core/eval/base.d.ts.map +1 -1
- package/dist/runtime/core/eval/evaluator.d.ts.map +1 -1
- package/dist/runtime/core/eval/evaluator.js +3 -1
- package/dist/runtime/core/eval/evaluator.js.map +1 -1
- package/dist/runtime/core/eval/index.d.ts +18 -3
- package/dist/runtime/core/eval/index.d.ts.map +1 -1
- package/dist/runtime/core/eval/index.js +22 -2
- package/dist/runtime/core/eval/index.js.map +1 -1
- package/dist/runtime/core/eval/mixins/annotations.d.ts.map +1 -1
- package/dist/runtime/core/eval/mixins/annotations.js +14 -8
- package/dist/runtime/core/eval/mixins/annotations.js.map +1 -1
- package/dist/runtime/core/eval/mixins/closures.d.ts +0 -2
- package/dist/runtime/core/eval/mixins/closures.d.ts.map +1 -1
- package/dist/runtime/core/eval/mixins/closures.js +341 -105
- package/dist/runtime/core/eval/mixins/closures.js.map +1 -1
- package/dist/runtime/core/eval/mixins/collections.d.ts.map +1 -1
- package/dist/runtime/core/eval/mixins/collections.js +65 -25
- package/dist/runtime/core/eval/mixins/collections.js.map +1 -1
- package/dist/runtime/core/eval/mixins/control-flow.d.ts.map +1 -1
- package/dist/runtime/core/eval/mixins/control-flow.js +21 -17
- package/dist/runtime/core/eval/mixins/control-flow.js.map +1 -1
- package/dist/runtime/core/eval/mixins/conversion.d.ts +30 -0
- package/dist/runtime/core/eval/mixins/conversion.d.ts.map +1 -0
- package/dist/runtime/core/eval/mixins/conversion.js +212 -0
- package/dist/runtime/core/eval/mixins/conversion.js.map +1 -0
- package/dist/runtime/core/eval/mixins/core.d.ts.map +1 -1
- package/dist/runtime/core/eval/mixins/core.js +101 -32
- package/dist/runtime/core/eval/mixins/core.js.map +1 -1
- package/dist/runtime/core/eval/mixins/extraction.d.ts.map +1 -1
- package/dist/runtime/core/eval/mixins/extraction.js +136 -30
- package/dist/runtime/core/eval/mixins/extraction.js.map +1 -1
- package/dist/runtime/core/eval/mixins/list-dispatch.d.ts +17 -0
- package/dist/runtime/core/eval/mixins/list-dispatch.d.ts.map +1 -0
- package/dist/runtime/core/eval/mixins/list-dispatch.js +97 -0
- package/dist/runtime/core/eval/mixins/list-dispatch.js.map +1 -0
- package/dist/runtime/core/eval/mixins/literals.d.ts.map +1 -1
- package/dist/runtime/core/eval/mixins/literals.js +73 -83
- package/dist/runtime/core/eval/mixins/literals.js.map +1 -1
- package/dist/runtime/core/eval/mixins/types.d.ts +4 -0
- package/dist/runtime/core/eval/mixins/types.d.ts.map +1 -1
- package/dist/runtime/core/eval/mixins/types.js +323 -3
- package/dist/runtime/core/eval/mixins/types.js.map +1 -1
- package/dist/runtime/core/eval/mixins/variables.d.ts.map +1 -1
- package/dist/runtime/core/eval/mixins/variables.js +45 -7
- package/dist/runtime/core/eval/mixins/variables.js.map +1 -1
- package/dist/runtime/core/execute.d.ts.map +1 -1
- package/dist/runtime/core/execute.js +3 -16
- package/dist/runtime/core/execute.js.map +1 -1
- package/dist/runtime/core/field-descriptor.d.ts +29 -0
- package/dist/runtime/core/field-descriptor.d.ts.map +1 -0
- package/dist/runtime/core/field-descriptor.js +27 -0
- package/dist/runtime/core/field-descriptor.js.map +1 -0
- package/dist/runtime/core/types.d.ts +15 -6
- package/dist/runtime/core/types.d.ts.map +1 -1
- package/dist/runtime/core/types.js.map +1 -1
- package/dist/runtime/core/values.d.ts +114 -9
- package/dist/runtime/core/values.d.ts.map +1 -1
- package/dist/runtime/core/values.js +529 -43
- package/dist/runtime/core/values.js.map +1 -1
- package/dist/runtime/ext/builtins.d.ts.map +1 -1
- package/dist/runtime/ext/builtins.js +47 -107
- package/dist/runtime/ext/builtins.js.map +1 -1
- package/dist/runtime/ext/extensions.d.ts +21 -2
- package/dist/runtime/ext/extensions.d.ts.map +1 -1
- package/dist/runtime/ext/extensions.js.map +1 -1
- package/dist/runtime/index.d.ts +6 -4
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +7 -2
- package/dist/runtime/index.js.map +1 -1
- package/dist/token-types.d.ts +7 -2
- package/dist/token-types.d.ts.map +1 -1
- package/dist/token-types.js +9 -2
- package/dist/token-types.js.map +1 -1
- package/dist/value-types.d.ts +32 -1
- package/dist/value-types.d.ts.map +1 -1
- package/dist/value-types.js +1 -1
- package/dist/value-types.js.map +1 -1
- package/package.json +4 -1
|
@@ -4,27 +4,6 @@ export const LANGUAGE_REFERENCE = `# rill
|
|
|
4
4
|
|
|
5
5
|
> Scripting language designed for machine-generated code. LLMs generate rill scripts; humans review and debug. Data flows through pipes (\`->\`), not assignment. Variables use \`\$\` prefix. No null, no exceptions, no truthiness.
|
|
6
6
|
|
|
7
|
-
## Documentation
|
|
8
|
-
|
|
9
|
-
- [Getting Started](https://rill.run/docs/guide/getting-started/): Beginner-friendly introduction to rill
|
|
10
|
-
- [Language Reference](https://rill.run/docs/reference/language/): Core language specification
|
|
11
|
-
- [Examples](https://rill.run/docs/guide/examples/): Workflow patterns and use cases
|
|
12
|
-
- [Cookbook](https://rill.run/docs/guide/cookbook/): Advanced agent scripting patterns
|
|
13
|
-
- [Types](https://rill.run/docs/language/types/): Primitives, tuples, dicts, type assertions
|
|
14
|
-
- [Variables](https://rill.run/docs/language/variables/): Declaration, scope rules, \`\$\` binding
|
|
15
|
-
- [Control Flow](https://rill.run/docs/language/control-flow/): Conditionals, loops, break/return
|
|
16
|
-
- [Operators](https://rill.run/docs/language/operators/): Arithmetic, comparison, spread, extraction
|
|
17
|
-
- [Closures](https://rill.run/docs/language/closures/): Late binding, dict-bound closures
|
|
18
|
-
- [Collections](https://rill.run/docs/data/collections/): \`each\`, \`map\`, \`filter\`, \`fold\` operators
|
|
19
|
-
- [Iterators](https://rill.run/docs/data/iterators/): Lazy sequences with \`range\`, \`repeat\`, \`.first()\`
|
|
20
|
-
- [Strings](https://rill.run/docs/data/strings/): String methods for text manipulation
|
|
21
|
-
- [Host Integration](https://rill.run/docs/integration/host/): Embedding rill in applications
|
|
22
|
-
- [Host API Reference](https://rill.run/docs/reference/host-api/): Complete TypeScript API exports
|
|
23
|
-
- [Developing Extensions](https://rill.run/docs/integration/extensions/): Writing reusable host function packages
|
|
24
|
-
- [Modules](https://rill.run/docs/integration/modules/): Convention for host-provided module systems
|
|
25
|
-
- [CLI Tools](https://rill.run/docs/integration/cli/): \`rill-exec\`, \`rill-eval\`, \`rill-check\` commands
|
|
26
|
-
- [Error Reference](https://rill.run/docs/reference/errors/): Error codes and resolution
|
|
27
|
-
|
|
28
7
|
## Essentials
|
|
29
8
|
|
|
30
9
|
1. Variables use \`\$\` prefix ALWAYS: \`5 => \$x\` (no assignment operator \`=\`)
|
|
@@ -33,77 +12,6 @@ export const LANGUAGE_REFERENCE = `# rill
|
|
|
33
12
|
4. Variables lock to first type: \`"hi" => \$x; 42 => \$x\` is an ERROR
|
|
34
13
|
5. Loops cannot modify outer vars: use \`fold\`, \`each(init)\`, or \`\$\` as state dict
|
|
35
14
|
|
|
36
|
-
## Strengths and Use Cases
|
|
37
|
-
|
|
38
|
-
Strengths:
|
|
39
|
-
- Unambiguous syntax: \`\$\` prefix, explicit operators, no implicit coercion
|
|
40
|
-
- Single-pass parseable: LLMs generate correct code without symbol tables
|
|
41
|
-
- Readable by humans: pipe chains show data flow left-to-right
|
|
42
|
-
- Safe defaults: immutable values, type locking, no null/undefined
|
|
43
|
-
|
|
44
|
-
Use cases:
|
|
45
|
-
- Workflow orchestration: chain LLM calls, API requests, transformations
|
|
46
|
-
- State machines: \`(cond) @ { }\` loops with \`\$\` as state dict
|
|
47
|
-
- Data pipelines: \`each\`/\`map\`/\`filter\`/\`fold\` process collections declaratively
|
|
48
|
-
|
|
49
|
-
State machine pattern (\`\$\` carries state through iterations):
|
|
50
|
-
|
|
51
|
-
[state: "init", data: \$input]
|
|
52
|
-
-> (\$.state != "done") @ {
|
|
53
|
-
\$.state -> [
|
|
54
|
-
init: { [state: "process", data: transform(\$.data)] },
|
|
55
|
-
process: { [state: "done", data: finalize(\$.data)] }
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
## Naming Convention: snake_case
|
|
60
|
-
|
|
61
|
-
Use snake_case for all identifiers:
|
|
62
|
-
|
|
63
|
-
\$user_name, \$item_list, \$is_valid # variables
|
|
64
|
-
\$double_value, \$cleanup_text # closures
|
|
65
|
-
[first_name: "x", last_name: "y"] # dict keys
|
|
66
|
-
|
|
67
|
-
## Why Variables Use \$ Prefix
|
|
68
|
-
|
|
69
|
-
The \`\$\` prefix enables single-pass parsing without a symbol table:
|
|
70
|
-
|
|
71
|
-
name() -> host function call
|
|
72
|
-
\$name() -> closure invocation
|
|
73
|
-
\$name -> variable reference
|
|
74
|
-
name -> dict key literal
|
|
75
|
-
|
|
76
|
-
Without \`\$\`, \`process(data)\` is ambiguous: is \`process\` a host function or stored closure? Is \`data\` a variable or key? This would require tracking all declarations.
|
|
77
|
-
|
|
78
|
-
## Spacing Rules
|
|
79
|
-
|
|
80
|
-
Operators: space both sides 5 + 3, \$x -> .upper, "a" => \$b
|
|
81
|
-
Parentheses: no inner space (\$x + 1), (\$ > 3) ? "yes"
|
|
82
|
-
Braces: space inside { \$x + 1 }, each { \$ * 2 }
|
|
83
|
-
Brackets: no inner space \$list[0], \$dict.items[1]
|
|
84
|
-
Literals: space after , and : [1, 2, 3], [name: "x", age: 30]
|
|
85
|
-
Closures: space after params |x| (\$x * 2), |a, b| { \$a + \$b }
|
|
86
|
-
Methods: no space before . or ( \$str.upper(), \$list.join(", ")
|
|
87
|
-
Pipes: space both sides "x" -> .upper -> .len
|
|
88
|
-
Continuations: indent 2 spaces \$data
|
|
89
|
-
-> .filter { \$.active }
|
|
90
|
-
-> map { \$.name }
|
|
91
|
-
|
|
92
|
-
## Implicit \$ Shorthand (Always Prefer)
|
|
93
|
-
|
|
94
|
-
\$.method() -> .method "x" -> .upper (not \$.upper())
|
|
95
|
-
func(\$) -> func "x" -> log (not log(\$))
|
|
96
|
-
\$fn(\$) -> \$fn 5 -> \$double (not \$double(\$))
|
|
97
|
-
|
|
98
|
-
Don't capture just to continue — use line continuation instead:
|
|
99
|
-
|
|
100
|
-
# avoid # good
|
|
101
|
-
"x" => \$a "x"
|
|
102
|
-
\$a -> .upper => \$b -> .upper
|
|
103
|
-
\$b -> .len -> .len
|
|
104
|
-
|
|
105
|
-
Only capture when the variable is reused later in the code.
|
|
106
|
-
|
|
107
15
|
## Critical Differences from Mainstream Languages
|
|
108
16
|
|
|
109
17
|
### 1. No Assignment Operator
|
|
@@ -117,7 +25,7 @@ Example: \`"hello" => \$x -> .upper => \$y\` — \`\$x="hello"\`, \`\$y="HELLO"\
|
|
|
117
25
|
|
|
118
26
|
### 2. No Null/Undefined
|
|
119
27
|
|
|
120
|
-
Empty values (\`""\`, \`[]\`, \`[
|
|
28
|
+
Empty values (\`""\`, \`list[]\`, \`dict[]\`) exist. "No value" cannot be represented.
|
|
121
29
|
Use \`??\` for defaults: \`\$dict.field ?? "default"\`.
|
|
122
30
|
Use \`.empty\` to check: \`\$str -> .empty ? "was empty"\`.
|
|
123
31
|
|
|
@@ -144,28 +52,27 @@ Negation (\`!\`) also requires boolean:
|
|
|
144
52
|
Child scopes can READ parent variables but cannot WRITE or redeclare them.
|
|
145
53
|
Variables created inside blocks/loops do NOT leak out.
|
|
146
54
|
|
|
147
|
-
WRONG — outer variable modification (
|
|
55
|
+
WRONG — outer variable modification (runtime error):
|
|
148
56
|
|
|
149
57
|
0 => \$count
|
|
150
|
-
[1, 2, 3] -> each { \$count + 1 => \$count } #
|
|
151
|
-
\$count # still 0!
|
|
58
|
+
list[1, 2, 3] -> each { \$count + 1 => \$count } # ERROR: Cannot reassign outer variable
|
|
152
59
|
|
|
153
60
|
RIGHT — use \`fold\` for reduction:
|
|
154
61
|
|
|
155
|
-
[1, 2, 3] -> fold(0) { \$@ + \$ } # 6 (\$@ is accumulator)
|
|
62
|
+
list[1, 2, 3] -> fold(0) { \$@ + \$ } # 6 (\$@ is accumulator)
|
|
156
63
|
|
|
157
64
|
RIGHT — use \`each(init)\` for results AND accumulator:
|
|
158
65
|
|
|
159
|
-
[1, 2, 3] -> each(0) { \$@ + \$ } # [1, 3, 6] (running totals)
|
|
66
|
+
list[1, 2, 3] -> each(0) { \$@ + \$ } # list[1, 3, 6] (running totals)
|
|
160
67
|
|
|
161
68
|
RIGHT — use \`(cond) @ { }\` with \`\$\` as state dict for multiple values:
|
|
162
69
|
|
|
163
|
-
[iter: 0, max: 3, text: \$input, done: false]
|
|
70
|
+
dict[iter: 0, max: 3, text: \$input, done: false]
|
|
164
71
|
-> (!\$.done && \$.iter < \$.max) @ {
|
|
165
72
|
\$.iter + 1 => \$i
|
|
166
73
|
process(\$.text) => \$result
|
|
167
|
-
\$result.finished ? [iter: \$i, max: \$.max, text: \$.text, done: true]
|
|
168
|
-
! [iter: \$i, max: \$.max, text: \$result.text, done: false]
|
|
74
|
+
\$result.finished ? dict[iter: \$i, max: \$.max, text: \$.text, done: true]
|
|
75
|
+
! dict[iter: \$i, max: \$.max, text: \$result.text, done: false]
|
|
169
76
|
}
|
|
170
77
|
|
|
171
78
|
Pattern summary:
|
|
@@ -184,28 +91,68 @@ Built-in: \`assert\` (validate condition), \`error\` (halt with message).
|
|
|
184
91
|
|
|
185
92
|
All copies are deep. All comparisons are by value. No object identity.
|
|
186
93
|
|
|
187
|
-
[1, 2, 3] == [1, 2, 3] # true (content equality)
|
|
188
|
-
[1, 2] => \$a
|
|
189
|
-
\$a => \$b
|
|
94
|
+
list[1, 2, 3] == list[1, 2, 3] # true (content equality)
|
|
95
|
+
list[1, 2] => \$a
|
|
96
|
+
\$a => \$b # \$b is an independent deep copy
|
|
97
|
+
|
|
98
|
+
## Grammar Patterns
|
|
99
|
+
|
|
100
|
+
rill uses two bracket forms as grammar constructs (not function calls):
|
|
101
|
+
|
|
102
|
+
**\`keyword[...]\`** — collection literals. Keyword and \`[\` must be adjacent (no space):
|
|
103
|
+
|
|
104
|
+
list[1, 2, 3] # list
|
|
105
|
+
dict[name: "alice", age: 30] # dict (key: value pairs)
|
|
106
|
+
tuple[1, 2, 3] # positional argument unpacking
|
|
107
|
+
ordered[a: 1, b: 2] # named argument unpacking
|
|
108
|
+
|
|
109
|
+
list [1, 2] # ERROR: RILL-P007 (space before bracket)
|
|
110
|
+
|
|
111
|
+
**\`keyword<...>\`** — extraction operators. Custom grammar with \`,\` or \`:\` separators:
|
|
112
|
+
|
|
113
|
+
list[1, 2, 3] -> destruct<\$a, \$b, \$c> # destructure into variables
|
|
114
|
+
list[0,1,2,3] -> slice<1:3> # slice with start:stop:step
|
|
115
|
+
|
|
116
|
+
These are NOT function calls. They are parsed as special syntax by the compiler.
|
|
117
|
+
|
|
118
|
+
## Callable Types
|
|
119
|
+
|
|
120
|
+
rill has three callable types:
|
|
121
|
+
|
|
122
|
+
| Type | Source | Examples |
|
|
123
|
+
|------|--------|---------|
|
|
124
|
+
| Closure | Script-defined | \`\\|x\\| { \$x * 2 }\`, \`{ \$ + 1 }\` |
|
|
125
|
+
| Built-in function | Shipped with runtime | \`log\`, \`json\`, \`range\`, \`chain\`, \`error\` |
|
|
126
|
+
| Host function | Registered by host app | \`app::fetch()\`, \`app::prompt()\` |
|
|
127
|
+
|
|
128
|
+
The \`\$\` prefix disambiguates callables from variables and keys:
|
|
129
|
+
|
|
130
|
+
name() -> built-in or host function call
|
|
131
|
+
\$name() -> closure invocation
|
|
132
|
+
\$name -> variable reference
|
|
133
|
+
name -> dict key literal
|
|
134
|
+
|
|
135
|
+
Without \`\$\`, \`process(data)\` is ambiguous: is \`process\` a function or stored closure? Is \`data\` a variable or key? This would require tracking all declarations.
|
|
190
136
|
|
|
191
137
|
## Syntax Quick Reference
|
|
192
138
|
|
|
193
139
|
Variables: \$name (always prefixed with \$)
|
|
194
|
-
Strings: "hello {\$var}"
|
|
195
|
-
"""..."""
|
|
140
|
+
Strings: "hello {\$var}" # interpolation with {}
|
|
141
|
+
"""...""" # multiline (also interpolates)
|
|
196
142
|
Numbers: 42, 3.14, -7
|
|
197
143
|
Booleans: true, false
|
|
198
|
-
Lists: [1, 2, 3]
|
|
199
|
-
[...\$list, 4]
|
|
200
|
-
Dicts: [name: "alice", age: 30] # identifier keys
|
|
201
|
-
[1: "one", 2: "two"] # number keys (incl. negative: [-1: "neg"])
|
|
202
|
-
[true: "yes", false: "no"] # boolean keys
|
|
203
|
-
[["a", "b"]: 1]
|
|
204
|
-
[\$keyVar: value]
|
|
205
|
-
[(\$
|
|
206
|
-
Tuples:
|
|
207
|
-
|
|
208
|
-
|
|
144
|
+
Lists: list[1, 2, 3]
|
|
145
|
+
list[...\$list, 4] # spread: inline list elements
|
|
146
|
+
Dicts: dict[name: "alice", age: 30] # identifier keys
|
|
147
|
+
dict[1: "one", 2: "two"] # number keys (incl. negative: dict[-1: "neg"])
|
|
148
|
+
dict[true: "yes", false: "no"] # boolean keys
|
|
149
|
+
dict[list["a", "b"]: 1] # multi-key: dict[a: 1, b: 1]
|
|
150
|
+
dict[\$keyVar: value] # variable key (must eval to string)
|
|
151
|
+
dict[("{\$a}{\$b}"): value] # computed key (must eval to string)
|
|
152
|
+
Tuples: tuple[1, 2, 3] # positional argument unpacking
|
|
153
|
+
Ordered: ordered[a: 1, b: 2] # named argument unpacking (preserves order)
|
|
154
|
+
Closures: |x|(\$x + 1) # like lambda/arrow functions
|
|
155
|
+
Type annot: "hi" => \$x:string # lock type on capture
|
|
209
156
|
Comments: # single line only
|
|
210
157
|
|
|
211
158
|
## Pipes and \$ Binding
|
|
@@ -231,7 +178,7 @@ Example: \`"hello" -> .upper\` is the same as \`"hello" -> \$.upper()\`.
|
|
|
231
178
|
Conditional (if-else):
|
|
232
179
|
|
|
233
180
|
cond ? then_expr ! else_expr
|
|
234
|
-
cond ? then_expr # else returns
|
|
181
|
+
cond ? then_expr # else returns null
|
|
235
182
|
|
|
236
183
|
Piped conditional (\`\$\` becomes condition):
|
|
237
184
|
|
|
@@ -259,11 +206,16 @@ Do-condition loop (body runs at least once):
|
|
|
259
206
|
|
|
260
207
|
Break (exits loop, returns collected results before break):
|
|
261
208
|
|
|
262
|
-
[1,2,3,4,5] -> each {
|
|
209
|
+
list[1,2,3,4,5] -> each {
|
|
210
|
+
(\$ == 3) ? break
|
|
211
|
+
\$
|
|
212
|
+
} # returns list[1, 2]
|
|
263
213
|
|
|
264
214
|
Return (exits block or script with value):
|
|
265
215
|
|
|
266
|
-
|
|
216
|
+
5 => \$x
|
|
217
|
+
(\$x > 3) ? ("big" -> return)
|
|
218
|
+
"small" # returns "big"
|
|
267
219
|
"done" -> return # exits script with "done"
|
|
268
220
|
|
|
269
221
|
Assert (validate condition, halt if false, pass through if true):
|
|
@@ -283,8 +235,8 @@ Pass (returns \`\$\` unchanged, explicit no-op):
|
|
|
283
235
|
|
|
284
236
|
cond ? pass ! "fallback" # preserve \$ when condition true
|
|
285
237
|
cond ? "value" ! pass # preserve \$ when condition false
|
|
286
|
-
"data" -> { [status: pass] }
|
|
287
|
-
[1, -2, 3] -> map { (\$ > 0) ? pass ! 0 } # [1, 0, 3]
|
|
238
|
+
"data" -> { dict[status: pass] } # include \$ in dict: dict[status: "data"]
|
|
239
|
+
list[1, -2, 3] -> map { (\$ > 0) ? pass ! 0 } # list[1, 0, 3]
|
|
288
240
|
|
|
289
241
|
Note: \`pass\` requires pipe context. Using \`pass\` without \`\$\` throws error.
|
|
290
242
|
|
|
@@ -302,10 +254,10 @@ Note: \`pass\` requires pipe context. Using \`pass\` without \`\$\` throws error
|
|
|
302
254
|
|
|
303
255
|
Method shorthand in collection operators:
|
|
304
256
|
|
|
305
|
-
["a", "b"] -> map .upper
|
|
306
|
-
["", "x"] -> filter (!.empty)
|
|
307
|
-
["a", "b"] -> map .pad_start(3, "0")
|
|
308
|
-
[" HI "] -> map .trim.lower
|
|
257
|
+
list["a", "b"] -> map .upper # list["A", "B"]
|
|
258
|
+
list["", "x"] -> filter (!.empty) # list["x"]
|
|
259
|
+
list["a", "b"] -> map .pad_start(3, "0") # list["00a", "00b"] (with args)
|
|
260
|
+
list[" HI "] -> map .trim.lower # list["hi"] (chained methods)
|
|
309
261
|
|
|
310
262
|
Body forms (all operators accept these):
|
|
311
263
|
|
|
@@ -314,17 +266,17 @@ Body forms (all operators accept these):
|
|
|
314
266
|
-> each |x| (\$x * 2) # inline closure
|
|
315
267
|
-> each \$double # variable closure
|
|
316
268
|
-> each .upper # method shorthand
|
|
317
|
-
-> each log #
|
|
269
|
+
-> each log # built-in function
|
|
318
270
|
|
|
319
271
|
Dict iteration (\`\$\` contains \`key\` and \`value\` fields):
|
|
320
272
|
|
|
321
|
-
[a: 1, b: 2] -> each { "{\$.key}={\$.value}" } # ["a=1", "b=2"]
|
|
322
|
-
[a: 1, b: 5] -> filter { \$.value > 2 } # entries where value > 2
|
|
273
|
+
dict[a: 1, b: 2] -> each { "{\$.key}={\$.value}" } # list["a=1", "b=2"]
|
|
274
|
+
dict[a: 1, b: 5] -> filter { \$.value > 2 } # entries where value > 2
|
|
323
275
|
|
|
324
276
|
String iteration (iterates over characters):
|
|
325
277
|
|
|
326
|
-
"abc" -> each { "{\$}!" } # ["a!", "b!", "c!"]
|
|
327
|
-
"hello" -> filter { \$ != "l" } # ["h", "e", "o"]
|
|
278
|
+
"abc" -> each { "{\$}!" } # list["a!", "b!", "c!"]
|
|
279
|
+
"hello" -> filter { \$ != "l" } # list["h", "e", "o"]
|
|
328
280
|
|
|
329
281
|
## Closures
|
|
330
282
|
|
|
@@ -335,8 +287,8 @@ Two ways to create closures:
|
|
|
335
287
|
{ \$ + 1 } => \$inc # implicit \$ parameter
|
|
336
288
|
\$inc(5) # 6
|
|
337
289
|
5 -> \$inc # 6 (pipe invocation)
|
|
338
|
-
[x: { \$ * 2 }]
|
|
339
|
-
|
|
290
|
+
dict[x: { \$ * 2 }] # dict value is closure
|
|
291
|
+
{ "hi" }:?closure # true
|
|
340
292
|
|
|
341
293
|
**Explicit closures:** \`|params| body\`
|
|
342
294
|
|
|
@@ -345,6 +297,26 @@ Two ways to create closures:
|
|
|
345
297
|
|x = 0|(\$x + 1) => \$inc_or_one # default value
|
|
346
298
|
|x: number|(\$x + 1) => \$typed # type annotation
|
|
347
299
|
|
|
300
|
+
**Return type assertions** (enforced at runtime — RILL-R004 on mismatch):
|
|
301
|
+
|
|
302
|
+
|x: number| { "{\$x}" }:string => \$fn # asserts string return type
|
|
303
|
+
\$fn(42) # "42" (passes assertion)
|
|
304
|
+
|
|
305
|
+
|x: number| { \$x * 2 }:string => \$fn # mismatch halts with RILL-R004
|
|
306
|
+
\$fn(5) # RILL-R004: expected string, got number
|
|
307
|
+
|
|
308
|
+
Valid return type targets: string, number, bool, list, dict, any, vector, shape(...), \$shapeVar.
|
|
309
|
+
Declared return type accessible via \$fn.^output annotation.
|
|
310
|
+
|
|
311
|
+
**Description shorthand** (bare string in \`^(...)\` expands to \`description: <string>\`):
|
|
312
|
+
|
|
313
|
+
^("Get weather for city") |city: string|(\$city) => \$weather
|
|
314
|
+
\$weather.^description # "Get weather for city"
|
|
315
|
+
|
|
316
|
+
^("Fetch profile", cache: true) |id|(\$id) => \$get_user
|
|
317
|
+
\$get_user.^description # "Fetch profile"
|
|
318
|
+
\$get_user.^cache # true
|
|
319
|
+
|
|
348
320
|
\`{ body }\` vs \`( expr )\` distinction:
|
|
349
321
|
|
|
350
322
|
| Syntax | Semantics | Example |
|
|
@@ -361,7 +333,7 @@ LATE BINDING: closures capture scope, not values. Variables resolve at call time
|
|
|
361
333
|
|
|
362
334
|
Zero-param dict closures (methods):
|
|
363
335
|
|
|
364
|
-
[count: 3, double: ||{ \$.count * 2 }] => \$obj
|
|
336
|
+
dict[count: 3, double: ||{ \$.count * 2 }] => \$obj
|
|
365
337
|
\$obj.double # 6 (\$ is bound to dict)
|
|
366
338
|
|
|
367
339
|
## Property Access
|
|
@@ -383,29 +355,33 @@ Zero-param dict closures (methods):
|
|
|
383
355
|
|
|
384
356
|
**Dict dispatch** (single key) — pipe a value to a dict to match keys:
|
|
385
357
|
|
|
386
|
-
\$val -> [apple: "fruit", carrot: "veg"]
|
|
387
|
-
\$val -> [apple: "fruit"] ?? "not found"
|
|
388
|
-
\$method -> [["GET", "HEAD"]: "safe", ["POST", "PUT"]: "unsafe"] # multi-key
|
|
358
|
+
\$val -> dict[apple: "fruit", carrot: "veg"] # "fruit" if \$val is "apple"
|
|
359
|
+
\$val -> dict[apple: "fruit"] ?? "not found" # default if no match
|
|
360
|
+
\$method -> dict[list["GET", "HEAD"]: "safe", list["POST", "PUT"]: "unsafe"] # multi-key
|
|
389
361
|
|
|
390
362
|
Type-aware matching (keys matched by value AND type):
|
|
391
363
|
|
|
392
|
-
1 -> [1: "number", "1": "string"] # "number"
|
|
393
|
-
"1" -> [1: "number", "1": "string"] # "string"
|
|
394
|
-
true -> [true: "bool", "true": "str"] # "bool"
|
|
364
|
+
1 -> dict[1: "number", "1": "string"] # "number"
|
|
365
|
+
"1" -> dict[1: "number", "1": "string"] # "string"
|
|
366
|
+
true -> dict[true: "bool", "true": "str"] # "bool"
|
|
395
367
|
|
|
396
368
|
**List dispatch** (index) — pipe a number to a list:
|
|
397
369
|
|
|
398
|
-
0 -> ["first", "second"] # "first"
|
|
399
|
-
-1 -> ["first", "second"] # "second" (last)
|
|
400
|
-
5 -> ["a", "b"] ?? "not found" # default if out of bounds
|
|
370
|
+
0 -> list["first", "second"] # "first"
|
|
371
|
+
-1 -> list["first", "second"] # "second" (last)
|
|
372
|
+
5 -> list["a", "b"] ?? "not found" # default if out of bounds
|
|
401
373
|
|
|
402
374
|
**Hierarchical dispatch** (path navigation) — pipe a list of keys/indexes:
|
|
403
375
|
|
|
404
|
-
["name", "first"] -> [name: [first: "Alice"]]
|
|
405
|
-
[0, 1] -> [[1, 2, 3], [4, 5, 6]]
|
|
406
|
-
[
|
|
407
|
-
[] -> [a:
|
|
408
|
-
|
|
376
|
+
list["name", "first"] -> dict[name: dict[first: "Alice"]] # "Alice"
|
|
377
|
+
list[0, 1] -> list[list[1, 2, 3], list[4, 5, 6]] # 2
|
|
378
|
+
list[] -> dict[a: 1] # dict[a: 1] (empty path = unchanged)
|
|
379
|
+
list["a", "missing"] -> dict[a: dict[x: 1]] ?? "default" # "default"
|
|
380
|
+
|
|
381
|
+
Note: lists require same-type elements. For mixed paths (strings and numbers), use property access:
|
|
382
|
+
|
|
383
|
+
dict[users: list[dict[name: "Alice"]]] => \$d
|
|
384
|
+
\$d.users[0].name # "Alice"
|
|
409
385
|
|
|
410
386
|
## Type Operations
|
|
411
387
|
|
|
@@ -437,39 +413,31 @@ Use parentheses to override: \`(2 + 3) * 4\`
|
|
|
437
413
|
|
|
438
414
|
## Extraction Operators
|
|
439
415
|
|
|
440
|
-
Destructure (
|
|
416
|
+
Destructure (\`destruct<>\`):
|
|
441
417
|
|
|
442
|
-
[1, 2, 3] ->
|
|
443
|
-
[x: 1, y: 2] ->
|
|
444
|
-
[1, 2, 3] ->
|
|
418
|
+
list[1, 2, 3] -> destruct<\$a, \$b, \$c> # \$a=1, \$b=2, \$c=3
|
|
419
|
+
dict[x: 1, y: 2] -> destruct<x: \$a, y: \$b> # \$a=1, \$b=2
|
|
420
|
+
list[1, 2, 3] -> destruct<\$first, _, \$third> # _ skips element
|
|
445
421
|
|
|
446
|
-
Slice (
|
|
422
|
+
Slice (\`slice<start:stop:step>\`):
|
|
447
423
|
|
|
448
|
-
[0,1,2,3,4] ->
|
|
449
|
-
[0,1,2,3,4] ->
|
|
450
|
-
[0,1,2,3,4] ->
|
|
451
|
-
"hello" ->
|
|
424
|
+
list[0,1,2,3,4] -> slice<1:3> # list[1, 2]
|
|
425
|
+
list[0,1,2,3,4] -> slice<-2:> # list[3, 4]
|
|
426
|
+
list[0,1,2,3,4] -> slice<::-1> # list[4,3,2,1,0] (reverse)
|
|
427
|
+
"hello" -> slice<1:4> # "ell"
|
|
452
428
|
|
|
453
429
|
## List Spread in Literals
|
|
454
430
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
[
|
|
458
|
-
[
|
|
459
|
-
[...\$a, ...\$b] # concatenate lists
|
|
460
|
-
[...(\$nums -> map {\$ * 2})] # spread expression result
|
|
461
|
-
|
|
462
|
-
## Tuples for Argument Unpacking
|
|
463
|
-
|
|
464
|
-
*[1, 2, 3] -> \$fn() # positional: \$fn(1, 2, 3)
|
|
465
|
-
*[b: 2, a: 1] -> \$fn() # named: \$fn(a=1, b=2)
|
|
466
|
-
*[...\$list, 3] -> \$fn() # spread in tuple: combines elements
|
|
431
|
+
list[1, 2] => \$a
|
|
432
|
+
list[...\$a, 3] # list[1, 2, 3]
|
|
433
|
+
list[...\$a, ...\$b] # concatenate lists
|
|
434
|
+
list[...(\$nums -> map {\$ * 2})] # spread expression result
|
|
467
435
|
|
|
468
|
-
##
|
|
436
|
+
## Tuples and Ordered for Argument Unpacking
|
|
469
437
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
438
|
+
tuple[1, 2, 3] -> \$fn(...) # positional spread: \$fn(1, 2, 3)
|
|
439
|
+
ordered[a: 10, b: 2] -> \$fn(...) # named spread: keys must match parameter order
|
|
440
|
+
tuple[...\$list, 3] -> \$fn(...) # spread in tuple then spread into call
|
|
473
441
|
|
|
474
442
|
## String Methods
|
|
475
443
|
|
|
@@ -511,33 +479,33 @@ Chains closures sequentially (each receives previous result):
|
|
|
511
479
|
| \`.at(i)\` | element at index |
|
|
512
480
|
| \`.keys\` | dict keys as list |
|
|
513
481
|
| \`.values\` | dict values as list |
|
|
514
|
-
| \`.entries\` | dict as list of [k, v]
|
|
482
|
+
| \`.entries\` | dict as list of \`tuple[k, v]\` pairs |
|
|
515
483
|
| \`.has(val)\` | list contains value (deep equality) |
|
|
516
484
|
| \`.has_any(list)\` | list contains any value from candidates |
|
|
517
485
|
| \`.has_all(list)\` | list contains all values from candidates |
|
|
518
486
|
|
|
519
|
-
##
|
|
487
|
+
## Built-in Functions
|
|
520
488
|
|
|
521
489
|
| Function | Description |
|
|
522
490
|
|---|---|
|
|
523
|
-
| \`type(val)\` | returns type name |
|
|
524
491
|
| \`log(val)\` | print and pass through |
|
|
525
492
|
| \`json(val)\` | convert to JSON string |
|
|
526
493
|
| \`identity(val)\` | returns input unchanged |
|
|
527
494
|
| \`range(start, end, step?)\` | number sequence (iterator) |
|
|
528
495
|
| \`repeat(val, count)\` | repeat value n times (iterator) |
|
|
529
|
-
| \`enumerate(coll)\` | lists: [index, value]
|
|
496
|
+
| \`enumerate(coll)\` | lists: \`tuple[index, value]\`; dicts: \`tuple[index, key, value]\` |
|
|
497
|
+
| \`chain(\$fn)\` | apply single closure; chain(val, list[\$f, \$g]) applies in sequence |
|
|
530
498
|
|
|
531
499
|
## Iterators
|
|
532
500
|
|
|
533
501
|
Lazy sequence generation. Collection operators auto-expand iterators.
|
|
534
502
|
|
|
535
|
-
range(0, 5) -> each { \$ * 2 } # [0, 2, 4, 6, 8]
|
|
536
|
-
repeat("x", 3) -> each { \$ } # ["x", "x", "x"]
|
|
503
|
+
range(0, 5) -> each { \$ * 2 } # list[0, 2, 4, 6, 8]
|
|
504
|
+
repeat("x", 3) -> each { \$ } # list["x", "x", "x"]
|
|
537
505
|
|
|
538
506
|
\`.first()\` method (returns iterator for any collection):
|
|
539
507
|
|
|
540
|
-
[1, 2, 3] -> .first()
|
|
508
|
+
list[1, 2, 3] -> .first() # iterator at 1
|
|
541
509
|
"abc" -> .first() # iterator at "a"
|
|
542
510
|
|
|
543
511
|
Iterator protocol (dict with \`value\`, \`done\`, \`next\`):
|
|
@@ -549,10 +517,13 @@ Iterator protocol (dict with \`value\`, \`done\`, \`next\`):
|
|
|
549
517
|
## Iteration Limits
|
|
550
518
|
|
|
551
519
|
Default: 10,000 iterations max for loops.
|
|
552
|
-
Override: \`^(limit: N)\`
|
|
520
|
+
Override: \`^(limit: N)\` at operator level (between operator name and body).
|
|
521
|
+
|
|
522
|
+
0 -> (\$ < 50) @ ^(limit: 100) { \$ + 1 } # while loop
|
|
523
|
+
\$items -> each ^(limit: 1000) { process(\$) } # each operator
|
|
524
|
+
\$items -> map ^(limit: 3) { slow_process(\$) } # concurrency limit
|
|
553
525
|
|
|
554
|
-
|
|
555
|
-
^(limit: 3) \$items -> map { slow_process(\$) } # concurrency limit
|
|
526
|
+
Invalid annotation keys produce a runtime error.
|
|
556
527
|
|
|
557
528
|
## Script Return Values
|
|
558
529
|
|
|
@@ -560,7 +531,45 @@ Override: \`^(limit: N)\` statement.
|
|
|
560
531
|
|---|---|
|
|
561
532
|
| \`true\` / non-empty string | 0 |
|
|
562
533
|
| \`false\` / empty string | 1 |
|
|
563
|
-
| \`[0, "message"]\` | 0 with message |
|
|
564
|
-
| \`[1, "message"]\` | 1 with message |
|
|
534
|
+
| \`list[0, "message"]\` | 0 with message |
|
|
535
|
+
| \`list[1, "message"]\` | 1 with message |
|
|
536
|
+
|
|
537
|
+
## Style
|
|
538
|
+
|
|
539
|
+
### Naming: snake_case
|
|
540
|
+
|
|
541
|
+
\$user_name, \$item_list, \$is_valid # variables
|
|
542
|
+
\$double_value, \$cleanup_text # closures
|
|
543
|
+
dict[first_name: "x", last_name: "y"] # dict keys
|
|
544
|
+
|
|
545
|
+
### Spacing
|
|
546
|
+
|
|
547
|
+
Operators: space both sides 5 + 3, \$x -> .upper, "a" => \$b
|
|
548
|
+
Parentheses: no inner space (\$x + 1), (\$ > 3) ? "yes"
|
|
549
|
+
Braces: space inside { \$x + 1 }, each { \$ * 2 }
|
|
550
|
+
Brackets: no inner space \$list[0], \$dict.items[1]
|
|
551
|
+
Literals: space after , and : list[1, 2, 3], dict[name: "x", age: 30]
|
|
552
|
+
Keyword+[ NO space between list[1, 2] (not list [1, 2] — RILL-P007)
|
|
553
|
+
Closures: space after params |x| (\$x * 2), |a, b| { \$a + \$b }
|
|
554
|
+
Methods: no space before . or ( \$str.upper(), \$list.join(", ")
|
|
555
|
+
Pipes: space both sides "x" -> .upper -> .len
|
|
556
|
+
Continuations: indent 2 spaces \$data
|
|
557
|
+
-> .filter { \$.active }
|
|
558
|
+
-> map { \$.name }
|
|
559
|
+
|
|
560
|
+
### Implicit \$ Shorthand (Always Prefer)
|
|
561
|
+
|
|
562
|
+
\$.method() -> .method "x" -> .upper (not \$.upper())
|
|
563
|
+
func(\$) -> func "x" -> log (not log(\$))
|
|
564
|
+
\$fn(\$) -> \$fn 5 -> \$double (not \$double(\$))
|
|
565
|
+
|
|
566
|
+
Don't capture just to continue — use line continuation instead:
|
|
567
|
+
|
|
568
|
+
# avoid # good
|
|
569
|
+
"x" => \$a "x"
|
|
570
|
+
\$a -> .upper => \$b -> .upper
|
|
571
|
+
\$b -> .len -> .len
|
|
572
|
+
|
|
573
|
+
Only capture when the variable is reused later in the code.
|
|
565
574
|
`;
|
|
566
575
|
//# sourceMappingURL=introspection-data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"introspection-data.js","sourceRoot":"","sources":["../../src/generated/introspection-data.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,mFAAmF;AAEnF,MAAM,CAAC,MAAM,kBAAkB,GAAG
|
|
1
|
+
{"version":3,"file":"introspection-data.js","sourceRoot":"","sources":["../../src/generated/introspection-data.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,mFAAmF;AAEnF,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2jBjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-data.d.ts","sourceRoot":"","sources":["../../src/generated/version-data.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED;;GAEG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version-data.d.ts","sourceRoot":"","sources":["../../src/generated/version-data.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED;;GAEG;AACH,eAAO,MAAM,OAAO,WAAW,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,WAK1B,CAAC"}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Version string from package.json
|
|
5
5
|
*/
|
|
6
|
-
export const VERSION = '0.
|
|
6
|
+
export const VERSION = '0.10.0';
|
|
7
7
|
/**
|
|
8
8
|
* Parsed version components
|
|
9
9
|
*/
|
|
10
10
|
export const VERSION_INFO = {
|
|
11
11
|
major: 0,
|
|
12
|
-
minor:
|
|
13
|
-
patch:
|
|
12
|
+
minor: 10,
|
|
13
|
+
patch: 0,
|
|
14
14
|
prerelease: undefined,
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=version-data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-data.js","sourceRoot":"","sources":["../../src/generated/version-data.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,2EAA2E;AAY3E;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version-data.js","sourceRoot":"","sources":["../../src/generated/version-data.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,2EAA2E;AAY3E;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAgB;IACvC,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,UAAU,EAAE,SAAS;CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight-map.d.ts","sourceRoot":"","sources":["../src/highlight-map.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAM5C,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,SAAS,GACT,cAAc,GACd,aAAa,GACb,SAAS,GACT,MAAM,CAAC;AAMX,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,SAAS,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"highlight-map.d.ts","sourceRoot":"","sources":["../src/highlight-map.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAM5C,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,SAAS,GACT,cAAc,GACd,aAAa,GACb,SAAS,GACT,MAAM,CAAC;AAMX,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,SAAS,EAAE,iBAAiB,CAkFtE,CAAC"}
|
package/dist/highlight-map.js
CHANGED
|
@@ -9,6 +9,13 @@ export const TOKEN_HIGHLIGHT_MAP = new Map([
|
|
|
9
9
|
['FALSE', 'bool'],
|
|
10
10
|
// Comments
|
|
11
11
|
['COMMENT', 'comment'],
|
|
12
|
+
// Compound keywords
|
|
13
|
+
['LIST_LBRACKET', 'keyword'],
|
|
14
|
+
['DICT_LBRACKET', 'keyword'],
|
|
15
|
+
['TUPLE_LBRACKET', 'keyword'],
|
|
16
|
+
['ORDERED_LBRACKET', 'keyword'],
|
|
17
|
+
['DESTRUCT_LANGLE', 'keyword'],
|
|
18
|
+
['SLICE_LANGLE', 'keyword'],
|
|
12
19
|
// Keywords
|
|
13
20
|
['EACH', 'keyword'],
|
|
14
21
|
['MAP', 'keyword'],
|
|
@@ -45,9 +52,8 @@ export const TOKEN_HIGHLIGHT_MAP = new Map([
|
|
|
45
52
|
['BANG', 'operator'],
|
|
46
53
|
['NULLISH_COALESCE', 'operator'],
|
|
47
54
|
['DOT_QUESTION', 'operator'],
|
|
48
|
-
['STAR_LT', 'operator'],
|
|
49
|
-
['SLASH_LT', 'operator'],
|
|
50
55
|
['ELLIPSIS', 'operator'],
|
|
56
|
+
['CONVERT', 'operator'],
|
|
51
57
|
['AT', 'operator'],
|
|
52
58
|
['CARET', 'operator'],
|
|
53
59
|
['AMPERSAND', 'operator'],
|