Big compiler Cleanup (#14777)

This commit is contained in:
Clyybber
2020-08-28 22:18:09 +02:00
committed by GitHub
parent f8c48fc186
commit 13e659cfec
53 changed files with 481 additions and 783 deletions

View File

@@ -78,8 +78,7 @@ proc text*(sourceNode: SourceNode, depth: int): string =
result.add(child.node.text(depth + 1))
proc `$`*(sourceNode: SourceNode): string =
text(sourceNode, 0)
proc `$`*(sourceNode: SourceNode): string = text(sourceNode, 0)
# base64_VLQ
@@ -107,8 +106,7 @@ proc encode*(i: int): string =
z += 1
type
TokenState = enum Normal, String, Ident, Mangled
type TokenState = enum Normal, String, Ident, Mangled
iterator tokenize*(line: string): (bool, string) =
# result = @[]
@@ -244,10 +242,10 @@ proc serializeMappings(map: SourceMapGenerator, mappings: seq[Mapping]): string
var previous = Mapping(generated: (line: 1, column: 0), original: (line: 0, column: 0), name: "", source: "")
var previousSourceId = 0
var previousNameId = 0
result = ""
var next = ""
var nameId = 0
var sourceId = 0
result = ""
for z, mapping in mappings:
next = ""