Added more tests
This commit is contained in:
parent
05688e9e79
commit
c6ef9013a8
3 changed files with 57 additions and 5 deletions
|
@ -26,9 +26,8 @@ func (s *Scanner) scanFile(path string, pkg string) error {
|
|||
}
|
||||
|
||||
s.files <- file
|
||||
i := 0
|
||||
|
||||
for i < len(tokens) {
|
||||
for i := 0; i < len(tokens); i++ {
|
||||
switch tokens[i].Kind {
|
||||
case token.NewLine:
|
||||
case token.Comment:
|
||||
|
@ -49,8 +48,6 @@ func (s *Scanner) scanFile(path string, pkg string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
i++
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue