mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-07 20:34:21 +00:00
Big compiler Cleanup (#14777)
This commit is contained in:
@@ -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 = ""
|
||||
|
||||
Reference in New Issue
Block a user