diff --git a/postfixNode.go b/postfixNode.go index 3aea8b8..78fbc5b 100644 --- a/postfixNode.go +++ b/postfixNode.go @@ -26,7 +26,8 @@ type postfixNode struct { contents []rune // Contents of the node - the length of this would only be >1 if the node represents a character class 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 - isDot bool // Whether or not the current node represents a 'dot' metacharacter + allChars bool // Whether or not the current node represents all characters (eg. dot metacharacter) + except []rune // For inverted character classes, we match every unicode character _except_ a few. In this case, allChars is true and the exceptions are placed here. } // Creates a new escaped node - the given character is assumed to have been preceded by a backslash @@ -115,7 +116,7 @@ func newPostfixDotNode() postfixNode { toReturn.startReps = 1 toReturn.endReps = 1 toReturn.nodetype = CHARACTER - toReturn.isDot = true + toReturn.allChars = true toReturn.contents = []rune{ANY_CHAR} return toReturn }