public JoopToken(JoopTokenType tokenType, string content, int index) : this() { Type = tokenType; Content = content; Index = index; }
protected bool Expect(JoopTokenType type) { string errorMessage = string.Format("Unexpected token of type {0}. Expecting {1}.", CurrentToken.Type, type); return(Expect(token => token.Type == type, errorMessage)); }
protected bool Accept(JoopTokenType type) { return(Accept(token => token.Type == type)); }