class Noir::Lexers::JavaScript
- Noir::Lexers::JavaScript
- Noir::Lexer
- Reference
- Object
Defined in:
noir/lexers/javascript.crConstant Summary
- 
        BUILTINS = Set.new(["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"] of ::String)
- 
        CONSTANTS = Set.new(["true", "false", "null", "NaN", "Infinity", "undefined"] of ::String)
- 
        DECLARATIONS = Set.new(["var", "let", "const", "with", "function", "class", "extends", "constructor", "get", "set"] of ::String)
- 
        ID_REGEX = /[a-z_$][a-z0-9_$]*/i
- 
        KEYWORDS = Set.new(["for", "in", "of", "while", "do", "break", "return", "continue", "switch", "case", "default", "if", "else", "throw", "try", "catch", "finally", "new", "delete", "typeof", "instanceof", "void", "this", "yield", "import", "export", "from", "as", "async", "super"] of ::String)
- 
        RESERVED = Set.new(["abstract", "boolean", "byte", "char", "debugger", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile", "eval", "arguments", "await"] of ::String)
Instance methods inherited from class Noir::Lexer
  
  
    
      current_state
    current_state, 
    
  
    
      lex_all(input : String, output : Formatter)
    lex_all, 
    
  
    
      stack : Deque(Noir::Lexer::State)
    stack, 
    
  
    
      state(name)
    state
    
  
    
  Constructor methods inherited from class Noir::Lexer
  
  
    
      new
    new
    
  
    
  Class methods inherited from class Noir::Lexer
  
  
    
      aliases(aliases : Array(String))aliases aliases, append(name, &) append, filenames(filenames : Array(String))
filenames filenames, mimetypes(mimetypes : Array(String))
mimetypes mimetypes, prepend(name, &) prepend, state(name : Symbol)
state(name : Symbol, &) state, tag(tag : String)
tag : String tag, tag? : String | Nil tag?