public Token ParseToken(ITokenSet tokenSet) { if (CanParseToken(tokenSet)) { return(Token); } throw new ParseException("Expected " + tokenSet.Name + " but found " + Token.Type, Location); }
public Token ParseToken(ITokenSet tokenSet) { throw new ParseException("Expected " + tokenSet.Name + " but found end of file", Location); }
public bool CanParseToken(ITokenSet tokenSet) { return false; }
public Token ParseToken(ITokenSet tokenSet) { if(CanParseToken(tokenSet)) return Token; throw new ParseException("Expected " + tokenSet.Name + " but found " + Token.Type, Location); }
public bool CanParseToken(ITokenSet tokenSet) { return tokenSet.Contains(Token.Type); }
public void AddToken(ITokenSet tokenSet) { _alternates.Add(new TokenSetAlternate(tokenSet)); }
public TokenSetAlternate(ITokenSet tokenSet) { _tokenSet = tokenSet; }
public bool CanParseToken(ITokenSet tokenSet) { return(false); }
public bool CanParseToken(ITokenSet tokenSet) { return(tokenSet.Contains(Token.Type)); }
/// <summary> /// Returns true if the given <paramref name="transferPermissionTokenSet"/> is non-null and it contains the given key (token) /// </summary> public static bool GetIsTransferPermitted(this ITokenSet <string> transferPermissionTokenSet, string key) { return(transferPermissionTokenSet.SafeContains(key)); }