Package com.google.javascript.rhino
Class IR
- java.lang.Object
-
- com.google.javascript.rhino.IR
-
public class IR extends java.lang.Object
An AST construction helper class
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Node
add(Node expr1, Node expr2)
static Node
and(Node expr1, Node expr2)
static Node
arraylit(Node... exprs)
static Node
arraylit(java.lang.Iterable<Node> exprs)
static Node
arrayPattern(Node... keys)
static Node
arrowFunction(Node name, Node params, Node body)
static Node
assign(Node target, Node expr)
static Node
assignAnd(Node expr1, Node expr2)
"&&="static Node
assignCoalesce(Node expr1, Node expr2)
"??="static Node
assignOr(Node expr1, Node expr2)
"||="static Node
await(Node expr)
static Node
bigint(java.math.BigInteger b)
static Node
block()
static Node
block(Node stmt)
static Node
block(Node... stmts)
static Node
block(java.util.List<Node> stmts)
static Node
breakNode()
static Node
breakNode(Node name)
static Node
call(Node target, Node... args)
static Node
caseNode(Node expr, Node body)
static Node
cast(Node expr1, JSDocInfo jsdoc)
static Node
catchNode(Node expr, Node body)
static Node
coalesce(Node expr1, Node expr2)
static Node
comma(Node expr1, Node expr2)
static Node
computedProp(Node key, Node value)
static Node
constNode(Node lhs, Node value)
static Node
continueNode()
static Node
continueNode(Node name)
static Node
continueOptChainCall(Node target, Node... args)
static Node
continueOptChainGetelem(Node target, Node elem)
static Node
continueOptChainGetprop(Node target, java.lang.String prop)
static Node
dec(Node exp, boolean isPost)
static Node
declaration(Node lhs, Node value, Token type)
static Node
declaration(Node lhs, Token type)
static Node
defaultCase(Node body)
static Node
delprop(Node target)
static Node
doNode(Node body, Node cond)
static Node
empty()
static Node
eq(Node expr1, Node expr2)
"=="static Node
export(Node declaration)
static Node
exprResult(Node expr)
static Node
falseNode()
static Node
forIn(Node target, Node cond, Node body)
static Node
forNode(Node init, Node cond, Node incr, Node body)
static Node
function(Node name, Node params, Node body)
static Node
ge(Node expr1, Node expr2)
">="static Node
getelem(Node target, Node elem)
static Node
getprop(Node target, java.lang.String prop)
static Node
getprop(Node target, java.lang.String prop, java.lang.String... moreProps)
static Node
getterDef(java.lang.String name, Node value)
static Node
hook(Node cond, Node trueval, Node falseval)
static Node
ifNode(Node cond, Node then)
static Node
ifNode(Node cond, Node then, Node elseNode)
static Node
importMeta()
static Node
importNode(Node name, Node importSpecs, Node moduleIdentifier)
static Node
importStar(java.lang.String name)
static Node
in(Node expr1, Node expr2)
static Node
inc(Node exp, boolean isPost)
static Node
iterRest(Node target)
static Node
iterSpread(Node expr)
static Node
label(Node name, Node stmt)
static Node
labelName(java.lang.String name)
static Node
let(Node lhs)
static Node
let(Node lhs, Node value)
static Node
lt(Node expr1, Node expr2)
"<"static boolean
mayBeExpression(Node n)
It isn't possible to always determine if a detached node is a expression, so make a best guess.static boolean
mayBeStatement(Node n)
It isn't possible to always determine if a detached node is a expression, so make a best guess.static Node
memberFieldDef(java.lang.String name, Node value)
static Node
memberFunctionDef(java.lang.String name, Node function)
static Node
name(java.lang.String name)
static Node
ne(Node expr1, Node expr2)
"!="static Node
neg(Node expr1)
static Node
newNode(Node target, Node... args)
static Node
not(Node expr1)
static Node
nullNode()
static Node
number(double d)
static Node
objectlit(Node... propdefs)
static Node
objectPattern(Node... keys)
static Node
objectRest(Node target)
static Node
objectSpread(Node expr)
static Node
or(Node expr1, Node expr2)
static Node
paramList(Node... params)
static Node
pos(Node expr1)
static Node
propdef(Node string, Node value)
static Node
quotedStringKey(java.lang.String s, Node value)
static Node
regexp(Node expr)
static Node
regexp(Node expr, Node flags)
static Node
returnNode()
static Node
returnNode(Node expr)
static Node
root(Node... rootChildren)
static Node
script()
static Node
script(Node... stmts)
static Node
script(java.util.List<Node> stmts)
static Node
setterDef(java.lang.String name, Node value)
static Node
sheq(Node expr1, Node expr2)
"==="static Node
shne(Node expr1, Node expr2)
"!=="static Node
startOptChainCall(Node target, Node... args)
static Node
startOptChainGetelem(Node target, Node elem)
static Node
startOptChainGetprop(Node target, java.lang.String prop)
static Node
string(java.lang.String s)
static Node
stringKey(java.lang.String s)
static Node
stringKey(java.lang.String s, Node value)
static Node
sub(Node expr1, Node expr2)
static Node
superNode()
static Node
switchNode(Node cond, Node... cases)
static Node
thisNode()
static Node
throwNode(Node expr)
static Node
trueNode()
static Node
tryCatch(Node tryBody, Node catchNode)
static Node
tryCatchFinally(Node tryBody, Node catchNode, Node finallyBody)
static Node
tryFinally(Node tryBody, Node finallyBody)
static Node
typeof(Node expr)
static Node
var(Node lhs)
static Node
var(Node lhs, Node value)
static Node
voidNode(Node expr1)
static Node
whileNode(Node cond, Node body)
static Node
yield()
static Node
yield(Node expr)
-
-
-
Method Detail
-
empty
public static Node empty()
-
importStar
public static Node importStar(java.lang.String name)
-
block
public static Node block()
-
script
public static Node script()
-
returnNode
public static Node returnNode()
-
yield
public static Node yield()
-
labelName
public static Node labelName(java.lang.String name)
-
breakNode
public static Node breakNode()
-
continueNode
public static Node continueNode()
-
name
public static Node name(java.lang.String name)
-
continueOptChainGetprop
public static Node continueOptChainGetprop(Node target, java.lang.String prop)
-
getprop
public static Node getprop(Node target, java.lang.String prop, java.lang.String... moreProps)
-
string
public static Node string(java.lang.String s)
-
stringKey
public static Node stringKey(java.lang.String s)
-
superNode
public static Node superNode()
-
number
public static Node number(double d)
-
bigint
public static Node bigint(java.math.BigInteger b)
-
thisNode
public static Node thisNode()
-
trueNode
public static Node trueNode()
-
falseNode
public static Node falseNode()
-
nullNode
public static Node nullNode()
-
importMeta
public static Node importMeta()
-
mayBeStatement
public static boolean mayBeStatement(Node n)
It isn't possible to always determine if a detached node is a expression, so make a best guess.
-
mayBeExpression
public static boolean mayBeExpression(Node n)
It isn't possible to always determine if a detached node is a expression, so make a best guess.
-
-