littlewing 2.1.1 → 2.3.1

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare namespace exports_ast {
2
- export { unaryOp, subtract, string, rangeExpr, program, placeholder, pipeExpr, number, notEquals, negate, multiply, modulo, logicalOr, logicalNot, logicalAnd, lessThan, lessEqual, isUnaryOp, isStringLiteral, isRangeExpression, isProgram, isPlaceholder, isPipeExpression, isNumberLiteral, isIndexAccess, isIfExpression, isIdentifier, isFunctionCall, isForExpression, isBooleanLiteral, isBinaryOp, isAssignment, isArrayLiteral, indexAccess, ifExpr, identifier, greaterThan, greaterEqual, getNodeName, functionCall, forExpr, exponentiate, equals, divide, boolean, binaryOp, assign, array, add, UnaryOp, StringLiteral, RangeExpression, Program, Placeholder, PipeExpression, Operator, NumberLiteral, NodeKind, IndexAccess, IfExpression, Identifier2 as Identifier, FunctionCall, ForExpression, BooleanLiteral, BinaryOp, Assignment, ArrayLiteral, ASTNodeBase, ASTNode };
2
+ export { visit, unaryOp, subtract, string, rangeExpr, program, placeholder, pipeExpr, number, notEquals, negate, multiply, modulo, logicalOr, logicalNot, logicalAnd, lessThan, lessEqual, isUnaryOp, isStringLiteral, isRangeExpression, isProgram, isPlaceholder, isPipeExpression, isNumberLiteral, isIndexAccess, isIfExpression, isIdentifier, isFunctionCall, isForExpression, isBooleanLiteral, isBinaryOp, isAssignment, isArrayLiteral, indexAccess, ifExpr, identifier, greaterThan, greaterEqual, getNodeName, functionCall, forExpr, exponentiate, equals, divide, boolean, binaryOp, assign, array, add, Visitor, UnaryOp, StringLiteral, RangeExpression, Program, Placeholder, PipeExpression, Operator, NumberLiteral, NodeKind, IndexAccess, IfExpression, Identifier2 as Identifier, FunctionCall, ForExpression, BooleanLiteral, BinaryOp, Assignment, ArrayLiteral, ASTNodeBase, ASTNode };
3
3
  }
4
4
  /**
5
5
  * Binary operator types
@@ -172,6 +172,25 @@ interface Placeholder extends ASTNodeBase {
172
172
  * AST Node - discriminated union of all node types
173
173
  */
174
174
  type ASTNode = Program | NumberLiteral | StringLiteral | BooleanLiteral | ArrayLiteral | Identifier2 | BinaryOp | UnaryOp | FunctionCall | Assignment | IfExpression | ForExpression | IndexAccess | RangeExpression | PipeExpression | Placeholder;
175
+ interface Visitor<T> {
176
+ Program: (node: Program, recurse: (child: ASTNode) => T) => T;
177
+ NumberLiteral: (node: NumberLiteral, recurse: (child: ASTNode) => T) => T;
178
+ StringLiteral: (node: StringLiteral, recurse: (child: ASTNode) => T) => T;
179
+ BooleanLiteral: (node: BooleanLiteral, recurse: (child: ASTNode) => T) => T;
180
+ ArrayLiteral: (node: ArrayLiteral, recurse: (child: ASTNode) => T) => T;
181
+ Identifier2: (node: Identifier2, recurse: (child: ASTNode) => T) => T;
182
+ BinaryOp: (node: BinaryOp, recurse: (child: ASTNode) => T) => T;
183
+ UnaryOp: (node: UnaryOp, recurse: (child: ASTNode) => T) => T;
184
+ FunctionCall: (node: FunctionCall, recurse: (child: ASTNode) => T) => T;
185
+ Assignment: (node: Assignment, recurse: (child: ASTNode) => T) => T;
186
+ IfExpression: (node: IfExpression, recurse: (child: ASTNode) => T) => T;
187
+ ForExpression: (node: ForExpression, recurse: (child: ASTNode) => T) => T;
188
+ IndexAccess: (node: IndexAccess, recurse: (child: ASTNode) => T) => T;
189
+ RangeExpression: (node: RangeExpression, recurse: (child: ASTNode) => T) => T;
190
+ PipeExpression: (node: PipeExpression, recurse: (child: ASTNode) => T) => T;
191
+ Placeholder: (node: Placeholder, recurse: (child: ASTNode) => T) => T;
192
+ }
193
+ declare function visit<T>(node: ASTNode, visitor: Visitor<T>): T;
175
194
  /**
176
195
  * Type guard functions for discriminated union narrowing
177
196
  */
