@mojir/lits 2.0.15 → 2.0.17

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.
Files changed (112) hide show
  1. package/dist/cli/cli.js +1008 -1516
  2. package/dist/cli/reference/api.d.ts +5 -5
  3. package/dist/cli/src/analyze/index.d.ts +0 -2
  4. package/dist/cli/src/builtin/index.d.ts +3 -10
  5. package/dist/cli/src/builtin/specialExpressions/declared.d.ts +1 -1
  6. package/dist/cli/src/builtin/specialExpressions/functions.d.ts +0 -5
  7. package/dist/cli/src/builtin/specialExpressions/try.d.ts +1 -1
  8. package/dist/{src/builtin/specialExpressions/if_not.d.ts → cli/src/builtin/specialExpressions/unless.d.ts} +2 -2
  9. package/dist/cli/src/evaluator/ContextStack.d.ts +2 -0
  10. package/dist/cli/src/parser/AlgebraicParser.d.ts +13 -8
  11. package/dist/cli/src/parser/commonTokenParsers.d.ts +2 -1
  12. package/dist/cli/src/tokenizer/algebraic/algebraicReservedNames.d.ts +27 -27
  13. package/dist/cli/src/tokenizer/algebraic/algebraicTokenizers.d.ts +1 -1
  14. package/dist/cli/src/tokenizer/algebraic/algebraicTokens.d.ts +5 -5
  15. package/dist/cli/src/tokenizer/common/commonTokenizers.d.ts +3 -2
  16. package/dist/cli/src/tokenizer/common/commonTokens.d.ts +6 -2
  17. package/dist/cli/src/tokenizer/polish/polishTokenizers.d.ts +2 -3
  18. package/dist/cli/src/tokenizer/polish/polishTokens.d.ts +4 -8
  19. package/dist/cli/src/tokenizer/tokens.d.ts +2 -2
  20. package/dist/index.esm.js +1004 -1514
  21. package/dist/index.esm.js.map +1 -1
  22. package/dist/index.js +1004 -1514
  23. package/dist/index.js.map +1 -1
  24. package/dist/lits.iife.js +1004 -1514
  25. package/dist/lits.iife.js.map +1 -1
  26. package/dist/reference/api.d.ts +5 -5
  27. package/dist/src/analyze/index.d.ts +0 -2
  28. package/dist/src/builtin/index.d.ts +3 -10
  29. package/dist/src/builtin/specialExpressions/declared.d.ts +1 -1
  30. package/dist/src/builtin/specialExpressions/functions.d.ts +0 -5
  31. package/dist/src/builtin/specialExpressions/try.d.ts +1 -1
  32. package/dist/src/builtin/specialExpressions/{when.d.ts → unless.d.ts} +2 -2
  33. package/dist/src/evaluator/ContextStack.d.ts +2 -0
  34. package/dist/src/parser/AlgebraicParser.d.ts +13 -8
  35. package/dist/src/parser/commonTokenParsers.d.ts +2 -1
  36. package/dist/src/tokenizer/algebraic/algebraicReservedNames.d.ts +27 -27
  37. package/dist/src/tokenizer/algebraic/algebraicTokenizers.d.ts +1 -1
  38. package/dist/src/tokenizer/algebraic/algebraicTokens.d.ts +5 -5
  39. package/dist/src/tokenizer/common/commonTokenizers.d.ts +3 -2
  40. package/dist/src/tokenizer/common/commonTokens.d.ts +6 -2
  41. package/dist/src/tokenizer/polish/polishTokenizers.d.ts +2 -3
  42. package/dist/src/tokenizer/polish/polishTokens.d.ts +4 -8
  43. package/dist/src/tokenizer/tokens.d.ts +2 -2
  44. package/dist/testFramework.esm.js +631 -1193
  45. package/dist/testFramework.esm.js.map +1 -1
  46. package/dist/testFramework.js +631 -1193
  47. package/dist/testFramework.js.map +1 -1
  48. package/package.json +1 -1
  49. package/dist/cli/src/analyze/calculateOutcomes/calculateAndOutcomes.d.ts +0 -3
  50. package/dist/cli/src/analyze/calculateOutcomes/calculateCommentOutcomes.d.ts +0 -3
  51. package/dist/cli/src/analyze/calculateOutcomes/calculateCondOutcomes.d.ts +0 -3
  52. package/dist/cli/src/analyze/calculateOutcomes/calculateDeclaredOutcomes.d.ts +0 -3
  53. package/dist/cli/src/analyze/calculateOutcomes/calculateDefOutcomes.d.ts +0 -3
  54. package/dist/cli/src/analyze/calculateOutcomes/calculateDefsOutcomes.d.ts +0 -3
  55. package/dist/cli/src/analyze/calculateOutcomes/calculateDoOutcomes.d.ts +0 -3
  56. package/dist/cli/src/analyze/calculateOutcomes/calculateFunctionOutcomes.d.ts +0 -5
  57. package/dist/cli/src/analyze/calculateOutcomes/calculateIfLetOutcomes.d.ts +0 -3
  58. package/dist/cli/src/analyze/calculateOutcomes/calculateIfNotOutcomes.d.ts +0 -3
  59. package/dist/cli/src/analyze/calculateOutcomes/calculateIfOutcomes.d.ts +0 -3
  60. package/dist/cli/src/analyze/calculateOutcomes/calculateLetOutcomes.d.ts +0 -3
  61. package/dist/cli/src/analyze/calculateOutcomes/calculateLoopOutcomes.d.ts +0 -3
  62. package/dist/cli/src/analyze/calculateOutcomes/calculateLoopsOutcomes.d.ts +0 -4
  63. package/dist/cli/src/analyze/calculateOutcomes/calculateOrOutcomes.d.ts +0 -3
  64. package/dist/cli/src/analyze/calculateOutcomes/calculateQqOutcomes.d.ts +0 -3
  65. package/dist/cli/src/analyze/calculateOutcomes/calculateRecurOutcomes.d.ts +0 -3
  66. package/dist/cli/src/analyze/calculateOutcomes/calculateSwitchOutcomes.d.ts +0 -3
  67. package/dist/cli/src/analyze/calculateOutcomes/calculateThrowOutcomes.d.ts +0 -3
  68. package/dist/cli/src/analyze/calculateOutcomes/calculateTryOutcomes.d.ts +0 -3
  69. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenFirstOutcomes.d.ts +0 -3
  70. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenLetOutcomes.d.ts +0 -3
  71. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenNotOutcomes.d.ts +0 -3
  72. package/dist/cli/src/analyze/calculateOutcomes/calculateWhenOutcomes.d.ts +0 -3
  73. package/dist/cli/src/analyze/calculateOutcomes/index.d.ts +0 -18
  74. package/dist/cli/src/analyze/calculateOutcomes/specialExpressionCalculators.d.ts +0 -55
  75. package/dist/cli/src/builtin/specialExpressions/defs.d.ts +0 -5
  76. package/dist/cli/src/builtin/specialExpressions/if_let.d.ts +0 -7
  77. package/dist/cli/src/builtin/specialExpressions/if_not.d.ts +0 -6
  78. package/dist/cli/src/builtin/specialExpressions/when.d.ts +0 -6
  79. package/dist/cli/src/builtin/specialExpressions/when_first.d.ts +0 -7
  80. package/dist/cli/src/builtin/specialExpressions/when_let.d.ts +0 -7
  81. package/dist/cli/src/builtin/specialExpressions/when_not.d.ts +0 -6
  82. package/dist/src/analyze/calculateOutcomes/calculateAndOutcomes.d.ts +0 -3
  83. package/dist/src/analyze/calculateOutcomes/calculateCommentOutcomes.d.ts +0 -3
  84. package/dist/src/analyze/calculateOutcomes/calculateCondOutcomes.d.ts +0 -3
  85. package/dist/src/analyze/calculateOutcomes/calculateDeclaredOutcomes.d.ts +0 -3
  86. package/dist/src/analyze/calculateOutcomes/calculateDefOutcomes.d.ts +0 -3
  87. package/dist/src/analyze/calculateOutcomes/calculateDefsOutcomes.d.ts +0 -3
  88. package/dist/src/analyze/calculateOutcomes/calculateDoOutcomes.d.ts +0 -3
  89. package/dist/src/analyze/calculateOutcomes/calculateFunctionOutcomes.d.ts +0 -5
  90. package/dist/src/analyze/calculateOutcomes/calculateIfLetOutcomes.d.ts +0 -3
  91. package/dist/src/analyze/calculateOutcomes/calculateIfNotOutcomes.d.ts +0 -3
  92. package/dist/src/analyze/calculateOutcomes/calculateIfOutcomes.d.ts +0 -3
  93. package/dist/src/analyze/calculateOutcomes/calculateLetOutcomes.d.ts +0 -3
  94. package/dist/src/analyze/calculateOutcomes/calculateLoopOutcomes.d.ts +0 -3
  95. package/dist/src/analyze/calculateOutcomes/calculateLoopsOutcomes.d.ts +0 -4
  96. package/dist/src/analyze/calculateOutcomes/calculateOrOutcomes.d.ts +0 -3
  97. package/dist/src/analyze/calculateOutcomes/calculateQqOutcomes.d.ts +0 -3
  98. package/dist/src/analyze/calculateOutcomes/calculateRecurOutcomes.d.ts +0 -3
  99. package/dist/src/analyze/calculateOutcomes/calculateSwitchOutcomes.d.ts +0 -3
  100. package/dist/src/analyze/calculateOutcomes/calculateThrowOutcomes.d.ts +0 -3
  101. package/dist/src/analyze/calculateOutcomes/calculateTryOutcomes.d.ts +0 -3
  102. package/dist/src/analyze/calculateOutcomes/calculateWhenFirstOutcomes.d.ts +0 -3
  103. package/dist/src/analyze/calculateOutcomes/calculateWhenLetOutcomes.d.ts +0 -3
  104. package/dist/src/analyze/calculateOutcomes/calculateWhenNotOutcomes.d.ts +0 -3
  105. package/dist/src/analyze/calculateOutcomes/calculateWhenOutcomes.d.ts +0 -3
  106. package/dist/src/analyze/calculateOutcomes/index.d.ts +0 -18
  107. package/dist/src/analyze/calculateOutcomes/specialExpressionCalculators.d.ts +0 -55
  108. package/dist/src/builtin/specialExpressions/defs.d.ts +0 -5
  109. package/dist/src/builtin/specialExpressions/if_let.d.ts +0 -7
  110. package/dist/src/builtin/specialExpressions/when_first.d.ts +0 -7
  111. package/dist/src/builtin/specialExpressions/when_let.d.ts +0 -7
  112. package/dist/src/builtin/specialExpressions/when_not.d.ts +0 -6
