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

compiler: import modules relative to v.mod

This commit is contained in:
Delyan Angelov
2020-03-01 16:49:39 +02:00
committed by GitHub
parent 615a4b3452
commit 1066ec5cd9
17 changed files with 133 additions and 10 deletions

View File

@ -254,6 +254,11 @@ fn (p mut Parser) chash() {
}
flag = flag.replace('@VROOT', vmod_file_location.vmod_folder )
}
for deprecated in ['@VMOD', '@VMODULE', '@VPATH', '@VLIB_PATH'] {
if flag.contains(deprecated) {
p.error('${deprecated} had been deprecated, use @VROOT instead.')
}
}
// p.log('adding flag "$flag"')
_ = p.table.parse_cflag(flag, p.mod, p.v.pref.compile_defines_all ) or {
p.error_with_token_index(err, p.cur_tok_index() - 1)