class Rouge::Lexers::Javascript


be unhappy, and kittens will cry.
for a new language. It will not get merged, you will
Please do not copy this lexer and open a pull request
IMPORTANT NOTICE:

def self.builtins

def self.builtins
  @builtins ||= %w(
    Array Boolean Date Error Function Math netscape
    Number Object Packages RegExp String sun decodeURI
    decodeURIComponent encodeURI encodeURIComponent
    Error eval isFinite isNaN parseFloat parseInt
    document window navigator self global
    Promise Set Map WeakSet WeakMap Symbol Proxy Reflect
    Int8Array Uint8Array Uint8ClampedArray
    Int16Array Uint16Array Uint16ClampedArray
    Int32Array Uint32Array Uint32ClampedArray
    Float32Array Float64Array DataView ArrayBuffer
  )
end

def self.constants

def self.constants
  @constants ||= Set.new %w(true false null NaN Infinity undefined)
end

def self.declarations

def self.declarations
  @declarations ||= Set.new %w(
    var let const with function class
    extends constructor get set static
  )
end

def self.detect?(text)

def self.detect?(text)
  return 1 if text.shebang?('node')
  return 1 if text.shebang?('jsc')
  # TODO: rhino, spidermonkey, etc
end

def self.id_regex

def self.id_regex
  /[\p{L}\p{Nl}$_][\p{Word}]*/io
end

def self.keywords

def self.keywords
  @keywords ||= Set.new %w(
    as async await break case catch continue debugger default delete
    do else export finally from for if import in instanceof new of
    return super switch this throw try typeof void while yield
  )
end

def self.reserved

def self.reserved
  @reserved ||= Set.new %w(
    enum implements interface
    package private protected public
  )
end