@@ -206,9 +225,6 @@ declare function number(value: number): NumberLiteral;
206
225
  * Create a string literal node
207
226
  */
208
227
  declare function string(value: string): StringLiteral;
209
- /**
210
- * Create a boolean literal node
211
- */
212
228
  declare function boolean(value: boolean): BooleanLiteral;
213
229
  /**
214
230
  * Create an array literal node
@@ -257,9 +273,6 @@ declare function rangeExpr(start: ASTNode, end: ASTNode, inclusive: boolean): Ra
257
273
  * Create a pipe expression node (value |> FUN(?, arg))
258
274
  */
259
275
  declare function pipeExpr(value: ASTNode, name: string, args: readonly ASTNode[]): PipeExpression;
260
- /**
261
- * Create a placeholder node (?) for use in pipe expression arguments
262
- */
263
276
  declare function placeholder(): Placeholder;
264
277
  /**
265
278
  * Convenience functions for common operations
@@ -320,6 +333,23 @@ declare function extractInputVariables(ast: ASTNode): string[];
320
333
  */
321
334
  declare function extractAssignedVariables(ast: ASTNode): string[];
322
335
  /**
336
+ * Error thrown when parsing fails. Carries byte offsets into the source string
337
+ * so callers can display precise error locations.
338
+ */
339
+ declare class ParseError extends Error {
340
+ readonly start: number;
341
+ readonly end: number;
342
+ readonly name = "ParseError";
343
+ constructor(message: string, start: number, end: number);
344
+ }
345
+ /**
346
+ * Convert a byte offset into a source string to a 1-based line and column.
347
+ */
348
+ declare function toLineColumn(source: string, offset: number): {
349
+ line: number;
350
+ column: number;
351
+ };
352
+ /**
323
353
  * Generate source code from an AST node
324
354
  */
325
355
  declare function generate(node: ASTNode): string;
@@ -337,6 +367,13 @@ interface ExecutionContext {
337
367
  variables?: Record<string, RuntimeValue>;
338
368
  }
339
369
  /**
370
+ * Result of evaluating source or an AST in a single pass.
371
+ */
372
+ interface ExecutionResult {
373
+ value: RuntimeValue;
374
+ scope: Record<string, RuntimeValue>;
375
+ }
376
+ /**
340
377
  * Evaluate source code or AST with given context
341
378
  */
342
379
  declare function evaluate(input: string | ASTNode, context?: ExecutionContext): RuntimeValue;
@@ -345,6 +382,10 @@ declare function evaluate(input: string | ASTNode, context?: ExecutionContext):
345
382
  */
346
383
  declare function evaluateScope(input: string | ASTNode, context?: ExecutionContext): Record<string, RuntimeValue>;
347
384
  /**
385
+ * Evaluate source code or AST and return both the result value and full variable scope.
386
+ */
387
+ declare function evaluateWithScope(input: string | ASTNode, context?: ExecutionContext): ExecutionResult;
388
+ /**
348
389
  * Optimize an AST using constant folding, constant propagation, and dead code elimination.
349
390
  *
350
391
  * When `externalVariables` is provided, the optimizer can safely propagate variables
@@ -357,31 +398,9 @@ declare function optimize(node: ASTNode, externalVariables?: ReadonlySet<string>
357
398
  */
358
399
  declare function parse(source: string): ASTNode;
359
400
  declare namespace array {
360
- export { ARR_UNIQUE, ARR_SUM, ARR_SORT, ARR_SLICE, ARR_REVERSE, ARR_PUSH, ARR_MIN, ARR_MAX, ARR_LEN, ARR_JOIN, ARR_FLAT, ARR_CONTAINS };
401
+ export { ARR_UNIQUE, ARR_SUM, ARR_SORT, ARR_MIN, ARR_MAX, ARR_JOIN, ARR_FLAT };
361
402
  }
