dirac-lang 0.1.53 → 0.1.54
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.
|
@@ -73,15 +73,19 @@ var BraKetParser = class {
|
|
|
73
73
|
if (!content.trim()) {
|
|
74
74
|
return { indent, type: "empty", raw };
|
|
75
75
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
76
|
+
if (content.startsWith("<") && content.endsWith("|")) {
|
|
77
|
+
const tagMatch = content.match(/^<([a-zA-Z_][a-zA-Z0-9_-]*)\s*/);
|
|
78
|
+
if (tagMatch) {
|
|
79
|
+
const tagName = tagMatch[1];
|
|
80
|
+
const afterTag = content.substring(tagMatch[0].length, content.length - 1);
|
|
81
|
+
return {
|
|
82
|
+
indent,
|
|
83
|
+
type: "bra",
|
|
84
|
+
tag: tagName,
|
|
85
|
+
attrs: afterTag.trim() || void 0,
|
|
86
|
+
raw
|
|
87
|
+
};
|
|
88
|
+
}
|
|
85
89
|
}
|
|
86
90
|
const ketMatch = content.match(/^\|([a-zA-Z_][a-zA-Z0-9_-]*)\s*([^>]*?)>\s*(.*)/);
|
|
87
91
|
if (ketMatch) {
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
BraKetParser
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-C6DBZRQZ.js";
|
|
5
5
|
import {
|
|
6
6
|
execute
|
|
7
7
|
} from "./chunk-EXP3R5ZJ.js";
|
|
@@ -96,7 +96,7 @@ async function main() {
|
|
|
96
96
|
process.exit(0);
|
|
97
97
|
}
|
|
98
98
|
if (args[0] === "shell") {
|
|
99
|
-
const { DiracShell } = await import("./shell-
|
|
99
|
+
const { DiracShell } = await import("./shell-XIJKOMBE.js");
|
|
100
100
|
const shellConfig = { debug: false };
|
|
101
101
|
for (let i = 1; i < args.length; i++) {
|
|
102
102
|
const arg = args[i];
|