compiler refactoring; use typesafe path handing; docgen: render symbols between modules

This commit is contained in:
Andreas Rumpf 2018-09-07 01:53:09 +02:00 • committed by Araq
commit 86556ebfdb
45 changed files with 816 additions and 504 deletions

View file

@ -10,7 +10,8 @@
# This module implements a dependency file generator.
import
os, options, ast, astalgo, msgs, ropes, idents, passes, modulepaths
os, options, ast, astalgo, msgs, ropes, idents, passes, modulepaths,
pathutils
from modulegraphs import ModuleGraph
@ -45,10 +46,10 @@ proc addDotDependency(c: PPassContext, n: PNode): PNode =
else:
discard
proc generateDot*(graph: ModuleGraph; project: string) =
proc generateDot*(graph: ModuleGraph; project: AbsoluteFile) =
let b = Backend(graph.backend)
discard writeRope("digraph $1 {$n$2}$n" % [
rope(changeFileExt(extractFilename(project), "")), b.dotGraph],
rope(project.splitFile.name), b.dotGraph],
changeFileExt(project, "dot"))
proc myOpen(graph: ModuleGraph; module: PSym): PPassContext =