mirror of
https://github.com/MontFerret/ferret.git
synced 2025-11-06 08:39:09 +02:00
add CaseChangingStream
This commit is contained in:
@@ -3,6 +3,7 @@ package parser
|
||||
|
||||
import (
|
||||
"github.com/MontFerret/ferret/pkg/parser/fql"
|
||||
resources "github.com/antlr/antlr4/doc/resources"
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
)
|
||||
|
||||
@@ -12,7 +13,9 @@ type Parser struct {
|
||||
|
||||
func New(query string) *Parser {
|
||||
input := antlr.NewInputStream(query)
|
||||
lexer := fql.NewFqlLexer(input)
|
||||
upper := resources.NewCaseChangingStream(input, true)
|
||||
|
||||
lexer := fql.NewFqlLexer(upper)
|
||||
stream := antlr.NewCommonTokenStream(lexer, antlr.TokenDefaultChannel)
|
||||
|
||||
p := fql.NewFqlParser(stream)
|
||||
|
||||
Reference in New Issue
Block a user