Browse Source

do not include EOF in token literal

master
Brett Langdon 10 years ago
parent
commit
a7a729f579
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      scanner/position.go

+ 3
- 0
scanner/position.go View File

@ -45,6 +45,9 @@ func (positions *Positions) EndingColumn() int {
func (positions *Positions) String() string { func (positions *Positions) String() string {
literal := "" literal := ""
for _, pos := range positions.positions { for _, pos := range positions.positions {
if pos.Char == EOF {
continue
}
literal += string(pos.Char) literal += string(pos.Char)
} }


Loading…
Cancel
Save