Skip to content

Commit

Permalink
More debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
nddrylliog committed Sep 21, 2010
1 parent 863982c commit cdb9863
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions source/rock/frontend/AstBuilder.ooc
Expand Up @@ -109,13 +109,11 @@ AstBuilder: class {
getRealImportPath: static func (imp: Import, module: Module, params: BuildParams) -> (String, File, File) {
oocImpPath := imp path + ".ooc"
path := FileUtils resolveRedundancies(oocImpPath)
if(params veryVerbose) ("Trying path " + path) println()
(impPath, impElement) := params sourcePath getFile(path)
if(!impElement) {
parent := File new(module path) parent()
if(parent) {
path = FileUtils resolveRedundancies(parent path + File separator + oocImpPath)
if(params veryVerbose) ("Trying path " + path) println()
(impPat2, impElemen2) := params sourcePath getFile(path)
(impPath, impElement) = (impPat2, impElemen2)
}
Expand Down
1 change: 1 addition & 0 deletions source/rock/frontend/CommandLine.ooc
Expand Up @@ -260,6 +260,7 @@ CommandLine: class {

params verbose = true
params veryVerbose = true
params sourcePath debug = true

} else if (option == "stats") {

Expand Down
2 changes: 2 additions & 0 deletions source/rock/frontend/PathList.ooc
Expand Up @@ -9,6 +9,7 @@ import structs/[ArrayList, List, HashMap]
*/
PathList: class {
paths := HashMap<String, File> new()
debug := false

getPaths : func -> HashMap<String, File> { paths }

Expand Down Expand Up @@ -103,6 +104,7 @@ PathList: class {
getFile: func (path: String) -> (File, File) {
for(element in paths) {
candidate := File new(element path, path)
if(debug) ("Trying path " + candidate getPath())
if (candidate exists?()) {
return (candidate, element)
}
Expand Down

0 comments on commit cdb9863

Please sign in to comment.