Skip to content

Emitter name rewriting#3380

Merged
ahejlsberg merged 7 commits into
masterfrom
emitterNameRewriting
Jun 9, 2015
Merged

Emitter name rewriting#3380
ahejlsberg merged 7 commits into
masterfrom
emitterNameRewriting

Conversation

@ahejlsberg
Copy link
Copy Markdown
Member

Fixes #2595.

With this PR all block scoped entities (let, const, class, enum) are properly renamed when they shadow an outer name and we're generating pre-ES6 code. The PR also unifies the renaming logic with the similar logic we have for other generated names, and revises the interface between the emitter and the type checker such that callbacks don't have to be passed around.

Add EmitResolver.getReferencedExportContainer
Add EmitResolver.getReferencedImportDeclaration
Clean up getGeneratedNameForNode in emitter.ts
Switch isNotExpressionIdentifier to isExpressionIdentifier in emitter.ts
Revise emitExpressionIdentifier in emitter.ts
@ahejlsberg
Copy link
Copy Markdown
Member Author

@vladima @mhegazy @rbuckton Please take a look at this one.

@JsonFreeman
Copy link
Copy Markdown
Contributor

What's the relation between this PR and #2623?

@ahejlsberg
Copy link
Copy Markdown
Member Author

This supercedes #2623.

ahejlsberg added a commit that referenced this pull request Jun 9, 2015
@ahejlsberg ahejlsberg merged commit ce2d914 into master Jun 9, 2015
@ahejlsberg ahejlsberg deleted the emitterNameRewriting branch June 9, 2015 14:04
@vladima vladima mentioned this pull request Jun 12, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants