mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: further fixes for string interpolation and builtin macros
This commit is contained in:
@ -185,7 +185,7 @@ fn html_highlight(code string, tb &table.Table) string {
|
||||
} else { tok.lit }
|
||||
return if typ in [.unone, .name] { lit } else { '<span class="token $typ">$lit</span>' }
|
||||
}
|
||||
s := scanner.new_scanner(code, .parse_comments)
|
||||
s := scanner.new_scanner(code, .parse_comments, false)
|
||||
mut tok := s.scan()
|
||||
mut next_tok := s.scan()
|
||||
mut buf := strings.new_builder(200)
|
||||
|
@ -140,7 +140,7 @@ fn main() {
|
||||
|
||||
fn (foptions &FormatOptions) format_file(file string) {
|
||||
mut prefs := pref.new_preferences()
|
||||
prefs.is_fmt = util.is_fmt()
|
||||
prefs.is_fmt = true
|
||||
if foptions.is_verbose {
|
||||
eprintln('vfmt2 running fmt.fmt over file: $file')
|
||||
}
|
||||
|
Reference in New Issue
Block a user