예제 #1
0
 protected internal Case(NRefactory.CaseLabel caseLabel, IScope scope, INRefcatoryExpressionVisitor visitor)
     : base(scope, visitor)
 {
     _caseLabel   = caseLabel;
     TestValue    = caseLabel.Expression.AcceptVisitor(Visitor, scope);
     InternalType = TestValue.Type;
 }
 protected internal CaseLabel(NRefactory.CaseLabel caseLabel, IScope scope, INRefcatoryExpressionVisitor visitor)
     : base(scope, visitor) {
     var expression = caseLabel.Expression;
     _caseLabel = caseLabel;
     DefaultValue = expression.AcceptVisitor(Visitor, ParentScope);
     InternalType = DefaultValue.Type;
 }
예제 #3
0
        protected internal CaseLabel(NRefactory.CaseLabel caseLabel, IScope scope, INRefcatoryExpressionVisitor visitor)
            : base(scope, visitor)
        {
            var expression = caseLabel.Expression;

            _caseLabel   = caseLabel;
            DefaultValue = expression.AcceptVisitor(Visitor, ParentScope);
            InternalType = DefaultValue.Type;
        }
예제 #4
0
        S IAstVisitor <T, S> .VisitCaseLabel(CaseLabel caseLabel, T data)
        {
            var handler = CaseLabelVisited;

            if (handler != null)
            {
                handler(caseLabel, data);
            }
            return(VisitChildren(caseLabel, data));
        }
예제 #5
0
 void IAstVisitor.VisitCaseLabel(CaseLabel caseLabel)
 {
     Visit(EnterCaseLabel, LeaveCaseLabel, caseLabel);
 }
예제 #6
0
 public virtual S VisitCaseLabel(CaseLabel caseLabel, T data)
 {
     return(VisitChildren(caseLabel, data));
 }
        protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
        {
            CaseLabel o = other as CaseLabel;

            return(o != null && this.Expression.DoMatch(o.Expression, match));
        }
예제 #8
0
 public override void VisitCaseLabel(CaseLabel caseLabel)
 {
     ForceSpacesBefore(caseLabel.ColonToken, false);
 }
예제 #9
0
 public override void VisitCaseLabel(CaseLabel caseLabel)
 {
     FixSemicolon(caseLabel.ColonToken);
 }
예제 #10
0
 protected internal Case(NRefactory.CaseLabel caseLabel, IScope scope, INRefcatoryExpressionVisitor visitor)
     : base(scope, visitor) {
     _caseLabel = caseLabel;
     TestValue = caseLabel.Expression.AcceptVisitor(Visitor, scope);
     InternalType = TestValue.Type;
 }
 public static Case SwitchCase(NRefactory.CaseLabel caseLabel, IScope scope, INRefcatoryExpressionVisitor visitor)
 {
     return(new Case(caseLabel, scope, visitor));
 }
 public virtual S VisitCaseLabel(CaseLabel caseLabel, T data)
 {
     throw new NotImplementedException();
 }
예제 #13
0
 public override AstExpression VisitCaseLabel(NRefactory.CaseLabel caseLabel, IScope scope)
 {
     return(AstExpression.SwitchCase(caseLabel, scope, this));
 }