Enable double slash single line comments
This commit is contained in:
parent
4c8d5213dc
commit
4951aa61f6
1 changed files with 2 additions and 0 deletions
|
@ -131,6 +131,8 @@ func (s *scanner) scan() (tok Token, lit string, val interface{}) {
|
||||||
case '/':
|
case '/':
|
||||||
chn := s.next()
|
chn := s.next()
|
||||||
switch {
|
switch {
|
||||||
|
case chn == '/':
|
||||||
|
return s.scanCommentSingle(ch)
|
||||||
case chn == '*':
|
case chn == '*':
|
||||||
return s.scanCommentMultiple(ch)
|
return s.scanCommentMultiple(ch)
|
||||||
case chn == ' ':
|
case chn == ' ':
|
||||||
|
|
Loading…
Reference in a new issue