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

compiler: blank ident error fixes + other small cflag / parser fixes (#2418)

* merge master
* fix blank ident & add cflag error
* undo cflag changes
* fix gen_js
* undo gen_js changes
* fix
* fix
This commit is contained in:
joe-conigliaro
2019-10-19 08:00:47 +11:00
committed by GitHub
parent c18578af6f
commit 28b24eeef6
4 changed files with 35 additions and 14 deletions

View File

@ -93,7 +93,7 @@ fn (table mut Table) parse_cflag(cflag string, mod string) {
if flag[0] == `-` {
for f in allowed_flags {
i := 1+f.len
if i < flag.len && f == flag.substr(1,i) {
if i <= flag.len && f == flag.substr(1,i) {
name = flag.left(i).trim_space()
flag = flag.right(i).trim_space()
break
@ -137,6 +137,7 @@ fn (table mut Table) parse_cflag(cflag string, mod string) {
break
}
}
return
}
//TODO: implement msvc specific c_options_before_target and c_options_after_target ...