protected override void VisitExportNamedDeclaration(ExportNamedDeclaration exportNamedDeclaration) { using (StartNodeObject(exportNamedDeclaration)) { Member("declaration", exportNamedDeclaration.Declaration.As <INode>()); Member("specifiers", exportNamedDeclaration.Specifiers); Member("source", exportNamedDeclaration.Source); } }
private void ExtractExports(ModuleData module, ExportNamedDeclaration namedDeclaration) { // export var { a: alias, b } = { a: 0, b: 1 }; if (namedDeclaration.Declaration != null) { ExtractExports(module, namedDeclaration.Declaration); } // export { a as alias }; else { ExtractExports(module, namedDeclaration.Specifiers); } }
protected override void VisitExportNamedDeclaration(ExportNamedDeclaration exportNamedDeclaration) { if (exportNamedDeclaration.Source != null) { _substitutions.Add(exportNamedDeclaration.Range, StringSegment.Empty); } else if (exportNamedDeclaration.Declaration != null) { _substitutions.Add(exportNamedDeclaration.Range, GetContentSegment(_module.Content, exportNamedDeclaration.Declaration.Range)); } else { _substitutions.Add(exportNamedDeclaration.Range, StringSegment.Empty); } }
private TypeDeclaration VisitExportNamedDeclaration(ExportNamedDeclaration exportNamedDeclaration) { var decl = exportNamedDeclaration.Declaration != null ? VisitStatementListItem(exportNamedDeclaration.Declaration) : null; foreach (ExportSpecifier exportSpecifier in exportNamedDeclaration.Specifiers) { VisitExportSpecifier(exportSpecifier); } Token source = exportNamedDeclaration.Source != null ? VisitLiteral(exportNamedDeclaration.Source) : null; Logger.LogDebug($"{nameof(ExportNamedDeclaration)} processing is not implemented"); // TODO return(decl is TypeDeclaration typeDeclaration ? typeDeclaration : null); }
public virtual void VisitExportNamedDeclaration(ExportNamedDeclaration exportNamedDeclaration) { }
protected virtual void VisitExportNamedDeclaration(ExportNamedDeclaration exportNamedDeclaration) { }
protected internal override void VisitExportNamedDeclaration(ExportNamedDeclaration exportNamedDeclaration) { VisitingExportNamedDeclaration?.Invoke(this, exportNamedDeclaration); base.VisitExportNamedDeclaration(exportNamedDeclaration); VisitedExportNamedDeclaration?.Invoke(this, exportNamedDeclaration); }