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

@ -179,12 +179,14 @@ fn (p mut Parser) chash() {
// println('chsh() file=$p.file hash="$hash"')
p.next()
if hash.starts_with('flag ') {
mut flag := hash.right(5)
// expand `@VROOT` `@VMOD` to absolute path
flag = flag.replace('@VROOT', p.vroot)
flag = flag.replace('@VMOD', v_modules_path)
//p.log('adding flag "$flag"')
p.table.parse_cflag(flag, p.mod)
p.first_pass() {
mut flag := hash.right(5)
// expand `@VROOT` `@VMOD` to absolute path
flag = flag.replace('@VROOT', p.vroot)
flag = flag.replace('@VMOD', v_modules_path)
//p.log('adding flag "$flag"')
p.table.parse_cflag(flag, p.mod)
}
return
}
if hash.starts_with('include') {