Enable double slash single line comments

This commit is contained in:
Tobie Morgan Hitchcock 2016-10-24 12:11:12 +01:00
parent 4c8d5213dc
commit 4951aa61f6

View file

@ -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 == ' ':