From dde4229c5e519917a0de91845107ee9ff2a0d9c6 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Tue, 19 Feb 2013 20:24:04 +0100 Subject: [PATCH] Prefix with 'ooc' instead of something weird. --- source/rock/middle/Module.ooc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/source/rock/middle/Module.ooc b/source/rock/middle/Module.ooc index e15b0386..2626892b 100644 --- a/source/rock/middle/Module.ooc +++ b/source/rock/middle/Module.ooc @@ -21,11 +21,6 @@ Module: class extends Node { // all variants of useful paths path, fullName, simpleName, underName, pathElement, oocPath: String - - // the use def that imported us - at this point, every ooc - // file comes from a use def somewhere - the main program might - // be a 'virtual' use def, but still one. - useDef: UseDef // mostly controls the generation of an implicit main main := false @@ -80,13 +75,13 @@ Module: class extends Node { getUnderName: func -> String { underName } getPathElement: func -> String { pathElement } getSourceFolderName: func -> String { - path := File new(pathElement) getAbsoluteFile() name - uze := params sourcePathTable get(pathElement) - if (uze) { - path = "%s/%s" format(uze identifier, path) + if (!uze) { + message := "Module that has no corresponding use! pathElement = %s" format(pathElement) + params errorHandler onError(InternalError new(token, message)) } - path + + "ooc/%s" format(uze identifier) } getPath: func (suffix := "") -> String {