Renamed type to avoid exporting

master
Aadhavan Srinivasan 3 days ago
parent 289bba35e2
commit af5b6ebe08

@ -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

Loading…
Cancel
Save