private static Token CheckToken(Token token) { if (token.Type == TokenType.Group) return token; throw new Exception("You must provide a group token to create a new expression"); }
public ExpressionItem(Token token) { OriginalToken = token; }
public Expression(Token bracketToken) : base(CheckToken(bracketToken)) { Sequence = new List<ExpressionItem>(); numFixities = Enum.GetNames(typeof(Fixity)).Length; }
private bool IsOpenBracket(Token t) { if (t.Type == TokenType.Group) return OpenBrackets.Contains(t.Content[0]); return false; }