Example #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);
        }
Example #2
0
 public override void ExitNamespace([NotNull] CSharpParser.NamespaceContext context)
 {
     this.currentNode = this.currentNode.Parent;
     base.ExitNamespace(context);
 }
Example #3
0
 public override object VisitNamespace([NotNull] CSharpParser.NamespaceContext context) => AddNode(context, new Dictionary <string, object>
 {
     ["Type"] = "Namespace",
     ["Name"] = context.Name,
 });
 public override object VisitNamespace([NotNull] CSharpParser.NamespaceContext context)
 {
     NamespaceName.Add(context.qualified_identifier().GetText());
     return(base.VisitNamespace(context));
 }