Compare commits
3 Commits
b0ad0a0768
...
ee40dcc65c
| Author | SHA1 | Date | |
|---|---|---|---|
| ee40dcc65c | |||
| 88f98f9817 | |||
| 4c91ef57b9 |
|
|
@ -10,7 +10,8 @@
|
||||||
"repl": "bun generate-parser && bun bin/repl",
|
"repl": "bun generate-parser && bun bin/repl",
|
||||||
"update-reef": "rm -rf ~/.bun/install/cache/ && rm bun.lock && bun update reefvm",
|
"update-reef": "rm -rf ~/.bun/install/cache/ && rm bun.lock && bun update reefvm",
|
||||||
"cli:install": "ln -s \"$(pwd)/bin/shrimp\" ~/.bun/bin/shrimp",
|
"cli:install": "ln -s \"$(pwd)/bin/shrimp\" ~/.bun/bin/shrimp",
|
||||||
"cli:remove": "rm ~/.bun/bin/shrimp"
|
"cli:remove": "rm ~/.bun/bin/shrimp",
|
||||||
|
"check": "bunx tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/view": "^6.38.3",
|
"@codemirror/view": "^6.38.3",
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ const commandShapes: CommandShape[] = [
|
||||||
] as const
|
] as const
|
||||||
|
|
||||||
let commandSource = () => commandShapes
|
let commandSource = () => commandShapes
|
||||||
export const setCommandSource = (do: () => CommandShape[]) => {
|
export const setCommandSource = (fn: () => CommandShape[]) => {
|
||||||
commandSource = fn
|
commandSource = fn
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { readFileSync } from 'fs'
|
||||||
import { VM, fromValue, toValue, isValue, type Bytecode } from 'reefvm'
|
import { VM, fromValue, toValue, isValue, type Bytecode } from 'reefvm'
|
||||||
import { Compiler } from '#compiler/compiler'
|
import { Compiler } from '#compiler/compiler'
|
||||||
import { parse } from '#parser/parser2'
|
import { parse } from '#parser/parser2'
|
||||||
import { type SyntaxNode, Tree } from '#parser/node'
|
import { Tree } from '#parser/node'
|
||||||
import { globals as parserGlobals, setGlobals as setParserGlobals } from '#parser/tokenizer'
|
import { globals as parserGlobals, setGlobals as setParserGlobals } from '#parser/tokenizer'
|
||||||
import { globals as prelude } from '#prelude'
|
import { globals as prelude } from '#prelude'
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ export class Shrimp {
|
||||||
return isValue(result) ? fromValue(result, this.vm) : result
|
return isValue(result) ? fromValue(result, this.vm) : result
|
||||||
}
|
}
|
||||||
|
|
||||||
parse(code: string): SyntaxNode {
|
parse(code: string): Tree {
|
||||||
return parseCode(code, this.globals)
|
return parseCode(code, this.globals)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user