I'm trying to read a csv file at compile-time and convert it into a const 
table. I found [this old thread](https://forum.nim-lang.org/t/2708). The code 
i'm using is as follows:
    
    
    import std/[parseutils, strutils, tables]
    
    static:
      let v1 = "data.csv".slurp.splitLines
      var v2 = newSeq[(string, uint)]()
      
      for pair in v1:
        let splitted = split(pair, ',')
        if len(splitted) > 1:
          v2.add((splitted[0], splitted[1].parseUint))
    
    const v3 = v2.toTable
    echo v3
    
    
    Run

Now i get the following error: `undeclared identifier: 'v2'`

Reply via email to