v2 / cmd / tools / vvet / tests / indent_with_space.vv
24 lines · 22 sloc · 444 bytes · 2332ecff4811b8c97dfda8e825170e9397962519
Raw
1fn main() {
2 _ = 1 == 2
3}
4
5fn block_comments() {
6 /* tab to indent the comment
7 spaces before
8 also spaces before
9 same here */
10 /* spaces for comment indentation (ouch)
11 and inside too
12 */
13}
14
15fn space_inside_strings() {
16 // Plain strings
17 str := "Bad space usage for variable indentation.
18 Here it's fine.
19 Here too."
20 str2 := 'linebreak and space\n inside'
21 // String interpolation
22 si1 := 'Error here ${foo}
23 and not here'
24}
25