GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Lexical classification for template strings by DanielRosenwasser · Pull Request #1744 · microsoft/TypeScript

Conversation

@DanielRosenwasser

@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) commented Jan 20, 2015

Copy link
Copy Markdown
Member

This PR adds lexical classification support for template strings in the absence of a syntactic classifier.

It will break in the presence of

  • Nested template strings that span multiple lines.
  • Nested expressions composed of curly braces, where the closing curly falls on the next line.

But otherwise it is a fairly good approximation.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Daniel Rosenwasser (DanielRosenwasser) added 2 commits January 20, 2015 12:52
@DanielRosenwasser
Rudimentary, but imperfect, lexical classification for templates.
7bd35f7
@DanielRosenwasser
Fixed issue with the kinds we check.
796eeb5
CyrusNajmabadi
CyrusNajmabadi reviewed Jan 22, 2015
View reviewed changes
Comment thread src/services/services.ts Outdated

@CyrusNajmabadi Cyrus Najmabadi (CyrusNajmabadi) Jan 22, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

just initialie this to []

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mhegazy Mohamed Hegazy (mhegazy) Jan 22, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

i think one stack is sufficient. just make sure to clear it every call.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Daniel Rosenwasser (DanielRosenwasser) added 5 commits January 26, 2015 12:06
@DanielRosenwasser
Addressed CR feedback.
a6e94fd
@DanielRosenwasser
classifyKeywordsInGenerics -> syntacticClassifierAbsent
a7f35c5
@DanielRosenwasser
Added tests, fixed order of emptying templateStack, unconditionally p…
570a36b
…erform template classification.
@DanielRosenwasser
Fixed assertion
c470fcd
@DanielRosenwasser
Added comment for 'syntacticClassifierAbsent'.
31b0f66
@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) mentioned this pull request Feb 2, 2015
Template string aren't recognized by classifier #1884
Closed
@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented Feb 2, 2015

Copy link
Copy Markdown
Member Author

Mohamed Hegazy (@mhegazy) Cyrus Najmabadi (@CyrusNajmabadi) what are we thinking about this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) mentioned this pull request Feb 11, 2015
Would be great if multiline strings were categorized differently #2005
Closed
@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented Feb 12, 2015

Copy link
Copy Markdown
Member Author

It may be too late in our schedule to accept this change for 1.4.2.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) closed this Feb 12, 2015
@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) mentioned this pull request Feb 13, 2015
Lexical colorization/classification for template strings. #2026
Merged
@CyrusNajmabadi
Cyrus Najmabadi (CyrusNajmabadi) deleted the lexicalTemplateStrings branch June 4, 2015 00:16
@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@DanielRosenwasser @CyrusNajmabadi @mhegazy
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.