362
403
  /**
363
- * Get the length of an array
364
- */
365
- declare const ARR_LEN: (a: RuntimeValue) => RuntimeValue;
366
- /**
367
- * Append a value to an array, returning a new array
368
- * Validates homogeneity
369
- */
370
- declare const ARR_PUSH: (a: RuntimeValue, value: RuntimeValue) => RuntimeValue;
371
- /**
372
- * Extract a section of an array (0-based indices)
373
- */
374
- declare const ARR_SLICE: (a: RuntimeValue, start: RuntimeValue, end?: RuntimeValue) => RuntimeValue;
375
- /**
376
- * Check if an array contains a value (using deep equality)
377
- * Returns boolean
378
- */
379
- declare const ARR_CONTAINS: (a: RuntimeValue, value: RuntimeValue) => RuntimeValue;
380
- /**
381
- * Reverse an array, returning a new array
382
- */
383
- declare const ARR_REVERSE: (a: RuntimeValue) => RuntimeValue;
384
- /**
385
404
  * Sort an array in ascending order, returning a new array.
386
405
  * Numbers sort numerically, strings lexicographically,
387
406
  * dates/times/datetimes by temporal comparison.
@@ -419,7 +438,7 @@ declare const ARR_MIN: (a: RuntimeValue) => RuntimeValue;
419
438
  */
420
439
  declare const ARR_MAX: (a: RuntimeValue) => RuntimeValue;
421
440
  declare namespace core {
422
- export { TYPE, STR, NUM };
441
+ export { TYPE, STR, SLICE, REVERSE, NUM, LEN, INDEX_OF, CONTAINS };
423
442
  }
424
443
  /**
425
444
  * Convert a value to string representation
@@ -436,8 +455,33 @@ declare const NUM: (v: RuntimeValue) => RuntimeValue;
436
455
  * Returns the type name of a value as a string
437
456
  */
438
457
  declare const TYPE: (v: RuntimeValue) => RuntimeValue;
458
+ /**
459
+ * Get the length of a string or array
460
+ */
461
+ declare const LEN: (v: RuntimeValue) => RuntimeValue;
462
+ /**
463
+ * Extract a section of a string or array (0-based indices)
464
+ */
465
+ declare const SLICE: (v: RuntimeValue, start: RuntimeValue, end?: RuntimeValue) => RuntimeValue;
466
+ /**
467
+ * Check if a string contains a substring or an array contains an element.
468
+ * For strings: both arguments must be strings (substring search).
469
+ * For arrays: uses deep equality to find the element.
470
+ */
471
+ declare const CONTAINS: (v: RuntimeValue, search: RuntimeValue) => RuntimeValue;
472
+ /**
473
+ * Reverse a string or array, returning a new value
474
+ */
475
+ declare const REVERSE: (v: RuntimeValue) => RuntimeValue;
476
+ /**
477
+ * Find the first index of a substring in a string or an element in an array.
478
+ * Returns -1 if not found.
479
+ * For strings: both arguments must be strings.
480
+ * For arrays: uses deep equality.
481
+ */
482
+ declare const INDEX_OF: (v: RuntimeValue, search: RuntimeValue) => RuntimeValue;
439
483
  declare namespace datetime {
440
- export { TODAY, START_OF_YEAR, START_OF_WEEK, START_OF_QUARTER, START_OF_MONTH, IS_WEEKEND, IS_SAME_DAY, IS_LEAP_YEAR, GET_YEAR, GET_WEEKDAY, GET_QUARTER, GET_MONTH, GET_DAY_OF_YEAR, GET_DAY, END_OF_YEAR, END_OF_MONTH, DIFFERENCE_IN_YEARS, DIFFERENCE_IN_WEEKS, DIFFERENCE_IN_MONTHS, DIFFERENCE_IN_DAYS, DATE, ADD_YEARS, ADD_MONTHS, ADD_DAYS };
484
+ export { YEAR, WEEKDAY, TODAY, START_OF_YEAR, START_OF_WEEK, START_OF_QUARTER, START_OF_MONTH, QUARTER, MONTH, IS_WEEKEND, IS_SAME_DAY, IS_LEAP_YEAR, END_OF_YEAR, END_OF_MONTH, DIFFERENCE_IN_YEARS, DIFFERENCE_IN_WEEKS, DIFFERENCE_IN_MONTHS, DIFFERENCE_IN_DAYS, DAY_OF_YEAR, DAY, DATE, AGE, ADD_YEARS, ADD_MONTHS, ADD_DAYS };
441
485
  }
