compiler: move Var back to table.v now that the struct bug is fixed

pull/1773/head
Alexander Medvednikov 2019-08-28 21:23:46 +03:00
parent 5b1700e52a
commit 91ece782af
2 changed files with 23 additions and 22 deletions

View File

@ -10,28 +10,6 @@ import (
strings
)
struct Var {
mut:
typ string
name string
is_arg bool
is_const bool
args []Var // function args
attr string // [json] etc
is_mut bool
is_alloc bool
ptr bool
ref bool
parent_fn string // Variables can only be defined in functions
mod string // module where this var is stored
line_nr int
access_mod AccessMod
is_global bool // __global (translated from C only)
is_used bool
is_changed bool
scope_level int
}
struct Parser {
file_path string // "/home/user/hello.v"
file_name string // "hello.v"

View File

@ -7,6 +7,29 @@ module main
import math
import strings
struct Var {
mut:
typ string
name string
is_arg bool
is_const bool
args []Var // function args
attr string // [json] etc
is_mut bool
is_alloc bool
ptr bool
ref bool
parent_fn string // Variables can only be defined in functions
mod string // module where this var is stored
line_nr int
access_mod AccessMod
is_global bool // __global (translated from C only)
is_used bool
is_changed bool
scope_level int
}
struct Table {
mut:
types []Type