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

enums (mode == .default_mode syntax); fix foo.bar[0].baz = val

This commit is contained in:
Alexander Medvednikov
2019-07-02 00:00:27 +02:00
parent 859c8ffdb8
commit a9b8bc067f
5 changed files with 123 additions and 60 deletions

View File

@@ -95,7 +95,7 @@ fn (f mut Fn) clear_vars() {
// vlib header file?
fn (p mut Parser) is_sig() bool {
return (p.pref.build_mode == default_mode || p.pref.build_mode == build) &&
return (p.pref.build_mode == .default_mode || p.pref.build_mode == .build) &&
(p.file_path.contains(TmpPath))
}
@@ -338,7 +338,7 @@ fn (p mut Parser) fn_decl() {
// Add function definition to the top
if !is_c && f.name != 'main' && p.first_run() {
// TODO hack to make Volt compile without -embed_vlib
if f.name == 'darwin__nsstring' && p.pref.build_mode == default_mode {
if f.name == 'darwin__nsstring' && p.pref.build_mode == .default_mode {
return
}
p.cgen.fns << fn_decl + ';'