We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69a0ec3 commit 2c4ec4bCopy full SHA for 2c4ec4b
3 files changed
vlib/v/fmt/tests/inline_comment_expected.vv
@@ -0,0 +1,3 @@
1
+module main
2
+
3
+// inline comment
vlib/v/fmt/tests/inline_comment_input.vv
+/* inline comment */
vlib/v/scanner/scanner.v
@@ -1134,8 +1134,10 @@ pub fn (mut s Scanner) text_scan() token.Token {
1134
col: u16_col(s.current_column() - comment.len - 4)
1135
file_idx: s.file_idx
1136
}
1137
- s.error_with_pos('inline comment is deprecated, please use line comment',
1138
- comment_pos)
+ if !s.pref.is_fmt {
+ s.error_with_pos('inline comment is deprecated, please use line comment',
1139
+ comment_pos)
1140
+ }
1141
comment = '\x01' + comment.trim(' ')
1142
1143
return s.new_multiline_token(.comment, comment, comment.len + 4,
0 commit comments