Ejemplo n.º 1
0
 protected List <Token> GetMethodSignatureTokens(List <Token> tokens, PatternMatchResult methodMatch)
 {
     if (methodMatch.MatchesCount > 1)
     {
         var methodIdMatch   = methodMatch.GetMatch(0);
         var methodArgsMatch = methodMatch.GetMatch(1);
         var methodSignature = TokenUtils.GetMatchResultTokens(tokens, methodIdMatch);
         methodSignature.AddRange(TokenUtils.GetMatchResultTokens(tokens, methodArgsMatch));
         return(methodSignature);
     }
     throw new ParseException(tokens, methodMatch.Start);
 }
Ejemplo n.º 2
0
 protected List <Token> GetMethodBlockTokens(List <Token> tokens, PatternMatchResult methodMatch)
 {
     if (methodMatch.MatchesCount > 2)
     {
         var methodBlockMatch  = methodMatch.GetMatch(2);
         var methodBlockTokens = TokenUtils.GetMatchResultBlockTokens(tokens, methodBlockMatch);
         return(methodBlockTokens);
     }
     throw new ParseException(tokens, methodMatch.Start);
 }