-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull out object literal method separately so that constructor and new…
… syntax doesnt play into it. Fixes #361
- Loading branch information
1 parent
ea59fd1
commit 1e6da30
Showing
5 changed files
with
275 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
original file | ||
----------------------------------- | ||
const constructor = someObject.prototype.constructor; | ||
const objectLiteral = { constructor }; | ||
----------------------------------- | ||
|
||
Grammar: TypeScript.tmLanguage | ||
----------------------------------- | ||
>const constructor = someObject.prototype.constructor; | ||
^^^^^ | ||
source.ts meta.var.expr.ts storage.type.ts | ||
^ | ||
source.ts meta.var.expr.ts | ||
^^^^^^^^^^^ | ||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.readwrite.ts | ||
^ | ||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts | ||
^ | ||
source.ts meta.var.expr.ts keyword.operator.assignment.ts | ||
^ | ||
source.ts meta.var.expr.ts | ||
^^^^^^^^^^ | ||
source.ts meta.var.expr.ts support.class.ts | ||
^ | ||
source.ts meta.var.expr.ts punctuation.accessor.ts | ||
^^^^^^^^^ | ||
source.ts meta.var.expr.ts support.variable.property.ts | ||
^ | ||
source.ts meta.var.expr.ts punctuation.accessor.ts | ||
^^^^^^^^^^^ | ||
source.ts meta.var.expr.ts support.variable.property.ts | ||
^ | ||
source.ts punctuation.terminator.statement.ts | ||
^^ | ||
source.ts | ||
> const objectLiteral = { constructor }; | ||
^ | ||
source.ts | ||
^^^^^ | ||
source.ts meta.var.expr.ts storage.type.ts | ||
^ | ||
source.ts meta.var.expr.ts | ||
^^^^^^^^^^^^^ | ||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.readwrite.ts | ||
^ | ||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts | ||
^ | ||
source.ts meta.var.expr.ts keyword.operator.assignment.ts | ||
^ | ||
source.ts meta.var.expr.ts | ||
^ | ||
source.ts meta.var.expr.ts meta.objectliteral.ts punctuation.definition.block.ts | ||
^ | ||
source.ts meta.var.expr.ts meta.objectliteral.ts | ||
^^^^^^^^^^^ | ||
source.ts meta.var.expr.ts meta.objectliteral.ts meta.object.member.ts variable.other.readwrite.ts | ||
^ | ||
source.ts meta.var.expr.ts meta.objectliteral.ts meta.object.member.ts | ||
^ | ||
source.ts meta.var.expr.ts meta.objectliteral.ts punctuation.definition.block.ts | ||
^ | ||
source.ts punctuation.terminator.statement.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const constructor = someObject.prototype.constructor; | ||
const objectLiteral = { constructor }; |