@weborigami/language 0.0.59 → 0.0.61
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/main.js +0 -2
- package/package.json +3 -3
- package/src/compiler/origami.pegjs +8 -1
- package/src/compiler/parse.js +373 -277
- package/src/runtime/ExpressionTree.js +3 -17
- package/src/runtime/HandleExtensionsTransform.js +1 -3
- package/src/runtime/InvokeFunctionsTransform.js +2 -4
- package/src/runtime/OrigamiTransform.d.ts +1 -7
- package/src/runtime/OrigamiTransform.js +2 -12
- package/src/runtime/evaluate.js +27 -12
- package/src/runtime/functionResultsMap.js +2 -4
- package/src/runtime/handleExtension.js +5 -5
- package/src/runtime/mergeTrees.js +1 -16
- package/src/runtime/ops.js +46 -29
- package/test/compiler/compile.test.js +4 -4
- package/test/compiler/parse.test.js +1 -0
- package/test/runtime/HandleExtensionsTransform.test.js +7 -8
- package/test/runtime/evaluate.test.js +19 -9
- package/test/runtime/functionResultsMap.test.js +9 -12
- package/test/runtime/mergeTrees.test.js +0 -26
- package/test/runtime/ops.test.js +7 -6
- package/src/runtime/InheritScopeMixin.d.ts +0 -9
- package/src/runtime/InheritScopeMixin.js +0 -34
- package/src/runtime/Scope.js +0 -96
- package/test/runtime/InheritScopeMixin.test.js +0 -29
- package/test/runtime/Scope.test.js +0 -37
- package/test/runtime/fixtures/programs/context.yaml +0 -4
- package/test/runtime/fixtures/programs/files.yaml +0 -2
- package/test/runtime/fixtures/programs/obj.yaml +0 -3
- package/test/runtime/fixtures/programs/simple.yaml +0 -2
package/main.js
CHANGED
|
@@ -5,12 +5,10 @@ export { default as EventTargetMixin } from "./src/runtime/EventTargetMixin.js";
|
|
|
5
5
|
export { default as ExpressionTree } from "./src/runtime/ExpressionTree.js";
|
|
6
6
|
export { default as HandleExtensionsTransform } from "./src/runtime/HandleExtensionsTransform.js";
|
|
7
7
|
export { default as ImportModulesMixin } from "./src/runtime/ImportModulesMixin.js";
|
|
8
|
-
export { default as InheritScopeMixin } from "./src/runtime/InheritScopeMixin.js";
|
|
9
8
|
export { default as InvokeFunctionsTransform } from "./src/runtime/InvokeFunctionsTransform.js";
|
|
10
9
|
export { default as OrigamiFiles } from "./src/runtime/OrigamiFiles.js";
|
|
11
10
|
export { default as OrigamiTransform } from "./src/runtime/OrigamiTransform.js";
|
|
12
11
|
export { default as OrigamiTree } from "./src/runtime/OrigamiTree.js";
|
|
13
|
-
export { default as Scope } from "./src/runtime/Scope.js";
|
|
14
12
|
export { default as TreeEvent } from "./src/runtime/TreeEvent.js";
|
|
15
13
|
export { default as WatchFilesMixin } from "./src/runtime/WatchFilesMixin.js";
|
|
16
14
|
export { default as evaluate } from "./src/runtime/evaluate.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weborigami/language",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.61",
|
|
4
4
|
"description": "Web Origami expression language compiler and runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./main.js",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"typescript": "5.5.3"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@weborigami/async-tree": "0.0.
|
|
15
|
-
"@weborigami/types": "0.0.
|
|
14
|
+
"@weborigami/async-tree": "0.0.61",
|
|
15
|
+
"@weborigami/types": "0.0.61",
|
|
16
16
|
"watcher": "2.3.1"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
@@ -138,6 +138,12 @@ functionComposition "function composition"
|
|
|
138
138
|
group "parenthetical group"
|
|
139
139
|
= "(" __ @expr __ closingParen
|
|
140
140
|
|
|
141
|
+
guillemetString "guillemet string"
|
|
142
|
+
= '«' chars:guillemetStringChar* '»' { return chars.join(""); }
|
|
143
|
+
|
|
144
|
+
guillemetStringChar
|
|
145
|
+
= !('»' / newLine) @textChar
|
|
146
|
+
|
|
141
147
|
// A host identifier that may include a colon and port number: `example.com:80`.
|
|
142
148
|
// This is used as a special case at the head of a path, where we want to
|
|
143
149
|
// interpret a colon as part of a text identifier.
|
|
@@ -148,7 +154,7 @@ identifier "identifier"
|
|
|
148
154
|
= chars:identifierChar+ { return chars.join(""); }
|
|
149
155
|
|
|
150
156
|
identifierChar
|
|
151
|
-
= [^(){}\[\]<>\-=,/:\`"'
|
|
157
|
+
= [^(){}\[\]<>\-=,/:\`"'«»\\ →⇒\t\n\r] // No unescaped whitespace or special chars
|
|
152
158
|
/ @'-' !'>' // Accept a hyphen but not in a single arrow combination
|
|
153
159
|
/ escapedChar
|
|
154
160
|
|
|
@@ -333,6 +339,7 @@ start
|
|
|
333
339
|
string "string"
|
|
334
340
|
= doubleQuoteString
|
|
335
341
|
/ singleQuoteString
|
|
342
|
+
/ guillemetString
|
|
336
343
|
|
|
337
344
|
// A top-level document defining a template. This is the same as a template
|
|
338
345
|
// literal, but can contain backticks at the top level.
|