Fixed small bug in parser script
Peter Munch-Ellingsen peterme@peterme.net
Wed, 25 Oct 2017 16:58:11 +0200
1 files changed,
3 insertions(+),
3 deletions(-)
jump to
M
dynparser.nim
→
dynparser.nim
@@ -4,9 +4,9 @@
var currentLine = 1 oldLine = 0 - sourceFile = open("parser2.nim") + sourceFile = open("core/parser.nim") -for line in lines "parser.ndi": +for line in lines "core/nimcache/parser.ndi": let fields = line.split('\t') (origName, mangledName, path, row, column) = (fields[0], fields[1], fields[2], fields[3].parseInt, fields[4])@@ -19,5 +19,5 @@ let definition = sourceFile.readLine()
if definition.startsWith("proc"): #echo origName & " -> " & mangledName echo definition.replace(re""" *= *\".*\"""", ": string").replace(re"""{\..*\.}""","").replace(re""" *= *$""", "").replace("*(","(") & " {.importc, extern:\"" & mangledName & "\".}" - oldLine = currentLine currentLine += 1 + oldLine = currentLine