if!firstCharAdded&&re_postfix[i]>0xF0000{// It's a metacharacter that I defined, I'll have to convert it back to the regular character before adding it back, because I haven't added any characters yet. For example, '[[]', the second LBRACKET should be treated like a literal bracket.
switchre_postfix[i]{
caseLBRACKET:
chars=append(chars,newPostfixCharNode('['))
caseRBRACKET:
chars=append(chars,newPostfixCharNode(']'))
default:
returnnil,fmt.Errorf("Error parsing high-range unicode value in character class.")
ifendOfRange{// The previous character was an unescaped hyphen, which (in the context of a character class) means the character that was last appended is the end of a character range