예제 #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");
 }
예제 #2
0
 public ExpressionItem(Token token)
 {
     OriginalToken = token;
 }
예제 #3
0
 public Expression(Token bracketToken)
     : base(CheckToken(bracketToken))
 {
     Sequence = new List<ExpressionItem>();
     numFixities = Enum.GetNames(typeof(Fixity)).Length;
 }
예제 #4
0
파일: Parser.cs 프로젝트: LukaHorvat/Hype
 private bool IsOpenBracket(Token t)
 {
     if (t.Type == TokenType.Group) return OpenBrackets.Contains(t.Content[0]);
     return false;
 }