示例#1
0
 public OperationMetaData <IN> GetOperation(IN token = default(IN))
 {
     if (IsExpressionRule)
     {
         OperationMetaData <IN> operation = VisitorMethodsForOperation.ContainsKey(token) ? VisitorMethodsForOperation[token] : null;
         return(operation);
     }
     return(null);
 }
示例#2
0
        public MethodInfo GetVisitor(IN token = default(IN))
        {
            MethodInfo visitor = null;

            if (IsExpressionRule)
            {
                OperationMetaData <IN> operation = VisitorMethodsForOperation.ContainsKey(token) ? VisitorMethodsForOperation[token] : null;
                visitor = operation?.VisitorMethod;
            }
            else
            {
                visitor = Visitor;
            }
            return(visitor);
        }
示例#3
0
 public void SetVisitor(OperationMetaData <IN> operation)
 {
     VisitorMethodsForOperation[operation.OperatorToken] = operation;
 }