Fix comments

This commit is contained in:
Sasha Koshka 2023-12-05 22:04:12 -05:00
parent 0e3101b4d0
commit 6e861c4e52
1 changed files with 13 additions and 6 deletions

View File

@ -270,15 +270,22 @@ func (this *fsplLexer) escapeSequence () (rune, error) {
}
func (this *fsplLexer) skipWhitespace () error {
err := this.skipComment()
if err != nil { return err }
for isWhitespace(this.rune) {
err := this.nextRune()
if err != nil { return err }
if this.rune == ';' {
for this.rune != '\n' {
err := this.nextRune()
if err != nil { return err }
}
err = this.skipComment()
if err != nil { return err }
}
return nil
}
func (this *fsplLexer) skipComment () error {
if this.rune == ';' {
for this.rune != '\n' {
err := this.nextRune()
if err != nil { return err }
}
}
return nil