diff options
Diffstat (limited to 'compiler/sourcemap.nim')
-rw-r--r-- | compiler/sourcemap.nim | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/sourcemap.nim b/compiler/sourcemap.nim index 90e34eb73..2ec40227b 100644 --- a/compiler/sourcemap.nim +++ b/compiler/sourcemap.nim @@ -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 = "" |