mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: line comments fixes
This commit is contained in:
@@ -589,6 +589,8 @@ fn (s mut Scanner) scan() ScanRes {
|
||||
s.line_comment = s.text[start + 1..s.pos]
|
||||
s.line_comment = s.line_comment.trim_space()
|
||||
if s.is_fmt {
|
||||
s.pos-- // fix line_nr, \n was read, and the comment is marked on the next line
|
||||
s.line_nr--
|
||||
return scan_res(.line_comment, s.line_comment)
|
||||
}
|
||||
//s.fgenln('// ${s.prev_tok.str()} "$s.line_comment"')
|
||||
|
||||
Reference in New Issue
Block a user