442
486
  /**
443
487
  * Date utility functions using Temporal.PlainDate and Temporal.PlainDateTime
@@ -455,27 +499,27 @@ declare const DATE: (year: RuntimeValue, month: RuntimeValue, day: RuntimeValue)
455
499
  /**
456
500
  * Get the year from a date or datetime
457
501
  */
458
- declare const GET_YEAR: (date: RuntimeValue) => RuntimeValue;
502
+ declare const YEAR: (date: RuntimeValue) => RuntimeValue;
459
503
  /**
460
504
  * Get the month from a date or datetime (1-based: 1 = January, 12 = December)
461
505
  */
462
- declare const GET_MONTH: (date: RuntimeValue) => RuntimeValue;
506
+ declare const MONTH: (date: RuntimeValue) => RuntimeValue;
463
507
  /**
464
508
  * Get the day of month from a date or datetime (1-31)
465
509
  */
466
- declare const GET_DAY: (date: RuntimeValue) => RuntimeValue;
510
+ declare const DAY: (date: RuntimeValue) => RuntimeValue;
467
511
  /**
468
512
  * Get the day of week from a date or datetime (1 = Monday, 7 = Sunday)
469
513
  */
470
- declare const GET_WEEKDAY: (date: RuntimeValue) => RuntimeValue;
514
+ declare const WEEKDAY: (date: RuntimeValue) => RuntimeValue;
471
515
  /**
472
516
  * Get the day of year (1-366) from a date or datetime
473
517
  */
474
- declare const GET_DAY_OF_YEAR: (date: RuntimeValue) => RuntimeValue;
518
+ declare const DAY_OF_YEAR: (date: RuntimeValue) => RuntimeValue;
475
519
  /**
476
520
  * Get the quarter (1-4) from a date or datetime
477
521
  */
478
- declare const GET_QUARTER: (date: RuntimeValue) => RuntimeValue;
522
+ declare const QUARTER: (date: RuntimeValue) => RuntimeValue;
479
523
  /**
480
524
  * Add days to a date or datetime, returning the same type
481
525
  */
@@ -542,6 +586,12 @@ declare const IS_WEEKEND: (date: RuntimeValue) => RuntimeValue;
542
586
  * Check if a date or datetime is in a leap year
543
587
  */
544
588
  declare const IS_LEAP_YEAR: (date: RuntimeValue) => RuntimeValue;
589
+ /**
590
+ * Calculate age in complete years from a birth date.
591
+ * Accepts PlainDate or PlainDateTime (only the date portion is used).
592
+ * Optional second argument specifies the reference date (defaults to today).
593
+ */
594
+ declare const AGE: (birthDate: RuntimeValue, ...rest: RuntimeValue[]) => RuntimeValue;
545
595
  declare namespace datetimefull {
546
596
  export { TO_TIME, TO_DATE, START_OF_DAY, NOW, END_OF_DAY, DATETIME, COMBINE };
547
597
  }
@@ -601,13 +651,9 @@ declare const EXP: (x: RuntimeValue) => RuntimeValue;
601
651
  */
602
652
  declare const CLAMP: (value: RuntimeValue, min: RuntimeValue, max: RuntimeValue) => RuntimeValue;
603
653
  declare namespace string {
604
- export { STR_UPPER, STR_TRIM, STR_STARTS_WITH, STR_SPLIT, STR_SLICE, STR_REPLACE, STR_REPEAT, STR_LOWER, STR_LEN, STR_INDEX_OF, STR_ENDS_WITH, STR_CONTAINS };
654
+ export { STR_UPPER, STR_TRIM, STR_STARTS_WITH, STR_SPLIT, STR_REPLACE, STR_REPEAT, STR_LOWER, STR_ENDS_WITH };
605
655
  }
606
656
  /**
607
- * Get the length of a string
608
- */
609
- declare const STR_LEN: (s: RuntimeValue) => RuntimeValue;
610
- /**
611
657
  * Convert string to uppercase
612
658
  */
613
659
  declare const STR_UPPER: (s: RuntimeValue) => RuntimeValue;
@@ -620,19 +666,6 @@ declare const STR_LOWER: (s: RuntimeValue) => RuntimeValue;
620
666
  */
621
667
  declare const STR_TRIM: (s: RuntimeValue) => RuntimeValue;
