1
0
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:
Ivan Greene 2019-06-22 23:34:41 -05:00 committed by Alex Medvednikov
parent 1152180a71
commit 6c6be7acaa
2 changed files with 7 additions and 9 deletions

View File

@ -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

View File

@ -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