Regex: small error message improvement
This commit is contained in:
parent
c282b699d7
commit
7a313ddafe
|
@ -186,9 +186,11 @@ private:
|
|||
case '[':
|
||||
++m_pos;
|
||||
return character_class();
|
||||
default:
|
||||
if (contains("^$.*+?()[]{}|", cp))
|
||||
case '|': case ')':
|
||||
return nullptr;
|
||||
default:
|
||||
if (contains("^$.*+?[]{}", cp))
|
||||
parse_error(format("unexpected '{}'", cp));
|
||||
++m_pos;
|
||||
return new_node(ParsedRegex::Literal, cp);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user