public override object Visit (CheckedExpr checkedExpression) { var result = new CheckedExpression (); var location = LocationsBag.GetLocations (checkedExpression); result.AddChild (new CSharpTokenNode (Convert (checkedExpression.Location), "checked".Length), TypeOfExpression.Roles.Keyword); if (location != null) result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), TypeOfExpression.Roles.LPar); result.AddChild ((INode)checkedExpression.Expr.Accept (this), TypeOfExpression.Roles.Expression); if (location != null) result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), TypeOfExpression.Roles.RPar); return result; }
public override object Visit(CheckedExpr checkedExpression) { var result = new CheckedExpression(); var location = LocationsBag.GetLocations(checkedExpression); result.AddChild(new CSharpTokenNode(Convert(checkedExpression.Location), CheckedExpression.CheckedKeywordRole), CheckedExpression.CheckedKeywordRole); if (location != null) result.AddChild(new CSharpTokenNode(Convert(location [0]), Roles.LPar), Roles.LPar); if (checkedExpression.Expr != null) result.AddChild((Expression)checkedExpression.Expr.Accept(this), Roles.Expression); if (location != null && location.Count > 1) result.AddChild(new CSharpTokenNode(Convert(location [1]), Roles.RPar), Roles.RPar); return result; }