public static BracketPairType FromChar(char @char)
{
if (@char == '(' || @char == ')') return Round;
if (@char == '[' || @char == ']') return Square;
if (@char == '{' || @char == '}') return Curly;
throw new ArgumentException("Invalid character, cannot resolve to bracket type.", "char");
}