class Mint::Compiler::Js
  
  - Mint::Compiler::Js
- Reference
- Object
Overview
This class is resposible for creating a tree of JS code.
Defined in:
compiler/js.crConstructors
Class Method Summary
Instance Method Summary
- 
        #array(items : Array(Compiled)) : Compiled
        
          Renders an array. 
- 
        #arrow_function(arguments : Array(Compiled) = [] of Compiled, &) : Compiled
        
          Renders an arrow function. 
- 
        #assign(name : Item | Compiled, value : Compiled) : Compiled
        
          Renders an assignment. 
- 
        #call(name : Item | Compiled, arguments : Array(Compiled)) : Compiled
        
          Renders a call. 
- 
        #const(name : Item | Compiled, value : Compiled) : Compiled
        
          Renders a const assignment. 
- 
        #consts(items : Array(Tuple(Ast::Node, Id, Compiled))) : Compiled
        
          Renders multiple const assignments (as one). 
- 
        #for(variables : Compiled, subject : Compiled, &) : Compiled
        
          Renders a for statement. 
- 
        #if(condition : Compiled, body : Compiled) : Compiled
        
          Renders an if statement. 
- 
        #iif(&) : Compiled
        
          Renders an immediately invoked function. 
- 
        #let(name : Item | Compiled, value : Compiled) : Compiled
        
          Renders a let assignment. 
- 
        #let(variables : Array(Variable)) : Compiled
        
          Renders a let assignment with multiple variables. 
- 
        #new(name : Item | Compiled, items : Array(Compiled) = [] of Compiled) : Compiled
        
          Renders an initializer. 
- 
        #null : Compiled
        
          Renders #null.
- 
        #object(items : Hash(Item, Compiled)) : Compiled
        
          Renders an object. 
- 
        #object_destructuring(items : Array(Compiled)) : Compiled
        
          Renders an object destructuring. 
- 
        #optimize? : Bool
        
          Whether or not to optimize the output. 
- 
        #return(item : Compiled) : Compiled
        
          Renders a return statement. 
- 
        #statements(items : Array(Compiled)) : Compiled
        
          Renders statements. 
- 
        #string(value : String) : Compiled
        
          Renders a string using a template literal (``). 
- 
        #tenary(condition : Compiled, truthy : Compiled, falsy : Compiled) : Compiled
        
          Renders an tenary operator. 
Constructor Detail
Class Method Detail
Instance Method Detail
Renders an arrow function.
Renders an assignment.
Renders a call.
Renders a const assignment.
Renders multiple const assignments (as one).
Renders a for statement.
Renders a let assignment.
Renders a let assignment with multiple variables.
Renders an initializer.
Renders an object. The key can be any item but it's usually a string or an identifier.
Renders an object destructuring.
Renders a string using a template literal (``).
TODO Check if a simple string is enough?