We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import nimja type Model = object foo: string baa: string var modelObj = Model(foo: "foo", baa: "baa") var model = addr modelObj echo tmpls""" {% for (name, val) in fieldPairs(modelObj) %} {{name}} {% endfor %} """
C:\Users\david.choosenim\toolchains\nim-1.6.6\lib\core\macros.nim(540, 5) Error: wrong number of variables
The text was updated successfully, but these errors were encountered:
nim c -d:dumpNwtMacro -r ttt.nim
when nimjaTmplsVar`gensym1 is string: nimjaTmplsVar`gensym1 = newStringOfCap(11) nimjaTmplsVar`gensym1 &= " " for name, val in # <--------------- fieldPairs is removed ! nimjaTmplsVar`gensym1 &= "\n " nimjaTmplsVar`gensym1 &= `$` do: name nimjaTmplsVar`gensym1 &= "\n ": discard nimjaTmplsVar`gensym1 &= "\n"
But its in the Nimja AST:
[ { "kind": "NStr", "strBody": " " }, { "kind": "NFor", "forStmt": "name, val in fieldPairs(modelObj)", # <------- "forBody": [ { "kind": "NStr", "strBody": "\n " }, { "kind": "NVariable", "variableBody": "name" }, { "kind": "NStr", "strBody": "\n " } ] }, { "kind": "NStr", "strBody": "\n" } ]
really strange
Sorry, something went wrong.
No branches or pull requests
C:\Users\david.choosenim\toolchains\nim-1.6.6\lib\core\macros.nim(540, 5) Error: wrong number of variables
The text was updated successfully, but these errors were encountered: