sure
This commit is contained in:
parent
e95c0d6728
commit
c51030b3bd
|
|
@ -1,5 +1,4 @@
|
||||||
import { Tree, TreeCursor } from '@lezer/common'
|
import { Tree, TreeCursor } from '@lezer/common'
|
||||||
import { assertNever } from '#utils/utils'
|
|
||||||
import { type Value, fromValue } from 'reefvm'
|
import { type Value, fromValue } from 'reefvm'
|
||||||
|
|
||||||
export const treeToString = (tree: Tree, input: string): string => {
|
export const treeToString = (tree: Tree, input: string): string => {
|
||||||
|
|
@ -35,6 +34,5 @@ export const treeToString = (tree: Tree, input: string): string => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const VMResultToValue = (result: Value): unknown => {
|
export const VMResultToValue = (result: Value): unknown => {
|
||||||
if (result.type === 'function') return Function
|
return result.type === 'function' ? Function : fromValue(result)
|
||||||
else return fromValue(result)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user