public JArgList(Context context, JNode expr1, JNode expr2) : base(context, expr1, expr2) { this.kind__ = KIND; }
// Constructor. internal VsaCodeItem(VsaEngine engine, String name, VsaItemFlag flag) : base(engine, name, VsaItemType.Code, flag) { sourceText = null; parsed = null; }
// Determine if a node corresponds to a builtin function reference. private bool IsBuiltinCall(JNode node, String name) { return (node is JIdentifier && ((JIdentifier)node).name == name); }
public JFieldAccess(Context context, JNode expr, String name) : base(context) { this.kind__ = KIND; this.expr = expr; this.name = name; }
// Reset the compiled state of this item. internal override void Reset() { parsed = null; }
protected JBinaryExpression(Context context, JNode expr1, JNode expr2) : base(context) { this.kind__ = KIND; this.expr1 = expr1; this.expr2 = expr2; }
public JAssignOp(Context context, JSToken oper, JNode expr1, JNode expr2) : base(context) { this.kind__ = KIND; this.oper = oper; this.expr1 = expr1; this.expr2 = expr2; }
public JFor(Context context, JNode init, JNode cond, JNode incr, JNode body) : base(context) { this.kind__ = KIND; this.init = init; this.cond = cond; this.incr = incr; this.body = body; }
public JForIn(Context context, JNode decl, JNode expr, JNode body) : base(context) { this.kind__ = KIND; this.decl = decl; this.expr = expr; this.body = body; }
public JDo(Context context, JNode body, JNode condition) : base(context) { this.kind__ = KIND; this.body = body; this.condition = condition; }
public JExprListElem(Context context, Object name, JNode expr, JExprListElem next) : base(context) { this.kind__ = KIND; this.name = name; this.expr = expr; this.next = next; }
public JWhile(Context context, JNode condition, JNode body) : base(context) { this.kind__ = KIND; this.condition = condition; this.body = body; }
public JIf(Context context, JNode condition, JNode thenClause, JNode elseClause) : base(context) { this.kind__ = KIND; this.condition = condition; this.thenClause = thenClause; this.elseClause = elseClause; }
public JExprStmt(Context context, JNode expr) : base(context) { this.kind__ = KIND; this.expr = expr; }
public JTry(Context context, JNode body, String catchName, JNode catchClause, JNode finallyClause) : base(context) { this.kind__ = KIND; this.body = body; this.catchName = catchName; this.catchClause = catchClause; this.finallyClause = finallyClause; }
public JSwitch(Context context, JNode expr, JNode cases) : base(context) { this.kind__ = KIND; this.expr = expr; this.cases = cases; }
protected JUnaryExpression(Context context, JNode expr) : base(context) { this.kind__ = KIND; this.expr = expr; }
public JDefault(Context context, JNode body) : base(context) { this.kind__ = KIND; this.body = body; }
public JAssign(Context context, JNode expr1, JNode expr2) : base(context) { this.kind__ = KIND; this.expr1 = expr1; this.expr2 = expr2; }
public JFallThrough(Context context, JNode stmt) : base(context) { this.kind__ = KIND; this.stmt = stmt; }
public JIfExpr(Context context, JNode expr1, JNode expr2, JNode expr3) : base(context) { this.kind__ = KIND; this.expr1 = expr1; this.expr2 = expr2; this.expr3 = expr3; }
public JReturnExpr(Context context, JNode expr) : base(context) { this.kind__ = KIND; this.expr = expr; }
public JFunction(Context context, String name, JFormalParams fparams, JNode body) : base(context) { this.kind__ = KIND; this.name = name; this.fparams = fparams; this.body = body; }
public JThrow(Context context, JNode expr) : base(context) { this.kind__ = KIND; this.expr = expr; }
// Compile this item. internal override bool Compile() { if(parsed == null && sourceText != null) { Context context = new Context(sourceText); context.codebase = new CodeBase(codebaseOption, this); context.codebase.site = engine.Site; JSParser parser = new JSParser(context); parser.printSupported = engine.printSupported; try { parsed = parser.ParseSource(false); } catch(JScriptException e) { #if !CONFIG_SMALL_CONSOLE ScriptStream.Error.WriteLine(e.Message); #else ScriptStream.WriteLine(e.Message); #endif return false; } if(parser.numErrors > 0) { // There were errors that were partially recovered. parsed = null; return false; } } return true; }
public JWith(Context context, JNode expr, JNode body) : base(context) { this.kind__ = KIND; this.expr = expr; this.body = body; }
// Update a case node with fall-through information. private void UpdateFallThrough(JNode caseStmt, JNode stmt) { if(caseStmt is JCase) { ((JCase)caseStmt).body = Support.CreateCompound (((JCase)caseStmt).body, new JFallThrough(tokenInfo.MakeCopy(), stmt)); } else if(caseStmt is JDefault) { ((JDefault)caseStmt).body = Support.CreateCompound (((JDefault)caseStmt).body, new JFallThrough(tokenInfo.MakeCopy(), stmt)); } }
public JVarDecl(Context context, String name, JNode initializer) : base(context) { this.kind__ = KIND; this.name = name; this.initializer = initializer; }
// Determine if a node is a left-hand side expression. private void CheckLeftHandSideExpression(JNode node) { if(!(node is JConstant) && !(node is JArrayLiteral) && !(node is JThis) && !(node is JSuper) && !(node is JIdentifier) && !(node is JNew) && !(node is JArrayAccess) && !(node is JFieldAccess) && !(node is JCall)) { SyntaxError(node.context, "invalid l-value"); } }
public JCall(Context context, JNode expr1, JNode expr2) : base(context, expr1, expr2) { this.kind__ = KIND; }