Beispiel #1
0
 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");
 }
Beispiel #2
0
 public ExpressionItem(Token token)
 {
     OriginalToken = token;
 }
Beispiel #3
0
 public Expression(Token bracketToken)
     : base(CheckToken(bracketToken))
 {
     Sequence = new List<ExpressionItem>();
     numFixities = Enum.GetNames(typeof(Fixity)).Length;
 }
Beispiel #4
0
 private bool IsOpenBracket(Token t)
 {
     if (t.Type == TokenType.Group) return OpenBrackets.Contains(t.Content[0]);
     return false;
 }