Remove my wrongly written mangled-related code, not needed anymore (#13858)

This commit is contained in:
Alexander Ivanov 2020-04-03 21:22:03 +03:00 • committed by GitHub
commit cec320b569
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 11 deletions

View file

@ -158,7 +158,7 @@ iterator tokenize*(line: string): (bool, string) =
if token.len > 0:
yield (isMangled, token)
proc parse*(source: string, path: string, mangled: HashSet[string]): SourceNode =
proc parse*(source: string, path: string): SourceNode =
let lines = source.splitLines()
var lastLocation: SourceNode = nil
result = newSourceNode(0, 0, path, @[])
@ -378,8 +378,8 @@ proc toSourceMap*(node: SourceNode, file: string): SourceMapGenerator =
map
proc genSourceMap*(source: string, mangled: HashSet[string], outFile: string): (Rope, SourceMap) =
let node = parse(source, outFile, mangled)
proc genSourceMap*(source: string, outFile: string): (Rope, SourceMap) =
let node = parse(source, outFile)
let map = node.toSourceMap(file = outFile)
((&"{source}\n//# sourceMappingURL={outFile}.map").rope, map.gen)