@@ -1,15 +1,15 @@
1
1
  export declare const api: {
2
2
  readonly collection: readonly ["count", "get", "get_in", "contains?", "has?", "has_some?", "has_every?", "assoc", "assoc_in", "concat", "not_empty", "every?", "not_every?", "any?", "not_any?", "update", "update_in"];
3
3
  readonly array: readonly ["array", "range", "repeat", "flatten", "mapcat"];
4
- readonly sequence: readonly ["nth", "push", "pop", "unshift", "shift", "slice", "reductions", "reduce", "reduce_right", "map", "filter", "position", "index_of", "some", "reverse", "first", "second", "last", "rest", "nthrest", "next", "nthnext", "take", "take_last", "take_while", "drop", "drop_last", "drop_while", "sort", "sort_by", "distinct", "remove", "remove_at", "split_at", "split_with", "frequencies", "group_by", "partition", "partition_all", "partition_by"];
4
+ readonly sequence: readonly ["nth", "push", "pop", "unshift", "shift", "slice", "reductions", "reduce", "reduce_right", "map", "filter", "position", "index_of", "last_index_of", "some", "reverse", "first", "second", "last", "rest", "nthrest", "next", "nthnext", "take", "take_last", "take_while", "drop", "drop_last", "drop_while", "sort", "sort_by", "distinct", "remove", "remove_at", "split_at", "split_with", "frequencies", "group_by", "partition", "partition_all", "partition_by", "starts_with?", "ends_with?", "interleave", "interpose"];
5
5
  readonly math: readonly ["+", "-", "*", "/", "mod", "%", "quot", "inc", "dec", "sqrt", "cbrt", "**", "exp", "round", "trunc", "floor", "ceil", "min", "max", "abs", "sign", "positive_infinity", "negative_infinity", "max_safe_integer", "min_safe_integer", "max_value", "min_value", "epsilon", "nan", "e", "pi", "log", "log2", "log10", "sin", "cos", "tan", "asin", "acos", "atan", "sinh", "cosh", "tanh", "asinh", "acosh", "atanh"];
6
6
  readonly functional: readonly ["apply", "identity", "partial", "comp", "constantly", "juxt", "complement", "every_pred", "some_pred", "fnil"];
7
7
  readonly misc: readonly ["!=", "==", "<", ">", "<=", ">=", "!", "write!", "iso_date>epoch", "epoch>iso_date", "boolean", "compare", "equal?", "json_parse", "json_stringify"];
8
8
  readonly object: readonly ["dissoc", "object", "keys", "vals", "entries", "find", "merge", "merge_with", "zipmap", "select_keys"];
9
9
  readonly predicate: readonly ["boolean?", "nil?", "number?", "string?", "function?", "integer?", "array?", "object?", "coll?", "seq?", "regexp?", "zero?", "pos?", "neg?", "even?", "odd?", "finite?", "nan?", "negative_infinity?", "positive_infinity?", "false?", "true?", "empty?", "not_empty?"];
10
- readonly regularExpression: readonly ["regexp", "match", "replace"];
11
- readonly specialExpressions: readonly ["&&", "||", "def", "defs", "let", "if_let", "when_let", "when_first", "fn", "defn", "defns", "try", "throw", "if", "if_not", "cond", "switch", "when", "when_not", "comment", "do", "recur", "loop", "doseq", "for", "declared?", "??"];
12
- readonly string: readonly ["subs", "string_repeat", "str", "number", "lower_case", "upper_case", "trim", "trim_left", "trim_right", "pad_left", "pad_right", "split", "template", "to_char_code", "from_char_code", "encode_base64", "decode_base64", "encode_uri_component", "decode_uri_component", "join", "++"];
10
+ readonly regularExpression: readonly ["regexp", "match", "replace", "replace_all"];
11
+ readonly specialExpressions: readonly ["&&", "||", "def", "let", "fn", "defn", "try", "throw", "if", "unless", "cond", "switch", "comment", "do", "recur", "loop", "doseq", "for", "defined?", "??"];
12
+ readonly string: readonly ["subs", "string_repeat", "str", "number", "lower_case", "upper_case", "trim", "trim_left", "trim_right", "pad_left", "pad_right", "split", "split_lines", "template", "to_char_code", "from_char_code", "encode_base64", "decode_base64", "encode_uri_component", "decode_uri_component", "join", "++", "capitalize", "blank?"];
13
13
  readonly bitwise: readonly ["<<", ">>", ">>>", "~", "&", "&!", "|", "^", "bit_flip", "bit_clear", "bit_set", "bit_test"];
14
14
  readonly assert: readonly ["assert", "assert=", "assert!=", "assert_equal", "assert_not_equal", "assert_gt", "assert_lt", "assert_gte", "assert_lte", "assert_true", "assert_false", "assert_truthy", "assert_falsy", "assert_null", "assert_throws", "assert_throws_error", "assert_not_throws"];
15
15
  readonly shorthand: ["-short-regexp", "-short-fn", "-short-string", "-short-dot", "-short-hash"];
@@ -31,7 +31,7 @@ export type AssertApiName = typeof api.assert[number];
31
31
  export type FunctionName = CollectionApiName | ArrayApiName | SequenceApiName | MathApiName | FunctionalApiName | MiscApiName | ObjectApiName | PredicateApiName | RegularExpressionApiName | SpecialExpressionsApiName | StringApiName | BitwiseApiName | AssertApiName;
32
32
  export type ShorthandName = typeof api.shorthand[number];
33
33
  export type DatatypeName = typeof api.datatype[number];
34
- declare const apiNames: readonly ["count", "get", "get_in", "contains?", "has?", "has_some?", "has_every?", "assoc", "assoc_in", "concat", "not_empty", "every?", "not_every?", "any?", "not_any?", "update", "update_in", "array", "range", "repeat", "flatten", "mapcat", "nth", "push", "pop", "unshift", "shift", "slice", "reductions", "reduce", "reduce_right", "map", "filter", "position", "index_of", "some", "reverse", "first", "second", "last", "rest", "nthrest", "next", "nthnext", "take", "take_last", "take_while", "drop", "drop_last", "drop_while", "sort", "sort_by", "distinct", "remove", "remove_at", "split_at", "split_with", "frequencies", "group_by", "partition", "partition_all", "partition_by", "+", "-", "*", "/", "mod", "%", "quot", "inc", "dec", "sqrt", "cbrt", "**", "exp", "round", "trunc", "floor", "ceil", "min", "max", "abs", "sign", "positive_infinity", "negative_infinity", "max_safe_integer", "min_safe_integer", "max_value", "min_value", "epsilon", "nan", "e", "pi", "log", "log2", "log10", "sin", "cos", "tan", "asin", "acos", "atan", "sinh", "cosh", "tanh", "asinh", "acosh", "atanh", "apply", "identity", "partial", "comp", "constantly", "juxt", "complement", "every_pred", "some_pred", "fnil", "!=", "==", "<", ">", "<=", ">=", "!", "write!", "iso_date>epoch", "epoch>iso_date", "boolean", "compare", "equal?", "json_parse", "json_stringify", "dissoc", "object", "keys", "vals", "entries", "find", "merge", "merge_with", "zipmap", "select_keys", "boolean?", "nil?", "number?", "string?", "function?", "integer?", "array?", "object?", "coll?", "seq?", "regexp?", "zero?", "pos?", "neg?", "even?", "odd?", "finite?", "nan?", "negative_infinity?", "positive_infinity?", "false?", "true?", "empty?", "not_empty?", "regexp", "match", "replace", "&&", "||", "def", "defs", "let", "if_let", "when_let", "when_first", "fn", "defn", "defns", "try", "throw", "if", "if_not", "cond", "switch", "when", "when_not", "comment", "do", "recur", "loop", "doseq", "for", "declared?", "??", "subs", "string_repeat", "str", "number", "lower_case", "upper_case", "trim", "trim_left", "trim_right", "pad_left", "pad_right", "split", "template", "to_char_code", "from_char_code", "encode_base64", "decode_base64", "encode_uri_component", "decode_uri_component", "join", "++", "<<", ">>", ">>>", "~", "&", "&!", "|", "^", "bit_flip", "bit_clear", "bit_set", "bit_test", "assert", "assert=", "assert!=", "assert_equal", "assert_not_equal", "assert_gt", "assert_lt", "assert_gte", "assert_lte", "assert_true", "assert_false", "assert_truthy", "assert_falsy", "assert_null", "assert_throws", "assert_throws_error", "assert_not_throws", "-short-regexp", "-short-fn", "-short-string", "-short-dot", "-short-hash", "-type-number", "-type-string", "-type-object", "-type-array", "-type-boolean", "-type-function", "-type-integer", "-type-any", "-type-nil", "-type-collection", "-type-sequence", "-type-regexp", "-type-never"];
34
+ declare const apiNames: readonly ["count", "get", "get_in", "contains?", "has?", "has_some?", "has_every?", "assoc", "assoc_in", "concat", "not_empty", "every?", "not_every?", "any?", "not_any?", "update", "update_in", "array", "range", "repeat", "flatten", "mapcat", "nth", "push", "pop", "unshift", "shift", "slice", "reductions", "reduce", "reduce_right", "map", "filter", "position", "index_of", "last_index_of", "some", "reverse", "first", "second", "last", "rest", "nthrest", "next", "nthnext", "take", "take_last", "take_while", "drop", "drop_last", "drop_while", "sort", "sort_by", "distinct", "remove", "remove_at", "split_at", "split_with", "frequencies", "group_by", "partition", "partition_all", "partition_by", "starts_with?", "ends_with?", "interleave", "interpose", "+", "-", "*", "/", "mod", "%", "quot", "inc", "dec", "sqrt", "cbrt", "**", "exp", "round", "trunc", "floor", "ceil", "min", "max", "abs", "sign", "positive_infinity", "negative_infinity", "max_safe_integer", "min_safe_integer", "max_value", "min_value", "epsilon", "nan", "e", "pi", "log", "log2", "log10", "sin", "cos", "tan", "asin", "acos", "atan", "sinh", "cosh", "tanh", "asinh", "acosh", "atanh", "apply", "identity", "partial", "comp", "constantly", "juxt", "complement", "every_pred", "some_pred", "fnil", "!=", "==", "<", ">", "<=", ">=", "!", "write!", "iso_date>epoch", "epoch>iso_date", "boolean", "compare", "equal?", "json_parse", "json_stringify", "dissoc", "object", "keys", "vals", "entries", "find", "merge", "merge_with", "zipmap", "select_keys", "boolean?", "nil?", "number?", "string?", "function?", "integer?", "array?", "object?", "coll?", "seq?", "regexp?", "zero?", "pos?", "neg?", "even?", "odd?", "finite?", "nan?", "negative_infinity?", "positive_infinity?", "false?", "true?", "empty?", "not_empty?", "regexp", "match", "replace", "replace_all", "&&", "||", "def", "let", "fn", "defn", "try", "throw", "if", "unless", "cond", "switch", "comment", "do", "recur", "loop", "doseq", "for", "defined?", "??", "subs", "string_repeat", "str", "number", "lower_case", "upper_case", "trim", "trim_left", "trim_right", "pad_left", "pad_right", "split", "split_lines", "template", "to_char_code", "from_char_code", "encode_base64", "decode_base64", "encode_uri_component", "decode_uri_component", "join", "++", "capitalize", "blank?", "<<", ">>", ">>>", "~", "&", "&!", "|", "^", "bit_flip", "bit_clear", "bit_set", "bit_test", "assert", "assert=", "assert!=", "assert_equal", "assert_not_equal", "assert_gt", "assert_lt", "assert_gte", "assert_lte", "assert_true", "assert_false", "assert_truthy", "assert_falsy", "assert_null", "assert_throws", "assert_throws_error", "assert_not_throws", "-short-regexp", "-short-fn", "-short-string", "-short-dot", "-short-hash", "-type-number", "-type-string", "-type-object", "-type-array", "-type-boolean", "-type-function", "-type-integer", "-type-any", "-type-nil", "-type-collection", "-type-sequence", "-type-regexp", "-type-never"];
35
35
  export type ApiName = typeof apiNames[number];
36
36
  export declare function isApiName(arg: string): arg is ApiName;
37
37
  export declare const categoryRecord: {
@@ -8,10 +8,8 @@ export interface UnresolvedIdentifier {
8
8
  token: Token | undefined;
9
9
  }
10
10
  export type UnresolvedIdentifiers = Set<UnresolvedIdentifier>;
11
- export type Outcomes = unknown[];
12
11
  export interface Analysis {
13
12
  unresolvedIdentifiers: UnresolvedIdentifiers;
14
- outcomes: Outcomes | null;
15
13
  }
16
14
  export type FindUnresolvedIdentifiers = (ast: Ast | AstNode[], contextStack: ContextStack, builtin: Builtin) => UnresolvedIdentifiers;
17
15
  export declare function analyze(ast: Ast, params: LitsParams): Analysis;
@@ -6,30 +6,23 @@ declare const specialExpressions: {
6
6
  readonly switch: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/switch").SwitchNode>;
7
7
  readonly def: import("./interface").BuiltinSpecialExpression<null, import("./specialExpressions/def").DefNode>;
8
8
  readonly defn: import("./interface").BuiltinSpecialExpression<null, import("./specialExpressions/functions").DefnNode>;
9
- readonly defns: import("./interface").BuiltinSpecialExpression<null, import("./specialExpressions/functions").DefnsNode>;
10
- readonly defs: import("./interface").BuiltinSpecialExpression<null, import("./specialExpressions/defs").DefsNode>;
11
9
  readonly do: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/do").DoNode>;
12
10
  readonly doseq: import("./interface").BuiltinSpecialExpression<null, import("./specialExpressions/loops").DoSeqNode>;
13
11
  readonly for: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/loops").ForNode>;
14
12
  readonly fn: import("./interface").BuiltinSpecialExpression<import("..").LitsFunction, import("./specialExpressions/functions").FnNode>;
15
13
  readonly if: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/if").IfNode>;
16
- readonly if_let: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/if_let").IfLetNode>;
17
- readonly if_not: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/if_not").IfNotNode>;
14
+ readonly unless: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/unless").UnlessNode>;
18
15
  readonly let: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/let").LetNode>;
19
16
  readonly loop: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/loop").LoopNode>;
20
17
  readonly '||': import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/or").OrNode>;
21
18
  readonly recur: import("./interface").BuiltinSpecialExpression<null, import("./specialExpressions/recur").RecurNode>;
22
19
  readonly throw: import("./interface").BuiltinSpecialExpression<null, import("./specialExpressions/throw").ThrowNode>;
23
20
  readonly try: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/try").TryNode>;
24
- readonly when: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/when").WhenNode>;
25
- readonly when_first: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/when_first").WhenFirstNode>;
26
- readonly when_let: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/when_let").WhenLetNode>;
27
- readonly when_not: import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/when_not").WhenNotNode>;
28
- readonly 'declared?': import("./interface").BuiltinSpecialExpression<boolean, import("./specialExpressions/declared").DeclaredNode>;
21
+ readonly 'defined?': import("./interface").BuiltinSpecialExpression<boolean, import("./specialExpressions/declared").DeclaredNode>;
29
22
  readonly '??': import("./interface").BuiltinSpecialExpression<import("../interface").Any, import("./specialExpressions/qq").QqNode>;
30
23
  };
31
24
  export type SpecialExpressionName = keyof typeof specialExpressions;
32
- export type CommonSpecialExpressionName = keyof Pick<typeof specialExpressions, '??' | '&&' | 'comment' | 'cond' | 'switch' | 'declared?' | 'do' | 'if' | 'if_not' | '||' | 'when' | 'when_not' | 'throw'>;
25
+ export type CommonSpecialExpressionName = keyof Pick<typeof specialExpressions, '??' | '&&' | 'comment' | 'cond' | 'switch' | 'defined?' | 'do' | 'if' | 'unless' | '||' | 'throw'>;
33
26
  export type BuiltinSpecialExpressions = typeof specialExpressions;
34
27
  export type BuiltinSpecialExpression = typeof specialExpressions[SpecialExpressionName];
35
28
  export type BuiltinCommonSpecialExpression = typeof specialExpressions[CommonSpecialExpressionName];
@@ -1,5 +1,5 @@
1
1
  import type { CommonSpecialExpressionNode } from '../../parser/interface';
2
2
  import type { BuiltinSpecialExpression } from '../interface';
3
- export interface DeclaredNode extends CommonSpecialExpressionNode<'declared?'> {
3
+ export interface DeclaredNode extends CommonSpecialExpressionNode<'defined?'> {
4
4
  }
5
5
  export declare const declaredSpecialExpression: BuiltinSpecialExpression<boolean, DeclaredNode>;
@@ -5,14 +5,9 @@ export interface DefnNode extends CommonSpecialExpressionNode<'defn'> {
5
5
  f: SymbolNode;
6
6
  o: FunctionOverload[];
7
7
  }
8
- export interface DefnsNode extends CommonSpecialExpressionNode<'defns'> {
9
- f: AstNode;
10
- o: FunctionOverload[];
11
- }
12
8
  export interface FnNode extends CommonSpecialExpressionNode<'fn'> {
13
9
  p: AstNode[];
14
10
  o: FunctionOverload[];
15
11
  }
16
12
  export declare const defnSpecialExpression: BuiltinSpecialExpression<null, DefnNode>;
17
- export declare const defnsSpecialExpression: BuiltinSpecialExpression<null, DefnsNode>;
18
13
  export declare const fnSpecialExpression: BuiltinSpecialExpression<LitsFunction, FnNode>;
@@ -2,7 +2,7 @@ import type { Any } from '../../interface';
2
2
  import type { AstNode, CommonSpecialExpressionNode, SymbolNode } from '../../parser/interface';
3
3
  import type { BuiltinSpecialExpression } from '../interface';
4
4
  export interface TryNode extends CommonSpecialExpressionNode<'try'> {
5
- e: SymbolNode;
5
+ e: SymbolNode | undefined;
6
6
  ce: AstNode;
7
7
  }
8
8
  export declare const trySpecialExpression: BuiltinSpecialExpression<Any, TryNode>;
@@ -1,6 +1,6 @@
1
1
  import type { Any } from '../../interface';
2
2
  import type { CommonSpecialExpressionNode } from '../../parser/interface';
3
3
  import type { BuiltinSpecialExpression } from '../interface';
4
- export interface WhenNode extends CommonSpecialExpressionNode<'when'> {
4
+ export interface UnlessNode extends CommonSpecialExpressionNode<'unless'> {
5
5
  }
6
- export declare const whenSpecialExpression: BuiltinSpecialExpression<Any, WhenNode>;
6
+ export declare const unlessSpecialExpression: BuiltinSpecialExpression<Any, UnlessNode>;
@@ -16,6 +16,8 @@ export declare class ContextStackImpl {
16
16
  nativeJsFunctions?: Record<string, NativeJsFunction>;
17
17
  });
18
18
  create(context: Context, extraData?: ExtraData): ContextStack;
19
+ exportValue(name: string, value: Any): void;
20
+ addValue(name: string, value: Any): void;
19
21
  clone(): ContextStack;
20
22
  getValue(name: string): unknown;
21
23
  lookUp(node: SymbolNode): LookUpResult;
@@ -1,16 +1,18 @@
1
1
  import type { CondNode } from '../builtin/specialExpressions/cond';
2
- import type { DefNode } from '../builtin/specialExpressions/def';
3
- import type { DefnNode } from '../builtin/specialExpressions/functions';
4
2
  import type { IfNode } from '../builtin/specialExpressions/if';
3
+ import type { LetNode } from '../builtin/specialExpressions/let';
5
4
  import type { SwitchNode } from '../builtin/specialExpressions/switch';
5
+ import type { UnlessNode } from '../builtin/specialExpressions/unless';
6
6
  import type { Arity, FunctionArguments } from '../builtin/utils';
7
- import type { A_SymbolToken } from '../tokenizer/algebraic/algebraicTokens';
7
+ import type { A_ReservedSymbolToken, A_SymbolToken } from '../tokenizer/algebraic/algebraicTokens';
8
8
  import type { TokenStream } from '../tokenizer/interface';
9
9
  import type { AstNode, ParseState } from './interface';
10
10
  export declare class AlgebraicParser {
11
11
  private readonly tokenStream;
12
12
  private parseState;
13
13
  constructor(tokenStream: TokenStream, parseState: ParseState);
14
+ private peek;
15
+ private peekAhead;
14
16
  private advance;
15
17
  parse(): AstNode[];
16
18
  private parseExpression;
@@ -26,14 +28,17 @@ export declare class AlgebraicParser {
26
28
  };
27
29
  private parseShorthandLamdaFunction;
28
30
  private parseLet;
29
- private parseFor;
31
+ private parseDo;
32
+ private parseLoop;
33
+ private parseTry;
34
+ private parseForOrDoseq;
30
35
  private parseForLoopBinding;
31
36
  private parseBinding;
32
- parseIf(token: A_SymbolToken): IfNode;
37
+ parseIfOrUnless(token: A_SymbolToken): IfNode | UnlessNode;
33
38
  parseCond(token: A_SymbolToken): CondNode;
34
39
  parseSwitch(token: A_SymbolToken): SwitchNode;
35
- parseDef(token: A_SymbolToken): DefNode;
36
- parseDefn(token: A_SymbolToken): DefnNode;
40
+ parseFunction(token: A_ReservedSymbolToken<'function'>): LetNode;
37
41
  private isAtEnd;
38
- private peek;
42
+ private isAtExpressionEnd;
43
+ private parseExport;
39
44
  }
@@ -1,6 +1,7 @@
1
1
  import type { TokenStream } from '../tokenizer/interface';
2
- import type { NumberNode, ParseState, ReservedSymbolNode, StringNode, SymbolNode } from './interface';
2
+ import type { NormalExpressionNodeWithName, NumberNode, ParseState, ReservedSymbolNode, StringNode, SymbolNode } from './interface';
3
3
  export declare function parseSymbol(tokenStream: TokenStream, parseState: ParseState): SymbolNode;
4
4
  export declare function parseReservedSymbol(tokenStream: TokenStream, parseState: ParseState): ReservedSymbolNode;
5
5
  export declare function parseNumber(tokenStream: TokenStream, parseState: ParseState): NumberNode;
6
6
  export declare function parseString(tokenStream: TokenStream, parseState: ParseState): StringNode;
7
+ export declare function parseRegexpShorthand(tokenStream: TokenStream, parseState: ParseState): NormalExpressionNodeWithName;
@@ -31,41 +31,25 @@ declare const validAlgebraicReservedNamesRecord: {
31
31
  readonly value: null;
32
32
  readonly forbidden: false;
33
33
  };
34
- };
35
- export declare const algebraicReservedNamesRecord: {
36
- readonly if_let: {
37
- readonly value: null;
38
- readonly forbidden: true;
39
- };
40
- readonly when_let: {
34
+ readonly when: {
41
35
  readonly value: null;
42
- readonly forbidden: true;
43
- };
44
- readonly when_first: {
45
- readonly value: null;
46
- readonly forbidden: true;
47
- };
48
- readonly fn: {
49
- readonly value: null;
50
- readonly forbidden: true;
51
- };
52
- readonly defns: {
53
- readonly value: null;
54
- readonly forbidden: true;
36
+ readonly forbidden: false;
55
37
  };
56
- readonly try: {
38
+ readonly while: {
57
39
  readonly value: null;
58
- readonly forbidden: true;
40
+ readonly forbidden: false;
59
41
  };
60
- readonly recur: {
42
+ readonly function: {
61
43
  readonly value: null;
62
- readonly forbidden: true;
44
+ readonly forbidden: false;
63
45
  };
64
- readonly loop: {
46
+ readonly export: {
65
47
  readonly value: null;
66
- readonly forbidden: true;
48
+ readonly forbidden: false;
67
49
  };
68
- readonly doseq: {
50
+ };
51
+ export declare const algebraicReservedNamesRecord: {
52
+ readonly fn: {
69
53
  readonly value: null;
70
54
  readonly forbidden: true;
71
55
  };
@@ -101,6 +85,22 @@ export declare const algebraicReservedNamesRecord: {
101
85
  readonly value: null;
102
86
  readonly forbidden: false;
103
87
  };
88
+ readonly when: {
89
+ readonly value: null;
90
+ readonly forbidden: false;
91
+ };
92
+ readonly while: {
93
+ readonly value: null;
94
+ readonly forbidden: false;
95
+ };
96
+ readonly function: {
97
+ readonly value: null;
98
+ readonly forbidden: false;
99
+ };
100
+ readonly export: {
101
+ readonly value: null;
102
+ readonly forbidden: false;
103
+ };
104
104
  };
105
105
  export type ValidAlgebraicReservedName = keyof typeof validAlgebraicReservedNamesRecord;
106
106
  export type AlgebraicReservedName = keyof typeof algebraicReservedNamesRecord;
@@ -8,4 +8,4 @@ export declare const tokenizeA_ReservedSymbolToken: Tokenizer<A_ReservedSymbolTo
8
8
  export declare const tokenizeA_Operator: Tokenizer<A_OperatorToken>;
9
9
  export declare const tokenizeA_MultiLineComment: Tokenizer<A_MultiLineCommentToken>;
10
10
  export declare const tokenizeA_SingleLineComment: Tokenizer<A_SingleLineCommentToken>;
11
- export declare const algebraicTokenizers: [Tokenizer<A_WhitespaceToken>, Tokenizer<A_MultiLineCommentToken>, Tokenizer<A_SingleLineCommentToken>, Tokenizer<import("../common/commonTokens").PolishNotationToken>, Tokenizer<import("../common/commonTokens").AlgebraicNotationToken>, Tokenizer<import("../common/commonTokens").EndNotationToken>, Tokenizer<import("../common/commonTokens").LParenToken>, Tokenizer<import("../common/commonTokens").RParenToken>, Tokenizer<import("../common/commonTokens").LBracketToken>, Tokenizer<import("../common/commonTokens").RBracketToken>, Tokenizer<import("../common/commonTokens").LBraceToken>, Tokenizer<import("../common/commonTokens").RBraceToken>, Tokenizer<import("../common/commonTokens").StringToken>, Tokenizer<A_BasePrefixedNumberToken>, Tokenizer<A_NumberToken>, Tokenizer<A_OperatorToken>, Tokenizer<A_ReservedSymbolToken>, Tokenizer<A_SymbolToken>];
11
+ export declare const algebraicTokenizers: [Tokenizer<A_WhitespaceToken>, Tokenizer<A_MultiLineCommentToken>, Tokenizer<A_SingleLineCommentToken>, Tokenizer<import("../common/commonTokens").PolishNotationToken>, Tokenizer<import("../common/commonTokens").AlgebraicNotationToken>, Tokenizer<import("../common/commonTokens").EndNotationToken>, Tokenizer<import("../common/commonTokens").LParenToken>, Tokenizer<import("../common/commonTokens").RParenToken>, Tokenizer<import("../common/commonTokens").LBracketToken>, Tokenizer<import("../common/commonTokens").RBracketToken>, Tokenizer<import("../common/commonTokens").LBraceToken>, Tokenizer<import("../common/commonTokens").RBraceToken>, Tokenizer<import("../common/commonTokens").StringToken>, Tokenizer<import("../common/commonTokens").RegexpShorthandToken>, Tokenizer<A_BasePrefixedNumberToken>, Tokenizer<A_NumberToken>, Tokenizer<A_OperatorToken>, Tokenizer<A_ReservedSymbolToken>, Tokenizer<A_SymbolToken>];
@@ -4,8 +4,8 @@ import { type TokenDebugData } from '../utils';
4
4
  import type { ValidAlgebraicReservedName } from './algebraicReservedNames';
5
5
  export declare const algebraicSimpleTokenTypes: readonly ["LBrace", "LBracket", "LParen", "RBrace", "RBracket", "RParen", "AlgNotation", "PolNotation", "EndNotation"];
6
6
  export declare const algebraicOnlyValueTokenTypes: ["A_Whitespace", "A_Operator", "A_Symbol", "A_ReservedSymbol", "A_SingleLineComment", "A_MultiLineComment", "A_Number", "A_BasePrefixedNumber"];
7
- export declare const algebraicValueTokenTypes: readonly ["String", "A_Whitespace", "A_Operator", "A_Symbol", "A_ReservedSymbol", "A_SingleLineComment", "A_MultiLineComment", "A_Number", "A_BasePrefixedNumber"];
8
- export declare const algebraicTokenTypes: readonly ["LBrace", "LBracket", "LParen", "RBrace", "RBracket", "RParen", "AlgNotation", "PolNotation", "EndNotation", "String", "A_Whitespace", "A_Operator", "A_Symbol", "A_ReservedSymbol", "A_SingleLineComment", "A_MultiLineComment", "A_Number", "A_BasePrefixedNumber"];
7
+ export declare const algebraicValueTokenTypes: readonly ["String", "RegexpShorthand", "A_Whitespace", "A_Operator", "A_Symbol", "A_ReservedSymbol", "A_SingleLineComment", "A_MultiLineComment", "A_Number", "A_BasePrefixedNumber"];
8
+ export declare const algebraicTokenTypes: readonly ["LBrace", "LBracket", "LParen", "RBrace", "RBracket", "RParen", "AlgNotation", "PolNotation", "EndNotation", "String", "RegexpShorthand", "A_Whitespace", "A_Operator", "A_Symbol", "A_ReservedSymbol", "A_SingleLineComment", "A_MultiLineComment", "A_Number", "A_BasePrefixedNumber"];
9
9
  declare const symbolicUnaryOperators: readonly ["!", "~", "+", "-"];
10
10
  declare const symbolicBinaryOperators: readonly ["**", "*", "/", "%", "+", "-", "<<", ">>", ">>>", "++", "<", "<=", ">", ">=", "==", "!=", "&", "^", "|", "&&", "||", "??"];
11
11
  declare const symbolicOperators: readonly ["!", "~", "+", "-", "**", "*", "/", "%", "+", "-", "<<", ">>", ">>>", "++", "<", "<=", ">", ">=", "==", "!=", "&", "^", "|", "&&", "||", "??", "=>", "...", ".", ",", "=", ";"];
@@ -36,9 +36,9 @@ export type A_SingleLineCommentToken = GenericAlgebraicValueToken<'A_SingleLineC
36
36
  export type A_MultiLineCommentToken = GenericAlgebraicValueToken<'A_MultiLineComment'>;
37
37
  export type AlgebraicOnlyValueToken = A_WhitespaceToken | A_NumberToken | A_BasePrefixedNumberToken | A_OperatorToken | A_SymbolToken | A_ReservedSymbolToken | A_SingleLineCommentToken | A_MultiLineCommentToken;
38
38
  export type AlgebraicToken = AlgebraicOnlyValueToken | CommonSimpleToken | CommonValueToken;
39
- export declare function isA_SymbolToken(token: Token | undefined): token is A_SymbolToken;
40
- export declare function assertA_SymbolToken(token: Token | undefined): asserts token is A_SymbolToken;
41
- export declare function asA_SymbolToken(token: Token | undefined): A_SymbolToken;
39
+ export declare function isA_SymbolToken<T extends string>(token: Token | undefined, symbolName?: T): token is A_SymbolToken<T>;
40
+ export declare function assertA_SymbolToken<T extends string>(token: Token | undefined, symbolName?: T): asserts token is A_SymbolToken<T>;
41
+ export declare function asA_SymbolToken<T extends string>(token: Token | undefined, symbolName?: T): A_SymbolToken<T>;
42
42
  export declare function isA_BinaryOperatorToken(token: Token | undefined): token is A_OperatorToken<SymbolicBinaryOperator>;
43
43
  export declare function assertA_BinaryOperatorToken(token: Token | undefined): asserts token is A_OperatorToken<SymbolicBinaryOperator>;
44
44
  export declare function asA_BinaryOperatorToken(token: Token | undefined): A_OperatorToken<SymbolicBinaryOperator>;
@@ -1,8 +1,9 @@
1
1
  import type { TokenDescriptor, Tokenizer } from '../interface';
2
2
  import type { SimpleToken } from '../tokens';
3
- import type { AlgebraicNotationToken, EndNotationToken, LBraceToken, LBracketToken, LParenToken, PolishNotationToken, RBraceToken, RBracketToken, RParenToken, StringToken } from './commonTokens';
3
+ import type { AlgebraicNotationToken, EndNotationToken, LBraceToken, LBracketToken, LParenToken, PolishNotationToken, RBraceToken, RBracketToken, RParenToken, RegexpShorthandToken, StringToken } from './commonTokens';
4
4
  export declare const NO_MATCH: TokenDescriptor<never>;
5
5
  export declare function isNoMatch(tokenDescriptor: TokenDescriptor<any>): tokenDescriptor is TokenDescriptor<never>;
6
6
  export declare const tokenizeString: Tokenizer<StringToken>;
7
+ export declare const tokenizeRegexpShorthand: Tokenizer<RegexpShorthandToken>;
7
8
  export declare function tokenizeSimpleToken<T extends SimpleToken>(type: T[0], value: string, input: string, position: number): TokenDescriptor<T>;
8
- export declare const commonTokenizers: readonly [Tokenizer<PolishNotationToken>, Tokenizer<AlgebraicNotationToken>, Tokenizer<EndNotationToken>, Tokenizer<LParenToken>, Tokenizer<RParenToken>, Tokenizer<LBracketToken>, Tokenizer<RBracketToken>, Tokenizer<LBraceToken>, Tokenizer<RBraceToken>, Tokenizer<StringToken>];
9
+ export declare const commonTokenizers: readonly [Tokenizer<PolishNotationToken>, Tokenizer<AlgebraicNotationToken>, Tokenizer<EndNotationToken>, Tokenizer<LParenToken>, Tokenizer<RParenToken>, Tokenizer<LBracketToken>, Tokenizer<RBracketToken>, Tokenizer<LBraceToken>, Tokenizer<RBraceToken>, Tokenizer<StringToken>, Tokenizer<RegexpShorthandToken>];
@@ -1,7 +1,7 @@
1
1
  import { type TokenDebugData } from '../utils';
2
2
  import type { Token } from '../tokens';
3
3
  export declare const commonSimpleTokenTypes: readonly ["LBrace", "LBracket", "LParen", "RBrace", "RBracket", "RParen", "AlgNotation", "PolNotation", "EndNotation"];
4
- export declare const commomValueTokenTypes: readonly ["String"];
4
+ export declare const commomValueTokenTypes: readonly ["String", "RegexpShorthand"];
5
5
  export type CommonSimpleTokenType = typeof commonSimpleTokenTypes[number];
6
6
  export type CommonValueTokenType = typeof commomValueTokenTypes[number];
7
7
  type GenericCommonSimpleToken<T extends CommonSimpleTokenType> = [T] | [T, TokenDebugData];
@@ -16,8 +16,9 @@ export type AlgebraicNotationToken = GenericCommonSimpleToken<'AlgNotation'>;
16
16
  export type PolishNotationToken = GenericCommonSimpleToken<'PolNotation'>;
17
17
  export type EndNotationToken = GenericCommonSimpleToken<'EndNotation'>;
18
18
  export type StringToken = GenericCommonValueToken<'String'>;
19
+ export type RegexpShorthandToken = GenericCommonValueToken<'RegexpShorthand'>;
19
20
  export type CommonSimpleToken = LParenToken | RParenToken | LBracketToken | RBracketToken | LBraceToken | RBraceToken | AlgebraicNotationToken | PolishNotationToken | EndNotationToken;
20
- export type CommonValueToken = StringToken;
21
+ export type CommonValueToken = StringToken | RegexpShorthandToken;
21
22
  export declare function isLParenToken(token?: Token): token is LParenToken;
22
23
  export declare function assertLParenToken(token?: Token): asserts token is LParenToken;
23
24
  export declare function asLParenToken(token?: Token): LParenToken;
@@ -39,6 +40,9 @@ export declare function asRBraceToken(token?: Token): RBraceToken;
39
40
  export declare function isStringToken(token?: Token): token is StringToken;
40
41
  export declare function assertStringToken(token?: Token): asserts token is StringToken;
41
42
  export declare function asStringToken(token?: Token): StringToken;
43
+ export declare function isRegexpShorthandToken(token?: Token): token is RegexpShorthandToken;
44
+ export declare function assertRegexpShorthandToken(token?: Token): asserts token is RegexpShorthandToken;
45
+ export declare function asRegexpShorthandToken(token?: Token): RegexpShorthandToken;
42
46
  export declare function isAlgebraicNotationToken(token?: Token): token is AlgebraicNotationToken;
43
47
  export declare function assertAlgebraicNotationToken(token?: Token): asserts token is AlgebraicNotationToken;
44
48
  export declare function asAlgebraicNotationToken(token?: Token): AlgebraicNotationToken;
@@ -1,5 +1,5 @@
1
1
  import type { Tokenizer } from '../interface';
2
- import type { P_CollectionAccessorToken, P_CommentToken, P_FnShorthandToken, P_ModifierToken, P_NumberToken, P_RegexpShorthandToken, P_ReservedSymbolToken, P_StringShorthandToken, P_SymbolToken, P_WhitespaceToken } from './polishTokens';
2
+ import type { P_CollectionAccessorToken, P_CommentToken, P_FnShorthandToken, P_ModifierToken, P_NumberToken, P_ReservedSymbolToken, P_StringShorthandToken, P_SymbolToken, P_WhitespaceToken } from './polishTokens';
3
3
  export declare const tokenizeP_Comment: Tokenizer<P_CommentToken>;
4
4
  export declare const tokenizeP_Whitespace: Tokenizer<P_WhitespaceToken>;
5
5
  export declare const tokenizeP_Number: Tokenizer<P_NumberToken>;
@@ -10,5 +10,4 @@ export declare const tokenizeP_FnShorthand: Tokenizer<P_FnShorthandToken>;
10
10
  export declare const tokenizeP_ReservedSymbol: Tokenizer<P_ReservedSymbolToken>;
11
11
  export declare const tokenizeP_Modifier: Tokenizer<P_ModifierToken>;
12
12
  export declare const tokenizeP_CollectionAccessor: Tokenizer<P_CollectionAccessorToken>;
13
- export declare const tokenizeP_RegexpShorthand: Tokenizer<P_RegexpShorthandToken>;
14
- export declare const polishTokenizers: [Tokenizer<P_WhitespaceToken>, Tokenizer<P_CommentToken>, Tokenizer<import("../common/commonTokens").PolishNotationToken>, Tokenizer<import("../common/commonTokens").AlgebraicNotationToken>, Tokenizer<import("../common/commonTokens").EndNotationToken>, Tokenizer<import("../common/commonTokens").LParenToken>, Tokenizer<import("../common/commonTokens").RParenToken>, Tokenizer<import("../common/commonTokens").LBracketToken>, Tokenizer<import("../common/commonTokens").RBracketToken>, Tokenizer<import("../common/commonTokens").LBraceToken>, Tokenizer<import("../common/commonTokens").RBraceToken>, Tokenizer<import("../common/commonTokens").StringToken>, Tokenizer<P_StringShorthandToken>, Tokenizer<P_NumberToken>, Tokenizer<P_ReservedSymbolToken>, Tokenizer<P_ModifierToken>, Tokenizer<P_SymbolToken>, Tokenizer<P_RegexpShorthandToken>, Tokenizer<P_FnShorthandToken>, Tokenizer<P_CollectionAccessorToken>];
13
+ export declare const polishTokenizers: [Tokenizer<P_WhitespaceToken>, Tokenizer<P_CommentToken>, Tokenizer<import("../common/commonTokens").PolishNotationToken>, Tokenizer<import("../common/commonTokens").AlgebraicNotationToken>, Tokenizer<import("../common/commonTokens").EndNotationToken>, Tokenizer<import("../common/commonTokens").LParenToken>, Tokenizer<import("../common/commonTokens").RParenToken>, Tokenizer<import("../common/commonTokens").LBracketToken>, Tokenizer<import("../common/commonTokens").RBracketToken>, Tokenizer<import("../common/commonTokens").LBraceToken>, Tokenizer<import("../common/commonTokens").RBraceToken>, Tokenizer<import("../common/commonTokens").StringToken>, Tokenizer<import("../common/commonTokens").RegexpShorthandToken>, Tokenizer<P_StringShorthandToken>, Tokenizer<P_NumberToken>, Tokenizer<P_ReservedSymbolToken>, Tokenizer<P_ModifierToken>, Tokenizer<P_SymbolToken>, Tokenizer<P_FnShorthandToken>, Tokenizer<P_CollectionAccessorToken>];
@@ -5,9 +5,9 @@ export declare const modifierNames: readonly ["&rest", "&let", "&when", "&while"
5
5
  export type ModifierName = typeof modifierNames[number];
6
6
  export declare const polishOnlySimpleTokenTypes: ["P_FnShorthand"];
7
7
  export declare const polishSimpleTokenTypes: readonly ["LBrace", "LBracket", "LParen", "RBrace", "RBracket", "RParen", "AlgNotation", "PolNotation", "EndNotation", "P_FnShorthand"];
8
- export declare const polishOnlyValueTokenTypes: ["P_Modifier", "P_StringShorthand", "P_Symbol", "P_ReservedSymbol", "P_RegexpShorthand", "P_CollectionAccessor", "P_Comment", "P_Whitespace", "P_Number"];
9
- export declare const polishValueTokenTypes: readonly ["String", "P_Modifier", "P_StringShorthand", "P_Symbol", "P_ReservedSymbol", "P_RegexpShorthand", "P_CollectionAccessor", "P_Comment", "P_Whitespace", "P_Number"];
10
- export declare const polishTokenTypes: readonly ["LBrace", "LBracket", "LParen", "RBrace", "RBracket", "RParen", "AlgNotation", "PolNotation", "EndNotation", "P_FnShorthand", "String", "P_Modifier", "P_StringShorthand", "P_Symbol", "P_ReservedSymbol", "P_RegexpShorthand", "P_CollectionAccessor", "P_Comment", "P_Whitespace", "P_Number"];
8
+ export declare const polishOnlyValueTokenTypes: ["P_Modifier", "P_StringShorthand", "P_Symbol", "P_ReservedSymbol", "P_CollectionAccessor", "P_Comment", "P_Whitespace", "P_Number"];
9
+ export declare const polishValueTokenTypes: readonly ["String", "RegexpShorthand", "P_Modifier", "P_StringShorthand", "P_Symbol", "P_ReservedSymbol", "P_CollectionAccessor", "P_Comment", "P_Whitespace", "P_Number"];
10
+ export declare const polishTokenTypes: readonly ["LBrace", "LBracket", "LParen", "RBrace", "RBracket", "RParen", "AlgNotation", "PolNotation", "EndNotation", "P_FnShorthand", "String", "RegexpShorthand", "P_Modifier", "P_StringShorthand", "P_Symbol", "P_ReservedSymbol", "P_CollectionAccessor", "P_Comment", "P_Whitespace", "P_Number"];
11
11
  export type PolishSimpleTokenType = typeof polishSimpleTokenTypes[number];
12
12
  export type PolishValueTokenType = typeof polishValueTokenTypes[number];
13
13
  export type PolishTokenType = typeof polishTokenTypes[number];
@@ -18,13 +18,12 @@ export type P_ModifierToken = GenericPolishValueToken<'P_Modifier', ModifierName
18
18
  export type P_StringShorthandToken = GenericPolishValueToken<'P_StringShorthand'>;
19
19
  export type P_SymbolToken = GenericPolishValueToken<'P_Symbol'>;
20
20
  export type P_ReservedSymbolToken = GenericPolishValueToken<'P_ReservedSymbol'>;
21
- export type P_RegexpShorthandToken = GenericPolishValueToken<'P_RegexpShorthand'>;
22
21
  export type P_CollectionAccessorToken = GenericPolishValueToken<'P_CollectionAccessor', '.' | '#'>;
23
22
  export type P_CommentToken = GenericPolishValueToken<'P_Comment'>;
24
23
  export type P_WhitespaceToken = GenericPolishValueToken<'P_Whitespace'>;
25
24
  export type P_NumberToken = GenericPolishValueToken<'P_Number'>;
26
25
  export type PolishOnlySimpleToken = P_FnShorthandToken;
27
- export type PolishOnlyValueToken = P_ModifierToken | P_StringShorthandToken | P_SymbolToken | P_ReservedSymbolToken | P_RegexpShorthandToken | P_CollectionAccessorToken | P_CommentToken | P_WhitespaceToken | P_NumberToken;
26
+ export type PolishOnlyValueToken = P_ModifierToken | P_StringShorthandToken | P_SymbolToken | P_ReservedSymbolToken | P_CollectionAccessorToken | P_CommentToken | P_WhitespaceToken | P_NumberToken;
28
27
  export type PolishToken = PolishOnlySimpleToken | PolishOnlyValueToken | CommonSimpleToken | CommonValueToken;
29
28
  export declare function isP_StringShorthandToken(token?: Token): token is P_StringShorthandToken;
30
29
  export declare function assertP_StringShorthandToken(token?: Token): asserts token is P_StringShorthandToken;
@@ -38,9 +37,6 @@ export declare function asP_ReservedSymbolToken(token?: Token): P_ReservedSymbol
38
37
  export declare function isP_ModifierToken(token?: Token): token is P_ModifierToken;
39
38
  export declare function assertP_ModifierToken(token?: Token): asserts token is P_ModifierToken;
40
39
  export declare function asP_ModifierToken(token?: Token): P_ModifierToken;
41
- export declare function isP_RegexpShorthandToken(token?: Token): token is P_RegexpShorthandToken;
42
- export declare function assertP_RegexpShorthandToken(token?: Token): asserts token is P_RegexpShorthandToken;
43
- export declare function asP_RegexpShorthandToken(token?: Token): P_RegexpShorthandToken;
44
40
  export declare function isP_FnShorthandToken(token?: Token): token is P_FnShorthandToken;
45
41
  export declare function assertP_FnShorthandToken(token?: Token): asserts token is P_FnShorthandToken;
46
42
  export declare function asP_FnShorthandToken(token?: Token): P_FnShorthandToken;
@@ -2,8 +2,8 @@ import type { CommonSimpleToken, CommonValueToken } from './common/commonTokens'
2
2
  import type { AlgebraicOnlyValueToken } from './algebraic/algebraicTokens';
3
3
  import type { PolishOnlySimpleToken, PolishOnlyValueToken } from './polish/polishTokens';
4
4
  export declare const simpleTokenTypes: readonly ["LBrace", "LBracket", "LParen", "RBrace", "RBracket", "RParen", "AlgNotation", "PolNotation", "EndNotation", "P_FnShorthand"];
5
- export declare const valueTokenTypes: readonly ["String", "A_Whitespace", "A_Operator", "A_Symbol", "A_ReservedSymbol", "A_SingleLineComment", "A_MultiLineComment", "A_Number", "A_BasePrefixedNumber", "P_Modifier", "P_StringShorthand", "P_Symbol", "P_ReservedSymbol", "P_RegexpShorthand", "P_CollectionAccessor", "P_Comment", "P_Whitespace", "P_Number"];
6
- export declare const tokenTypes: readonly ["LBrace", "LBracket", "LParen", "RBrace", "RBracket", "RParen", "AlgNotation", "PolNotation", "EndNotation", "P_FnShorthand", "String", "A_Whitespace", "A_Operator", "A_Symbol", "A_ReservedSymbol", "A_SingleLineComment", "A_MultiLineComment", "A_Number", "A_BasePrefixedNumber", "P_Modifier", "P_StringShorthand", "P_Symbol", "P_ReservedSymbol", "P_RegexpShorthand", "P_CollectionAccessor", "P_Comment", "P_Whitespace", "P_Number"];
5
+ export declare const valueTokenTypes: readonly ["String", "RegexpShorthand", "A_Whitespace", "A_Operator", "A_Symbol", "A_ReservedSymbol", "A_SingleLineComment", "A_MultiLineComment", "A_Number", "A_BasePrefixedNumber", "P_Modifier", "P_StringShorthand", "P_Symbol", "P_ReservedSymbol", "P_CollectionAccessor", "P_Comment", "P_Whitespace", "P_Number"];
6
+ export declare const tokenTypes: readonly ["LBrace", "LBracket", "LParen", "RBrace", "RBracket", "RParen", "AlgNotation", "PolNotation", "EndNotation", "P_FnShorthand", "String", "RegexpShorthand", "A_Whitespace", "A_Operator", "A_Symbol", "A_ReservedSymbol", "A_SingleLineComment", "A_MultiLineComment", "A_Number", "A_BasePrefixedNumber", "P_Modifier", "P_StringShorthand", "P_Symbol", "P_ReservedSymbol", "P_CollectionAccessor", "P_Comment", "P_Whitespace", "P_Number"];
7
7
  export type TokenType = typeof tokenTypes[number];
8
8
  export type SimpleToken = CommonSimpleToken | PolishOnlySimpleToken;
9
9
  export type ValueToken = CommonValueToken | AlgebraicOnlyValueToken | PolishOnlyValueToken;