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

os: is_abs => is_abs_path

This commit is contained in:
yuyi
2020-03-10 23:09:37 +08:00
committed by GitHub
parent 324a48bc64
commit 8ff86dbee6
3 changed files with 7 additions and 7 deletions

View File

@ -105,13 +105,13 @@ pub fn (v &V) finalize_compilation() {
pub fn (v mut V) add_parser(parser Parser) int {
pidx := v.parsers.len
v.parsers << parser
file_path := if os.is_abs(parser.file_path) { parser.file_path } else { os.realpath(parser.file_path) }
file_path := if os.is_abs_path(parser.file_path) { parser.file_path } else { os.realpath(parser.file_path) }
v.file_parser_idx[file_path] = pidx
return pidx
}
pub fn (v &V) get_file_parser_index(file string) ?int {
file_path := if os.is_abs(file) { file } else { os.realpath(file) }
file_path := if os.is_abs_path(file) { file } else { os.realpath(file) }
if file_path in v.file_parser_idx {
return v.file_parser_idx[file_path]
}