From 44da7a302fc20031a75bc408db8e35b941f75c1f Mon Sep 17 00:00:00 2001 From: meisl Date: Mon, 21 Jun 2021 20:09:50 +0200 Subject: [PATCH] + temporarily hack together a module name inside Prog8Parser.parseModule, to make the current all-too-simple import resolution work --- compilerAst/src/prog8/parser/Prog8Parser.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/compilerAst/src/prog8/parser/Prog8Parser.kt b/compilerAst/src/prog8/parser/Prog8Parser.kt index 96e341abe..bc7182a4a 100644 --- a/compilerAst/src/prog8/parser/Prog8Parser.kt +++ b/compilerAst/src/prog8/parser/Prog8Parser.kt @@ -39,9 +39,19 @@ object Prog8Parser { parser.addErrorListener(antlrErrorListener) val parseTree = parser.module() - val moduleName = "anonymous" - val module = parseTree.toAst(moduleName, Path(""), PetsciiEncoding) + // FIXME: hacking together a name for the module: + var moduleName = src.origin + if (moduleName.startsWith("