public override void VisitReturnStatement(ReturnStatementSyntax node) { if (debug) { Console.WriteLine(node.ToFullString()); } var nl = OurLine.NewLine(LineKind.Decl, "ReturnStatement"); nl.Source = node.ToFullString(); // System.Console.WriteLine(node.Expression); if (node.Expression != null) { OurLine.AddEssentialInfo(ref nl, "expression:" + node.Expression.ToString()); } nl.ParentKind = node.Parent.RawKind; nl.RawKind = node.RawKind; LogCommand(nl); base.VisitReturnStatement(node); }
private static string For(ReturnStatementSyntax @return) { @return = @return.WithoutLeadingTrivia(); return($"{@return.ToFullString()}".Trim()); }