Skip to content

Shebang#4120

Merged
mhegazy merged 5 commits into
microsoft:masterfrom
basarat:feat/shebang
Aug 4, 2015
Merged

Shebang#4120
mhegazy merged 5 commits into
microsoft:masterfrom
basarat:feat/shebang

Conversation

@basarat

@basarat basarat commented Aug 2, 2015

Copy link
Copy Markdown
Contributor

Closes #2749

Appreciate a review by @CyrusNajmabadi : Emit ended up as a strategic call similar to detached comments

Also wrote : http://basarat.gitbooks.io/typescript/content/docs/compiler/contributing.html since I was in the area 🌹

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, does node ignore shebangs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests where the # isn't on the first position. Thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 🌹

@CyrusNajmabadi

Copy link
Copy Markdown
Contributor

Looks pretty good to me. With a couple of changes this should be good to go in. I'd like @ahejlsberg to weigh in if we want to go ahead with them.

My only concern is how this affects our ability to do something like add support for #pp-directives in the future. Or maybe that wouldn't be a problem as we'd still just detect #! as a special directive.

@basarat

basarat commented Aug 3, 2015

Copy link
Copy Markdown
Contributor Author

Done:

  • add tests where the #! isn't on the first position
  • CR based cleanup

Comment thread src/compiler/scanner.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too much indent.

@CyrusNajmabadi

Copy link
Copy Markdown
Contributor

@mhegazy You ok with this?

Comment thread src/compiler/scanner.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const?

@basarat

basarat commented Aug 3, 2015

Copy link
Copy Markdown
Contributor Author

Done (as an amendment on the CR commit):

  • const for regex
  • further cleanup on code indentation

@mhegazy

mhegazy commented Aug 4, 2015

Copy link
Copy Markdown
Contributor

thanks!

mhegazy added a commit that referenced this pull request Aug 4, 2015
@mhegazy mhegazy merged commit d855f47 into microsoft:master Aug 4, 2015
@basarat basarat deleted the feat/shebang branch August 4, 2015 21:43
@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.

4 participants