Skip to content

Commit 6c3c293

Browse files
committed
src: workspace
1 parent 62ab669 commit 6c3c293

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/workspace.cr

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,17 @@ module MoonScript
4040
def delete(path: String) : Nil
4141
@cache.delete(path)
4242
end
43+
44+
def artifacts : TypeChecker::Artifacts | Error
45+
map_error(result, &.artifacts)
46+
end
47+
48+
def ast(path: String) : Ast | Error | Nil
49+
@cache[path]?
50+
end
51+
52+
def ast: Ast | Error
53+
map_error(artifacts, &.ast)
54+
end
4355
end
4456
end

0 commit comments

Comments
 (0)