예제 #1
0
        public override void EnterNamespace([NotNull] CSharpParser.NamespaceContext context)
        {
            string    name = context.qualified_identifier().GetText();
            TreeScope node = currentNode.AddChild(name, "namespace");

            if (node != null)
            {
                this.currentNode = node;
            }
            base.EnterNamespace(context);
        }
예제 #2
0
 public override void ExitNamespace([NotNull] CSharpParser.NamespaceContext context)
 {
     this.currentNode = this.currentNode.Parent;
     base.ExitNamespace(context);
 }
예제 #3
0
 public override object VisitNamespace([NotNull] CSharpParser.NamespaceContext context) => AddNode(context, new Dictionary <string, object>
 {
     ["Type"] = "Namespace",
     ["Name"] = context.Name,
 });
예제 #4
0
 public override object VisitNamespace([NotNull] CSharpParser.NamespaceContext context)
 {
     NamespaceName.Add(context.qualified_identifier().GetText());
     return(base.VisitNamespace(context));
 }