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.
- package/main.js +1 -0
- package/package.json +3 -3
- package/dist/src/ast-node.d.ts +0 -98
- package/dist/src/ast-node.js +0 -139
- package/dist/src/extract-message.d.ts +0 -1
- package/dist/src/extract-message.js +0 -10
- package/dist/src/fail-me.d.ts +0 -1
- package/dist/src/fail-me.js +0 -11
- package/dist/src/find-array-method.d.ts +0 -15
- package/dist/src/find-array-method.js +0 -104
- package/dist/src/find-string-method.d.ts +0 -2
- package/dist/src/find-string-method.js +0 -88
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +0 -18
- package/dist/src/location.d.ts +0 -11
- package/dist/src/location.js +0 -3
- package/dist/src/parser.d.ts +0 -44
- package/dist/src/parser.js +0 -462
- package/dist/src/result.d.ts +0 -24
- package/dist/src/result.js +0 -29
- package/dist/src/runtime.d.ts +0 -28
- package/dist/src/runtime.js +0 -347
- package/dist/src/scanner.d.ts +0 -23
- package/dist/src/scanner.js +0 -88
- package/dist/src/septima.d.ts +0 -32
- package/dist/src/septima.js +0 -91
- package/dist/src/should-never-happen.d.ts +0 -1
- package/dist/src/should-never-happen.js +0 -9
- package/dist/src/source-code.d.ts +0 -19
- package/dist/src/source-code.js +0 -90
- package/dist/src/stack.d.ts +0 -11
- package/dist/src/stack.js +0 -19
- package/dist/src/switch-on.d.ts +0 -1
- package/dist/src/switch-on.js +0 -9
- package/dist/src/symbol-table.d.ts +0 -6
- package/dist/src/symbol-table.js +0 -3
- package/dist/src/value.d.ts +0 -128
- package/dist/src/value.js +0 -634
- package/dist/tests/parser.spec.d.ts +0 -1
- package/dist/tests/parser.spec.js +0 -31
- package/dist/tests/septima-compute-module.spec.d.ts +0 -1
- package/dist/tests/septima-compute-module.spec.js +0 -36
- package/dist/tests/septima.spec.d.ts +0 -1
- package/dist/tests/septima.spec.js +0 -807
- package/dist/tests/value.spec.d.ts +0 -1
- package/dist/tests/value.spec.js +0 -355
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/jest-output.json +0 -1
- package/src/a.js +0 -66
- package/src/ast-node.ts +0 -249
- package/src/extract-message.ts +0 -5
- package/src/fail-me.ts +0 -7
- package/src/find-array-method.ts +0 -115
- package/src/find-string-method.ts +0 -84
- package/src/index.ts +0 -1
- package/src/location.ts +0 -13
- package/src/parser.ts +0 -530
- package/src/result.ts +0 -45
- package/src/runtime.ts +0 -365
- package/src/scanner.ts +0 -106
- package/src/septima.ts +0 -121
- package/src/should-never-happen.ts +0 -4
- package/src/source-code.ts +0 -101
- package/src/stack.ts +0 -18
- package/src/switch-on.ts +0 -4
- package/src/symbol-table.ts +0 -7
- package/src/value.ts +0 -742
- package/tests/parser.spec.ts +0 -30
- package/tests/septima-compute-module.spec.ts +0 -41
- package/tests/septima.spec.ts +0 -880
- package/tests/value.spec.ts +0 -387
- 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