Compare commits

..

3 Commits

Author SHA1 Message Date
ee40dcc65c bun check 2025-12-02 15:59:01 -08:00
88f98f9817 wrong return type 2025-12-02 15:58:57 -08:00
4c91ef57b9 fix search/replace 2025-12-02 15:58:50 -08:00
3 changed files with 5 additions and 4 deletions

View File

@ -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",

View File

@ -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
} }

View File

@ -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)
} }