diff --git a/compiler/main.v b/compiler/main.v index d3226e74c0..b541a9fb35 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -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 diff --git a/compiler/parser.v b/compiler/parser.v index f116ae1023..a22131de06 100644 --- a/compiler/parser.v +++ b/compiler/parser.v @@ -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