From 97cb7687a2a771594ff80a8cae84f6a0180cef98 Mon Sep 17 00:00:00 2001 From: yuyi Date: Sat, 30 Jan 2021 19:35:25 +0800 Subject: [PATCH] cgen: minor cleanup of consts (#8441) --- vlib/v/gen/cgen.v | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index 59611b1411..06e05a8963 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -22,6 +22,9 @@ const ( cmp_str = ['eq', 'ne', 'gt', 'lt', 'ge', 'le'] // when operands are switched cmp_rev = ['eq', 'ne', 'lt', 'gt', 'le', 'ge'] + tabs = ['', '\t', '\t\t', '\t\t\t', '\t\t\t\t', '\t\t\t\t\t', '\t\t\t\t\t\t', '\t\t\t\t\t\t\t', + '\t\t\t\t\t\t\t\t', + ] ) struct Gen { @@ -145,12 +148,6 @@ mut: force_main_console bool // true when [console] used on fn main() } -const ( - tabs = ['', '\t', '\t\t', '\t\t\t', '\t\t\t\t', '\t\t\t\t\t', '\t\t\t\t\t\t', '\t\t\t\t\t\t\t', - '\t\t\t\t\t\t\t\t', - ] -) - pub fn cgen(files []ast.File, table &table.Table, pref &pref.Preferences) string { // println('start cgen2') mut module_built := ''