class Mint::Compiler2::Js
- Mint::Compiler2::Js
- Reference
- Object
Overview
This class is resposible for creating a tree of JS code
Defined in:
compiler2/js.crConstructors
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.
-
#async_arrow_function(arguments : Array(Compiled) = [] of Compiled, &) : Compiled
Renders an async arrow function.
-
#asynciif(&) : Compiled
Renders an async immediately invoked function.
-
#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 async 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
-
#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
-
#tenary(condition : Compiled, truthy : Compiled, falsy : Compiled)
Renders an tenary operator.
Constructor Detail
Instance Method Detail
Renders an arrow function.
Renders an assignment.
Renders an async arrow function.
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 an tenary operator.