septima-lang 0.0.6 → 0.0.7

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 (72) hide show
  1. package/main.js +1 -0
  2. package/package.json +3 -3
  3. package/dist/src/ast-node.d.ts +0 -98
  4. package/dist/src/ast-node.js +0 -139
  5. package/dist/src/extract-message.d.ts +0 -1
  6. package/dist/src/extract-message.js +0 -10
  7. package/dist/src/fail-me.d.ts +0 -1
  8. package/dist/src/fail-me.js +0 -11
  9. package/dist/src/find-array-method.d.ts +0 -15
  10. package/dist/src/find-array-method.js +0 -104
  11. package/dist/src/find-string-method.d.ts +0 -2
  12. package/dist/src/find-string-method.js +0 -88
  13. package/dist/src/index.d.ts +0 -1
  14. package/dist/src/index.js +0 -18
  15. package/dist/src/location.d.ts +0 -11
  16. package/dist/src/location.js +0 -3
  17. package/dist/src/parser.d.ts +0 -44
  18. package/dist/src/parser.js +0 -462
  19. package/dist/src/result.d.ts +0 -24
  20. package/dist/src/result.js +0 -29
  21. package/dist/src/runtime.d.ts +0 -28
  22. package/dist/src/runtime.js +0 -347
  23. package/dist/src/scanner.d.ts +0 -23
  24. package/dist/src/scanner.js +0 -88
  25. package/dist/src/septima.d.ts +0 -32
  26. package/dist/src/septima.js +0 -91
  27. package/dist/src/should-never-happen.d.ts +0 -1
  28. package/dist/src/should-never-happen.js +0 -9
  29. package/dist/src/source-code.d.ts +0 -19
  30. package/dist/src/source-code.js +0 -90
  31. package/dist/src/stack.d.ts +0 -11
  32. package/dist/src/stack.js +0 -19
  33. package/dist/src/switch-on.d.ts +0 -1
  34. package/dist/src/switch-on.js +0 -9
  35. package/dist/src/symbol-table.d.ts +0 -6
  36. package/dist/src/symbol-table.js +0 -3
  37. package/dist/src/value.d.ts +0 -128
  38. package/dist/src/value.js +0 -634
  39. package/dist/tests/parser.spec.d.ts +0 -1
  40. package/dist/tests/parser.spec.js +0 -31
  41. package/dist/tests/septima-compute-module.spec.d.ts +0 -1
  42. package/dist/tests/septima-compute-module.spec.js +0 -36
  43. package/dist/tests/septima.spec.d.ts +0 -1
  44. package/dist/tests/septima.spec.js +0 -807
  45. package/dist/tests/value.spec.d.ts +0 -1
  46. package/dist/tests/value.spec.js +0 -355
  47. package/dist/tsconfig.tsbuildinfo +0 -1
  48. package/jest-output.json +0 -1
  49. package/src/a.js +0 -66
  50. package/src/ast-node.ts +0 -249
  51. package/src/extract-message.ts +0 -5
  52. package/src/fail-me.ts +0 -7
  53. package/src/find-array-method.ts +0 -115
  54. package/src/find-string-method.ts +0 -84
  55. package/src/index.ts +0 -1
  56. package/src/location.ts +0 -13
  57. package/src/parser.ts +0 -530
  58. package/src/result.ts +0 -45
  59. package/src/runtime.ts +0 -365
  60. package/src/scanner.ts +0 -106
  61. package/src/septima.ts +0 -121
  62. package/src/should-never-happen.ts +0 -4
  63. package/src/source-code.ts +0 -101
  64. package/src/stack.ts +0 -18
  65. package/src/switch-on.ts +0 -4
  66. package/src/symbol-table.ts +0 -7
  67. package/src/value.ts +0 -742
  68. package/tests/parser.spec.ts +0 -30
  69. package/tests/septima-compute-module.spec.ts +0 -41
  70. package/tests/septima.spec.ts +0 -880
  71. package/tests/value.spec.ts +0 -387
  72. package/tsconfig.json +0 -11
package/src/stack.ts DELETED
@@ -1,18 +0,0 @@
1
- import { AstNode } from './ast-node'
2
- export type T = { ast: AstNode; next: T } | undefined
3
-
4
- export function push(ast: AstNode, s: T) {
5
- return { ast, next: s }
6
- }
7
-
8
- export function pop(s: T) {
9
- if (typeof s === 'undefined') {
10
- throw new Error(`Cannot pop from an empty stack`)
11
- }
12
-
13
- return s.next
14
- }
15
-
16
- export function empty(): T {
17
- return undefined
18
- }
package/src/switch-on.ts DELETED
@@ -1,4 +0,0 @@
1
- export function switchOn<G, K extends string>(selector: K, cases: Record<K, () => G>): G {
2
- const f = cases[selector]
3
- return f()
4
- }
@@ -1,7 +0,0 @@
1
- import { Value } from './value'
2
-
3
- export interface SymbolTable {
4
- lookup(sym: string): Value
5
- export(): Record<string, unknown>
6
- exportValue(): Record<string, Value>
7
- }