Renamed one more variable to avoid exporting
This commit is contained in:
@@ -233,7 +233,7 @@ func shuntingYard(re string, flags ...ReFlag) ([]postfixNode, error) {
|
||||
i++
|
||||
}
|
||||
if re_runes[i] == '-' && (i > 0 && re_runes[i-1] != '\\') && (i < len(re_runes)-1 && re_runes[i+1] != rbracketRune) { // Unescaped hyphen, that has some character (not a RBRACKET) after it - This represents a character range, so we replace with CHAR_RANGE. This metacharacter will be used later on to construct the range
|
||||
re_runes[i] = CHAR_RANGE
|
||||
re_runes[i] = charRangeRune
|
||||
}
|
||||
toAppend = append(toAppend, re_runes[i])
|
||||
i++
|
||||
@@ -524,7 +524,7 @@ func shuntingYard(re string, flags ...ReFlag) ([]postfixNode, error) {
|
||||
if firstCharAdded && re_postfix[i] == rbracketRune {
|
||||
break
|
||||
}
|
||||
if re_postfix[i] == CHAR_RANGE {
|
||||
if re_postfix[i] == charRangeRune {
|
||||
endOfRange = true
|
||||
i++
|
||||
continue
|
||||
|
@@ -15,7 +15,7 @@ var lparenRune rune = 0xF0005 // Parentheses in regex are concatenated with thi
|
||||
var rparenRune rune = 0xF0006
|
||||
var nonCapLparenRune rune = 0xF0007 // Represents a non-capturing group's LPAREN
|
||||
var escBackslashRune rune = 0xF0008 // Represents an escaped backslash
|
||||
var CHAR_RANGE rune = 0xF0009 // Represents a character range
|
||||
var charRangeRune rune = 0xF0009 // Represents a character range
|
||||
|
||||
var specialChars = []rune{'?', '*', '\\', '^', '$', '{', '}', '(', ')', '[', ']', '+', '|', '.', concatRune, '<', '>', lbracketRune, rbracketRune, nonCapLparenRune}
|
||||
|
||||
|
Reference in New Issue
Block a user