622
668
  /**
623
- * Extract a section of a string (0-based indices)
624
- */
625
- declare const STR_SLICE: (s: RuntimeValue, start: RuntimeValue, end?: RuntimeValue) => RuntimeValue;
626
- /**
627
- * Check if a string contains another string
628
- * Returns boolean
629
- */
630
- declare const STR_CONTAINS: (s: RuntimeValue, search: RuntimeValue) => RuntimeValue;
631
- /**
632
- * Find the first index of a substring (-1 if not found)
633
- */
634
- declare const STR_INDEX_OF: (s: RuntimeValue, search: RuntimeValue) => RuntimeValue;
635
- /**
636
669
  * Split a string by a separator into a string array
637
670
  */
638
671
  declare const STR_SPLIT: (s: RuntimeValue, sep: RuntimeValue) => RuntimeValue;
@@ -653,7 +686,7 @@ declare const STR_ENDS_WITH: (s: RuntimeValue, suffix: RuntimeValue) => RuntimeV
653
686
  */
654
687
  declare const STR_REPEAT: (s: RuntimeValue, count: RuntimeValue) => RuntimeValue;
655
688
  declare namespace time {
656
- export { TIME, NOW_TIME, IS_SAME_TIME, GET_SECOND, GET_MINUTE, GET_MILLISECOND, GET_HOUR, DIFFERENCE_IN_SECONDS, DIFFERENCE_IN_MINUTES, DIFFERENCE_IN_HOURS, ADD_SECONDS, ADD_MINUTES, ADD_HOURS };
689
+ export { TIME, SECOND, NOW_TIME, MINUTE, MILLISECOND, IS_SAME_TIME, HOUR, DIFFERENCE_IN_SECONDS, DIFFERENCE_IN_MINUTES, DIFFERENCE_IN_HOURS, ADD_SECONDS, ADD_MINUTES, ADD_HOURS };
657
690
  }
658
691
  /**
659
692
  * Time utility functions using Temporal.PlainTime and Temporal.PlainDateTime
@@ -671,19 +704,19 @@ declare const NOW_TIME: () => RuntimeValue;
671
704
  /**
672
705
  * Get the hour (0-23) from a time or datetime
673
706
  */
674
- declare const GET_HOUR: (t: RuntimeValue) => RuntimeValue;
707
+ declare const HOUR: (t: RuntimeValue) => RuntimeValue;
675
708
  /**
676
709
  * Get the minute (0-59) from a time or datetime
677
710
  */
678
- declare const GET_MINUTE: (t: RuntimeValue) => RuntimeValue;
711
+ declare const MINUTE: (t: RuntimeValue) => RuntimeValue;
679
712
  /**
680
713
  * Get the second (0-59) from a time or datetime
681
714
  */
682
- declare const GET_SECOND: (t: RuntimeValue) => RuntimeValue;
715
+ declare const SECOND: (t: RuntimeValue) => RuntimeValue;
683
716
  /**
684
717
  * Get the millisecond (0-999) from a time or datetime
685
718
  */
686
- declare const GET_MILLISECOND: (t: RuntimeValue) => RuntimeValue;
719
+ declare const MILLISECOND: (t: RuntimeValue) => RuntimeValue;
687
720
  /**
688
721
  * Add hours to a time or datetime.
689
722
  * PlainTime wraps around at midnight boundaries.
@@ -764,65 +797,4 @@ declare function assertTimeOrDateTime(v: RuntimeValue, context: string): asserts
764
797
  * Assert a value is an array, throwing a TypeError if not
765
798
  */
766
799
  declare function assertArray(v: RuntimeValue, context: string): asserts v is readonly RuntimeValue[];
