Merge pull request #15 from imuli/panic-quick-fix
the simple fix for #14 (panic on 32-bit)
This commit is contained in:
commit
e116a1adf9
@ -462,7 +462,7 @@ func Rune2Class(r rune) int {
|
|||||||
|
|
||||||
// NewLexer the Lexer constructor
|
// NewLexer the Lexer constructor
|
||||||
func NewLexer(src io.Reader, fName string) *Lexer {
|
func NewLexer(src io.Reader, fName string) *Lexer {
|
||||||
file := token.NewFileSet().AddFile(fName, -1, 1<<31-1)
|
file := token.NewFileSet().AddFile(fName, -1, 1<<31-3)
|
||||||
lx, err := lex.New(file, bufio.NewReader(src), lex.RuneClass(Rune2Class))
|
lx, err := lex.New(file, bufio.NewReader(src), lex.RuneClass(Rune2Class))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user