mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Convert OS to enum
This commit is contained in:
parent
1152180a71
commit
6c6be7acaa
@ -33,13 +33,11 @@ const (
|
||||
TmpPath = vtmp_path()
|
||||
)
|
||||
|
||||
// TODO V was re-written in V before enums were implemented. Lots of consts need to be replaced with
|
||||
// enums.
|
||||
const (
|
||||
MAC = 0
|
||||
LINUX = 1
|
||||
WINDOWS = 2
|
||||
)
|
||||
enum Os {
|
||||
MAC
|
||||
LINUX
|
||||
WINDOWS
|
||||
}
|
||||
|
||||
enum Pass {
|
||||
// A very short pass that only looks at imports in the begginning of each file
|
||||
@ -63,7 +61,7 @@ enum Pass {
|
||||
struct V {
|
||||
mut:
|
||||
build_mode BuildMode
|
||||
os int // the OS to build for
|
||||
os Os // the OS to build for
|
||||
nofmt bool // disable vfmt
|
||||
out_name_c string // name of the temporary C file
|
||||
files []string // all V files that need to be parsed and compiled
|
||||
|
@ -41,7 +41,7 @@ mut:
|
||||
cgen *CGen
|
||||
table *Table
|
||||
run Pass // TODO rename `run` to `pass`
|
||||
os int
|
||||
os Os
|
||||
pkg string
|
||||
inside_const bool
|
||||
expr_var Var
|
||||
|
Loading…
Reference in New Issue
Block a user