Address review comments

This commit is contained in:
Tom Hvitved
2021-07-02 10:38:53 +02:00
parent 52529d590b
commit 330b33638e
8 changed files with 269 additions and 112 deletions

View File

@@ -29,11 +29,6 @@ class Module extends TModule {
this = TResolved(result)
or
exists(Namespace n | this = TUnresolved(n) and result = "...::" + n.toString())
or
exists(Toplevel t |
this = TMain(t) and
result = "Main(" + t.toString() + ")"
)
}
/** Gets the location of this module. */
@@ -52,11 +47,6 @@ class Module extends TModule {
weight, count(n.getAStmt()) desc, loc.getFile().getAbsolutePath(), loc.getStartLine(),
loc.getStartColumn()
)
or
exists(Toplevel t |
this = TMain(t) and
result = t.getLocation()
)
}
}
@@ -124,7 +114,7 @@ class Toplevel extends ModuleBase, TToplevel {
pred = "getBeginBlock" and result = this.getBeginBlock(_)
}
final override Module getModule() { result = TMain(this) }
final override Module getModule() { result = TResolved("Object") }
final override string toString() { result = g.getLocation().getFile().getBaseName() }
}