dirac-lang 0.1.28 → 0.1.29

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.
@@ -419,12 +419,12 @@ async function executeIf(session, element) {
419
419
  const condition = await evaluatePredicate(session, conditionElement);
420
420
  if (condition) {
421
421
  if (thenElement) {
422
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-Q6UF3RRU.js");
422
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-BB4H4XG4.js");
423
423
  await integrateChildren2(session, thenElement);
424
424
  }
425
425
  } else {
426
426
  if (elseElement) {
427
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-Q6UF3RRU.js");
427
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-BB4H4XG4.js");
428
428
  await integrateChildren2(session, elseElement);
429
429
  }
430
430
  }
@@ -437,7 +437,7 @@ async function evaluatePredicate(session, predicateElement) {
437
437
  return await evaluateCondition(session, predicateElement);
438
438
  }
439
439
  const outputLengthBefore = session.output.length;
440
- const { integrate: integrate2 } = await import("./interpreter-Q6UF3RRU.js");
440
+ const { integrate: integrate2 } = await import("./interpreter-BB4H4XG4.js");
441
441
  await integrate2(session, predicateElement);
442
442
  const newOutputChunks = session.output.slice(outputLengthBefore);
443
443
  const result = newOutputChunks.join("").trim();
@@ -460,11 +460,11 @@ async function evaluateCondition(session, condElement) {
460
460
  }
461
461
  const outputLengthBefore = session.output.length;
462
462
  const args = [];
463
- const { integrate: integrate2 } = await import("./interpreter-Q6UF3RRU.js");
463
+ const { integrate: integrate2 } = await import("./interpreter-BB4H4XG4.js");
464
464
  for (const child of condElement.children) {
465
465
  if (child.tag.toLowerCase() === "arg") {
466
466
  const argOutputStart = session.output.length;
467
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-Q6UF3RRU.js");
467
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-BB4H4XG4.js");
468
468
  await integrateChildren2(session, child);
469
469
  const newChunks = session.output.slice(argOutputStart);
470
470
  const argValue = newChunks.join("");
@@ -1323,7 +1323,7 @@ async function executeTagCheck(session, element) {
1323
1323
  const executeTag = correctedTag || tagName;
1324
1324
  console.error(`[tag-check] Executing <${executeTag}/> as all checks passed and execute=true.`);
1325
1325
  const elementToExecute = correctedTag ? { ...child, tag: correctedTag } : child;
1326
- const { integrate: integrate2 } = await import("./interpreter-Q6UF3RRU.js");
1326
+ const { integrate: integrate2 } = await import("./interpreter-BB4H4XG4.js");
1327
1327
  await integrate2(session, elementToExecute);
1328
1328
  }
1329
1329
  }
@@ -1332,7 +1332,7 @@ async function executeTagCheck(session, element) {
1332
1332
  // src/tags/throw.ts
1333
1333
  async function executeThrow(session, element) {
1334
1334
  const exceptionName = element.attributes?.name || "exception";
1335
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-Q6UF3RRU.js");
1335
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-BB4H4XG4.js");
1336
1336
  const exceptionDom = {
1337
1337
  tag: "exception-content",
1338
1338
  attributes: { name: exceptionName },
@@ -1345,7 +1345,7 @@ async function executeThrow(session, element) {
1345
1345
  // src/tags/try.ts
1346
1346
  async function executeTry(session, element) {
1347
1347
  setExceptionBoundary(session);
1348
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-Q6UF3RRU.js");
1348
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-BB4H4XG4.js");
1349
1349
  await integrateChildren2(session, element);
1350
1350
  unsetExceptionBoundary(session);
1351
1351
  }
@@ -1355,7 +1355,7 @@ async function executeCatch(session, element) {
1355
1355
  const exceptionName = element.attributes?.name || "exception";
1356
1356
  const caughtCount = lookupException(session, exceptionName);
1357
1357
  if (caughtCount > 0) {
1358
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-Q6UF3RRU.js");
1358
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-BB4H4XG4.js");
1359
1359
  await integrateChildren2(session, element);
1360
1360
  }
1361
1361
  flushCurrentException(session);
@@ -1364,7 +1364,7 @@ async function executeCatch(session, element) {
1364
1364
  // src/tags/exception.ts
1365
1365
  async function executeException(session, element) {
1366
1366
  const exceptions = getCurrentExceptions(session);
1367
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-Q6UF3RRU.js");
1367
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-BB4H4XG4.js");
1368
1368
  for (const exceptionDom of exceptions) {
1369
1369
  await integrateChildren2(session, exceptionDom);
1370
1370
  }
@@ -1504,7 +1504,7 @@ async function executeForeach(session, element) {
1504
1504
  const parser2 = new DiracParser2();
1505
1505
  try {
1506
1506
  const fromElement = parser2.parse(fromAttr);
1507
- const { integrate: integrate2 } = await import("./interpreter-Q6UF3RRU.js");
1507
+ const { integrate: integrate2 } = await import("./interpreter-BB4H4XG4.js");
1508
1508
  await integrate2(session, fromElement);
1509
1509
  } catch (e) {
1510
1510
  session.output = savedOutput;
@@ -1597,6 +1597,11 @@ function matchesXPath(item, xpath) {
1597
1597
  return true;
1598
1598
  }
1599
1599
 
1600
+ // src/tags/break.ts
1601
+ async function executeBreak(session, element) {
1602
+ session.isBreak = true;
1603
+ }
1604
+
1600
1605
  // src/tags/attr.ts
1601
1606
  async function executeAttr(session, element) {
1602
1607
  const nameAttr = element.attributes.name;
@@ -1791,6 +1796,9 @@ async function integrate(session, element) {
1791
1796
  case "loop":
1792
1797
  await executeLoop(session, element);
1793
1798
  break;
1799
+ case "break":
1800
+ await executeBreak(session, element);
1801
+ break;
1794
1802
  case "if":
1795
1803
  await executeIf(session, element);
1796
1804
  break;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  integrate
3
- } from "./chunk-EVNSAF33.js";
3
+ } from "./chunk-VURAZURY.js";
4
4
  import {
5
5
  DiracParser
6
6
  } from "./chunk-HRHAMPOB.js";
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  execute
4
- } from "./chunk-465O4WMH.js";
5
- import "./chunk-EVNSAF33.js";
4
+ } from "./chunk-YV6QRRMT.js";
5
+ import "./chunk-VURAZURY.js";
6
6
  import "./chunk-HRHAMPOB.js";
7
7
  import "./chunk-LXF5PGUX.js";
8
8
  import "./chunk-BSQV77YM.js";
package/dist/index.js CHANGED
@@ -2,10 +2,10 @@ import {
2
2
  createLLMAdapter,
3
3
  execute,
4
4
  executeUserCommand
5
- } from "./chunk-465O4WMH.js";
5
+ } from "./chunk-YV6QRRMT.js";
6
6
  import {
7
7
  integrate
8
- } from "./chunk-EVNSAF33.js";
8
+ } from "./chunk-VURAZURY.js";
9
9
  import {
10
10
  DiracParser
11
11
  } from "./chunk-HRHAMPOB.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  integrate,
3
3
  integrateChildren
4
- } from "./chunk-EVNSAF33.js";
4
+ } from "./chunk-VURAZURY.js";
5
5
  import "./chunk-HRHAMPOB.js";
6
6
  import "./chunk-LXF5PGUX.js";
7
7
  import "./chunk-BSQV77YM.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  integrate
3
- } from "./chunk-EVNSAF33.js";
3
+ } from "./chunk-VURAZURY.js";
4
4
  import {
5
5
  DiracParser
6
6
  } from "./chunk-HRHAMPOB.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dirac-lang",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "LLM-Augmented Declarative Execution",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",