Created
June 13, 2015 15:06
-
-
Save taotetek/45ef889ce71f4e8924b0 to your computer and use it in GitHub Desktop.
error.nim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, streams, parsexml, strutils, macros | |
macro readModelAndBuildAST(filename: string): stmt = | |
let | |
inputString = slurp(filename.strVal) | |
var s = newStringStream(inputString) | |
var x: XmlParser | |
open(x, s, $filename) | |
next(x) | |
while true: | |
case x.kind | |
of xmlEof: break | |
of xmlElementOpen, xmlElementStart: | |
case x.elementName | |
of "constant": | |
x.next | |
echo x.attrKey | |
echo x.attrValue | |
x.next | |
echo x.attrKey | |
echo x.attrValue | |
else: discard | |
else: discard | |
next(x) | |
readModelAndBuildAST("./api/zframe.xml") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shit.nim(28, 21) Info: template/generic instantiation from here | |
lib/pure/lexbase.nim(149, 11) Error: VM is not allowed to 'cast' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment