mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: simplify return if ...
constructs to make more code compatible with -autofree
This commit is contained in:
@ -356,7 +356,10 @@ 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>' }
|
||||
if typ in [.unone, .name] {
|
||||
return lit
|
||||
}
|
||||
return '<span class="token $typ">$lit</span>'
|
||||
}
|
||||
mut s := scanner.new_scanner(code, .parse_comments, &pref.Preferences{})
|
||||
mut tok := s.scan()
|
||||
|
Reference in New Issue
Block a user