mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: move Var back to table.v now that the struct bug is fixed
This commit is contained in:
parent
5b1700e52a
commit
91ece782af
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user