enable consts with operators in scripts

pull/1092/head
hazohelet 2019-07-12 09:04:20 +09:00 committed by Alexander Medvednikov
parent f834644db4
commit 560ba55572
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ string _STR_TMP(const char *fmt, ...) {
// It can be skipped in single file programs // It can be skipped in single file programs
if v.pref.is_script { if v.pref.is_script {
//println('Generating main()...') //println('Generating main()...')
cgen.genln('int main() { $cgen.fn_main; return 0; }') cgen.genln('int main() { init_consts(); $cgen.fn_main; return 0; }')
} }
else { else {
println('panic: function `main` is undeclared in the main module') println('panic: function `main` is undeclared in the main module')