@o-lang/olang 1.2.14 → 1.2.15
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/package.json +1 -1
- package/src/parser/index.js +24 -27
- package/src/runtime/RuntimeAPI.js +775 -471
- package/src/runtime/index.js +1 -1
package/package.json
CHANGED
package/src/parser/index.js
CHANGED
|
@@ -529,34 +529,31 @@ function parseBlock(lines) {
|
|
|
529
529
|
continue;
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
-
// Use in block
|
|
533
|
-
const useMatch = line.match(/^Use\s+(.+)$/i);
|
|
534
|
-
if (useMatch) {
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
// Ask in block — CANONICALIZE AT PARSE TIME
|
|
548
|
-
const askMatch = line.match(/^Ask\s+(.+)$/i);
|
|
549
|
-
if (askMatch) {
|
|
550
|
-
flush();
|
|
551
|
-
steps.push({
|
|
552
|
-
type: 'action',
|
|
553
|
-
actionRaw: `Action ${askMatch[1].trim()}`,
|
|
554
|
-
saveAs: null,
|
|
555
|
-
constraints: {}
|
|
556
|
-
});
|
|
557
|
-
continue;
|
|
558
|
-
}
|
|
532
|
+
// ✅ FIXED: Use in block — consistent with top-level Use handler (Bug 1 + Bug 2)
|
|
533
|
+
const useMatch = line.match(/^Use\s+(.+)$/i);
|
|
534
|
+
if (useMatch) {
|
|
535
|
+
flush();
|
|
536
|
+
steps.push({
|
|
537
|
+
type: 'use',
|
|
538
|
+
tool: useMatch[1].trim(),
|
|
539
|
+
saveAs: null,
|
|
540
|
+
constraints: {}
|
|
541
|
+
});
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
559
544
|
|
|
545
|
+
// Ask in block — CANONICALIZE AT PARSE TIME
|
|
546
|
+
const askMatch = line.match(/^Ask\s+(.+)$/i);
|
|
547
|
+
if (askMatch) {
|
|
548
|
+
flush();
|
|
549
|
+
steps.push({
|
|
550
|
+
type: 'action',
|
|
551
|
+
actionRaw: `Action ${askMatch[1].trim()}`,
|
|
552
|
+
saveAs: null,
|
|
553
|
+
constraints: {}
|
|
554
|
+
});
|
|
555
|
+
continue;
|
|
556
|
+
}
|
|
560
557
|
|
|
561
558
|
// Constraint inside block
|
|
562
559
|
const constraintMatch = line.match(/^Constraint:\s*(.+)$/i);
|