Renamed type to avoid exporting
This commit is contained in:
@@ -2,7 +2,7 @@ package regex
|
|||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
type NodeType int
|
type nodeType int
|
||||||
|
|
||||||
// This is a slice containing all escapable characters that have special meaning.
|
// This is a slice containing all escapable characters that have special meaning.
|
||||||
// Eg. \b is word boundary, \w is word character etc.
|
// Eg. \b is word boundary, \w is word character etc.
|
||||||
@@ -10,7 +10,7 @@ var escapedChars []rune = []rune("wWdDbBnaftrvsS0")
|
|||||||
|
|
||||||
// This is a list of the possible node types
|
// This is a list of the possible node types
|
||||||
const (
|
const (
|
||||||
characterNode NodeType = iota
|
characterNode nodeType = iota
|
||||||
charclassNode
|
charclassNode
|
||||||
pipeNode
|
pipeNode
|
||||||
concatenateNode
|
concatenateNode
|
||||||
@@ -31,7 +31,7 @@ const lookbehind = -1
|
|||||||
var infinite_reps int = -1 // Represents infinite reps eg. the end range in {5,}
|
var infinite_reps int = -1 // Represents infinite reps eg. the end range in {5,}
|
||||||
// This represents a node in the postfix representation of the expression
|
// This represents a node in the postfix representation of the expression
|
||||||
type postfixNode struct {
|
type postfixNode struct {
|
||||||
nodetype NodeType
|
nodetype nodeType
|
||||||
contents []rune // Contents of the node
|
contents []rune // Contents of the node
|
||||||
startReps int // Minimum number of times the node should be repeated - used with numeric specifiers
|
startReps int // Minimum number of times the node should be repeated - used with numeric specifiers
|
||||||
endReps int // Maximum number of times the node should be repeated - used with numeric specifiers
|
endReps int // Maximum number of times the node should be repeated - used with numeric specifiers
|
||||||
|
Reference in New Issue
Block a user