767
- /**
768
- * A single visitor handler: receives a narrowed node and a recurse function.
769
- *
770
- * @template N The specific AST node type this handler accepts
771
- * @template T The return type shared across all handlers
772
- */
773
- type VisitorHandler<
774
- N,
775
- T
776
- > = (node: N, recurse: (n: ASTNode) => T) => T;
777
- /**
778
- * Type-safe visitor pattern for AST traversal.
779
- *
780
- * A visitor is an object with one handler per AST node type.
781
- * Each handler receives the narrowed node and a `recurse` function
782
- * for visiting child nodes with the same visitor.
783
- *
784
- * @template T The return type of visitor handlers
785
- */
786
- type Visitor<T> = {
787
- Program: VisitorHandler<Program, T>;
788
- NumberLiteral: VisitorHandler<NumberLiteral, T>;
789
- StringLiteral: VisitorHandler<StringLiteral, T>;
790
- BooleanLiteral: VisitorHandler<BooleanLiteral, T>;
791
- ArrayLiteral: VisitorHandler<ArrayLiteral, T>;
792
- Identifier2: VisitorHandler<Identifier2, T>;
793
- BinaryOp: VisitorHandler<BinaryOp, T>;
794
- UnaryOp: VisitorHandler<UnaryOp, T>;
795
- FunctionCall: VisitorHandler<FunctionCall, T>;
796
- Assignment: VisitorHandler<Assignment, T>;
797
- IfExpression: VisitorHandler<IfExpression, T>;
798
- ForExpression: VisitorHandler<ForExpression, T>;
799
- IndexAccess: VisitorHandler<IndexAccess, T>;
800
- RangeExpression: VisitorHandler<RangeExpression, T>;
801
- PipeExpression: VisitorHandler<PipeExpression, T>;
802
- Placeholder: VisitorHandler<Placeholder, T>;
803
- };
804
- /**
805
- * Visit an AST node using a visitor object with type-specific handlers.
806
- * All node types must have handlers (exhaustive by design).
807
- *
808
- * @template T The return type of visitor handlers
809
- * @param node The AST node to visit
810
- * @param visitor Object with handlers for each node type
811
- * @returns The result of visiting the node
812
- */
813
- declare function visit<T>(node: ASTNode, visitor: Visitor<T>): T;
814
- /**
815
- * Visit an AST node using a partial visitor with a default handler.
816
- *
817
- * Unlike `visit()` which requires exhaustive handlers, `visitPartial()` allows
818
- * you to handle only specific node types. Unhandled nodes are processed by
819
- * the default handler.
820
- *
821
- * @template T The return type of visitor handlers
822
- * @param node The AST node to visit
823
- * @param visitor Object with optional handlers for node types
824
- * @param defaultHandler Handler for unhandled node types
825
- * @returns The result of visiting the node
826
- */
827
- declare function visitPartial<T>(node: ASTNode, visitor: Partial<Visitor<T>>, defaultHandler: VisitorHandler<ASTNode, T>): T;
828
- export { visitPartial, visit, typeOf, time, string, parse, optimize, math, isUnaryOp, isStringLiteral, isRangeExpression, isProgram, isPlaceholder, isPipeExpression, isNumberLiteral, isIndexAccess, isIfExpression, isIdentifier, isFunctionCall, isForExpression, isBooleanLiteral, isBinaryOp, isAssignment, isArrayLiteral, generate, extractInputVariables, extractAssignedVariables, evaluateScope, evaluate, defaultContext, datetimefull, datetime, core, exports_ast as ast, assertTimeOrDateTime, assertTime, assertString, assertNumber, assertDateTime, assertDateOrDateTime, assertDate, assertBoolean, assertArray, array, VisitorHandler, Visitor, UnaryOp, StringLiteral, RuntimeValue, RangeExpression, Program, Placeholder, PipeExpression, Operator, NumberLiteral, NodeKind, IndexAccess, IfExpression, Identifier2 as Identifier, FunctionCall, ForExpression, ExecutionContext, BooleanLiteral, BinaryOp, Assignment, ArrayLiteral, ASTNodeBase, ASTNode };
800
+ export { visit, typeOf, toLineColumn, time, string, parse, optimize, math, isUnaryOp, isStringLiteral, isRangeExpression, isProgram, isPlaceholder, isPipeExpression, isNumberLiteral, isIndexAccess, isIfExpression, isIdentifier, isFunctionCall, isForExpression, isBooleanLiteral, isBinaryOp, isAssignment, isArrayLiteral, generate, extractInputVariables, extractAssignedVariables, evaluateWithScope, evaluateScope, evaluate, defaultContext, datetimefull, datetime, core, exports_ast as ast, assertTimeOrDateTime, assertTime, assertString, assertNumber, assertDateTime, assertDateOrDateTime, assertDate, assertBoolean, assertArray, array, Visitor, UnaryOp, StringLiteral, RuntimeValue, RangeExpression, Program, Placeholder, PipeExpression, ParseError, Operator, NumberLiteral, NodeKind, IndexAccess, IfExpression, Identifier2 as Identifier, FunctionCall, ForExpression, ExecutionResult, ExecutionContext, BooleanLiteral, BinaryOp, Assignment, ArrayLiteral, ASTNodeBase, ASTNode };