othree / es.next.syntax.vim

ES.Next syntax for Vim
MIT License
125 stars 7 forks source link

"static" keyword in other places #3

Closed mcchrish closed 6 years ago

mcchrish commented 8 years ago
import { static as staticFile } from 'statics'

var static = 'test'

let static = 'test2'

class testing {
  static test
}

Except for the static keyword inside the class, static is highlighted red.

This could be just a question, since I'm using a library that uses the word static as an identifier. Will javascript prevent static from being used as a variable name or identifier in the future? If so, then I guess it makes sense for this plugin to highlight it as red. Sort of like an extra linting capability of the syntax highlighting.

othree commented 6 years ago

Yes, it is in old JavaScript.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Future_reserved_keywords