private void parseElement(XElement element, AstNode astNode, XmlIRDocumentType docType) { this._ScopeManager.Push(astNode); ParseAttributes(element, astNode, docType); ParseChildElements(element, astNode, docType); this._ScopeManager.Pop(); AstNamedNode astNamedNode = astNode as AstNamedNode; if (astNode is IPackageRootNode) { switch (docType) { case XmlIRDocumentType.SOURCE: ((IPackageRootNode)astNode).Emit = true; break; case XmlIRDocumentType.INCLUDE: ((IPackageRootNode)astNode).Emit = false; break; default: throw new NotImplementedException(String.Format(Properties.Resources.ErrorUnknownDocType, docType.ToString())); } } if (astNamedNode != null && astNamedNode.Name != null) { // Guaranteed to work since all sub-dictionaries were initialized in PreLoadPropertyMappingsAndGlobalDictionary() this._GlobalASTNamedNodeDictionary[astNamedNode.GetType()][_ScopeManager.GetScopedName(astNamedNode.Name)] = astNamedNode; } }
public NewBindingItem(XmlIRDocumentType docType, XObject XObject, string XValue, AstNamedNode ParentASTNode, AstParserScopeManager scopeManager) { this.docType = docType; this.XObject = XObject; this.XValue = XValue; this.node = ParentASTNode; this.ScopeManager = scopeManager; }
private string StackStringBuilder(Stack <AstNode> queue) { StringBuilder sb = new StringBuilder(); bool first = true; foreach (AstNode astNode in _ScopeTracker) { AstNamedNode astNamedNode = astNode as AstNamedNode; if (astNamedNode != null) { sb.Append(astNamedNode.Name); if (first) { first = false; } else { sb.Append("."); } } } return(sb.ToString()); }
protected Executable(string name, AstNamedNode astNamedNode) : this(name) { AstNamedNode = astNamedNode; }
protected Executable(AstNamedNode astNamedNode) : this(astNamedNode.Name, astNamedNode) { }