private bool IsArrayType(TokenPredictor predictor) { return(predictor .Expect(IsNotArrayType) .Expect(TokenTag.OPEN_SQUARE_BRACE) .Result); }
private bool IsIdentifierList(TokenPredictor predictor) { return(predictor .Expect(TokenTag.ID) .Skip(TokenTag.ID, TokenTag.DOT) .Result); }
private bool IsNotArrayType(TokenPredictor predictor) { // todo: implement checking for general type names var snapshot = new TokenPredictor(predictor); if (predictor.Expect(IsPrimitiveType).Result) { return(true); } return(false); }
public TokenPredictor Restore(TokenPredictor predictor) { _shift = predictor._shift; Result = predictor.Result; return(this); }
public TokenPredictor(TokenPredictor predictor) { _enumerator = predictor._enumerator; _shift = predictor._shift; Result = true; }