lots of vfmt fixes

This commit is contained in:
Alexander Medvednikov 2019-12-17 17:28:25 +03:00
parent 67cf7f18e6
commit 53b334145b
8 changed files with 100 additions and 49 deletions

View file

@ -51,6 +51,9 @@ fn (p mut Parser) error_with_position(s string, sp ScannerPos) {
}
fn (p mut Parser) warn_with_position(s string, sp ScannerPos) {
if p.scanner.is_fmt {
return
}
// on a warning, restore the scanner state after printing the warning:
cpos := p.scanner.get_scanner_pos()
e := normalized_error( s )