Skip to content

Commit

Permalink
Integrated upstream changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Smith authored and Thomas Smith committed Dec 21, 2018
1 parent 361867a commit 25eef05
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions src/JavaScript.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@ contexts:
main:
- include: comments
- include: comments-top-level
- include: statements

- match: '\)|\}|\]'
scope: invalid.illegal.stray-bracket-end.js
# Don't pop or embedding could break.

- match: (?=\S)
push: statement

prototype:
- include: comments
Expand Down Expand Up @@ -1811,20 +1817,6 @@ contexts:
- match: (?={{identifier}}\s*\()
set: call-function-name

- match: '(?={{identifier}}\s*[\[.])'
set:
- match: '{{dollar_only_identifier}}'
scope: variable.other.object.dollar.only.js punctuation.dollar.js
pop: true
- match: '{{dollar_identifier}}'
scope: variable.other.object.dollar.js
captures:
1: punctuation.dollar.js
pop: true
- match: '{{identifier}}'
scope: variable.other.object.js
pop: true

- include: literal-variable-base

literal-variable-base:
Expand Down Expand Up @@ -1858,6 +1850,9 @@ contexts:
- match: this{{identifier_break}}
scope: variable.language.this.js
pop: true
- match: globalThis{{identifier_break}}
scope: variable.language.global.js
pop: true

# These three are ordinary variables, not literals!
- match: undefined{{identifier_break}}
Expand Down Expand Up @@ -2031,7 +2026,17 @@ contexts:
- include: else-pop
- include: else-pop

- match: (?:Float(?:32|64)|Int(?:8|16|32)|Uint(?:8|16|32|32Clamped))Array{{identifier_break}}
- match: |-
(?x:
(?:
BigInt64|
BigUint64|
Float(?:32|64)|
Int(?:8|16|32)|
Uint(?:8|16|32|32Clamped)
)
Array{{identifier_break}}
)
scope: support.class.builtin.js
set:
- match: \.
Expand Down

0 comments on commit 25eef05

Please sign in to comment.