mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
compiler: print relative paths for user code
This commit is contained in:
parent
9e7ee40477
commit
b7d1a175a8
3 changed files with 17 additions and 5 deletions
|
@ -124,6 +124,9 @@ fn (v mut V) new_parser_file(path string) Parser {
|
|||
file_pcguard: path_pcguard,
|
||||
is_script: (v.pref.is_script && path == v.dir)
|
||||
}
|
||||
if p.pref.building_v {
|
||||
p.scanner.should_print_relative_paths_on_error = false
|
||||
}
|
||||
v.cgen.file = path
|
||||
p.scan_tokens()
|
||||
//p.scanner.debug_tokens()
|
||||
|
@ -155,6 +158,7 @@ fn (v mut V) new_parser(scanner &Scanner, id string) Parser {
|
|||
if p.pref.is_repl {
|
||||
p.scanner.should_print_line_on_error = false
|
||||
p.scanner.should_print_errors_in_color = false
|
||||
p.scanner.should_print_relative_paths_on_error = true
|
||||
}
|
||||
v.cgen.line_directives = v.pref.is_debuggable
|
||||
// v.cgen.file = path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue