func New(in io.Reader, filename string) *Parser { ret := new(Parser) ret.filename = filename ret.lx = lexer.New(in, filename) ret.s = lexin.NewScanner(ret.lx, isComment) return ret }
// New creates a new parser that parses a file into an AST. func New(in io.Reader, filename string) *Parser { ret := new(Parser) ret.filename = filename ret.lx = lexer.New(in, filename) ret.s = lexin.NewScanner(ret.lx, func(t *tok.Token) bool { return t.Is(tt.Comment) }) return ret }