I'm trying to return a Table from a macro using "quote do", but the generated 
AST contains fields that are no accesible outside the tables module
    
    
    /tmp/t.nim(8, 3) Error: the field 'data' is not accessible.
    
    
    Run
    
    
    import macros
    import tables
    
    macro foo(): untyped =
      var a = { "one": 1 }.toTable
      quote do:
        `a`
    
    let b = foo()
    echo b
    
    
    Run

The AST for the table itself looks like this:
    
    
    (data: [(34912920694978458, "one", 1), ...], counter: 1)
    
    
    Run

Reply via email to