コード例 #1
0
 public static LNode Namespace(LNode node, IMacroContext context)
 {
     if (node.ArgCount == 2 && !node.Args.Last.Calls(S.Braces))
     {
         context.DropRemainingNodes = true;
         node = node.PlusArg(F.Braces(context.RemainingNodes).PlusAttr(F.TriviaNewline));
         // avoid artifact: `namespace Xyz` tends to be on one line, but we don't want the output to be.
         return(node.SetStyle(node.Style & ~NodeStyle.OneLiner));
     }
     return(null);
 }
コード例 #2
0
ファイル: StandardMacros.cs プロジェクト: qwertie/ecsharp
		public static LNode Namespace(LNode node, IMacroContext context)
		{
			if (node.ArgCount == 2 && !node.Args.Last.Calls(S.Braces))
			{
				context.DropRemainingNodes = true;
				node = node.PlusArg(F.Braces(context.RemainingNodes).PlusAttr(F.TriviaNewline));
				// avoid artifact: `namespace Xyz` tends to be on one line, but we don't want the output to be.
				return node.SetStyle(node.Style & ~NodeStyle.OneLiner);
			}
			return null;
		}