mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Fix "Nested comments won't compile" (#908)
This commit is contained in:

committed by
Alexander Medvednikov

parent
1cd95091f2
commit
30633ff14f
@ -1,3 +1,26 @@
|
||||
// 1 line comment
|
||||
|
||||
/* 1 line comment */
|
||||
|
||||
/*
|
||||
multi line comment (1)
|
||||
multi line comment (2)
|
||||
multi line comment (3)
|
||||
*/
|
||||
|
||||
/*
|
||||
multi line comment (1)
|
||||
/*
|
||||
nested comment
|
||||
*/
|
||||
/*nested comment*/
|
||||
/*nested comment
|
||||
*/
|
||||
/* nested comment */
|
||||
/* /* nested comment */ */
|
||||
multi line comment (2)
|
||||
*/
|
||||
|
||||
type myfn fn (int) string
|
||||
|
||||
type myfn2 fn (a int, b int) int
|
||||
@ -35,6 +58,9 @@ type actionf_p2 fn (voidptr, voidptr)
|
||||
|
||||
fn myprint(s string, ..) {
|
||||
println('my print')
|
||||
println('// comment')
|
||||
println('/* comment */')
|
||||
println('/* /* comment */ */')
|
||||
}
|
||||
|
||||
fn test_fns() {
|
||||
|
Reference in New Issue
Block a user