1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: minor cleanup of consts (#8441)

This commit is contained in:
yuyi 2021-01-30 19:35:25 +08:00 committed by GitHub
parent ced7649bf8
commit 97cb7687a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 := ''