// cannot override OnNamespaceDeclaration - it's visited too late (after the type definitions) void HandleNamespaceDeclaration(AST.NamespaceDeclaration node) { if (node == null) { return; } string[] namespaceName = node.Name.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries); foreach (string namePart in namespaceName) { _cu.UsingScope = new DefaultUsingScope { NamespaceName = PrependCurrentNamespace(namePart), Parent = _cu.UsingScope }; } }
public override void OnNamespaceDeclaration(NamespaceDeclaration node) { CheckName(node,node.Name); }
protected void namespace_directive( Module container ) //throws RecognitionException, TokenStreamException { IToken t = null; IToken id; NamespaceDeclaration p = null; try { // for error handling t = LT(1); match(NAMESPACE); id=identifier(); if (0==inputState.guessing) { p = new NamespaceDeclaration(ToLexicalInfo(t)); p.Name = id.getText(); container.Namespace = p; } eos(); docstring(p); } catch (RecognitionException ex) { if (0 == inputState.guessing) { reportError(ex, "namespace_directive"); recover(ex,tokenSet_12_); } else { throw ex; } } }
public override void OnNamespaceDeclaration(NamespaceDeclaration node) { base.OnNamespaceDeclaration(node); }
override public object Clone() { NamespaceDeclaration clone = new NamespaceDeclaration(); clone._lexicalInfo = _lexicalInfo; clone._endSourceLocation = _endSourceLocation; clone._documentation = _documentation; clone._isSynthetic = _isSynthetic; clone._entity = _entity; if (_annotations != null) clone._annotations = (Hashtable)_annotations.Clone(); clone._name = _name; return clone; }
public override void OnNamespaceDeclaration(NamespaceDeclaration node) { _namespace = new CodeNamespace(node.Name); _compileUnit.Namespaces.Add(_namespace); }
public override void OnNamespaceDeclaration(NamespaceDeclaration node) { WriteKeyword("namespace"); WriteLine(" {0}", node.Name); WriteLine(); }