1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vfmt: handle comments

This commit is contained in:
Alexander Medvednikov
2019-11-11 17:18:32 +03:00
parent 51663520c8
commit ffa6bcfff5
14 changed files with 153 additions and 72 deletions

View File

@ -71,8 +71,8 @@ enum TokenKind {
ge
le
// comments
//line_com
//mline_com
line_comment
mline_comment
nl
dot
dotdot
@ -192,7 +192,8 @@ fn build_token_str() []string {
s[TokenKind.question] = '?'
s[TokenKind.left_shift] = '<<'
s[TokenKind.righ_shift] = '>>'
//s[TokenKind.line_com] = '//'
s[TokenKind.line_comment] = '// line comment'
s[TokenKind.mline_comment] = '/* mline comment */'
s[TokenKind.nl] = 'NLL'
s[TokenKind.dollar] = '$'
s[TokenKind.key_assert] = 'assert'