public DebugInformation CreateDebugInformation(Statement statement) { DebugInformation info = new DebugInformation(); info.CurrentStatement = statement; info.CallStack = CallStack; info.Locals = new JsObject() { Prototype = JsUndefined.Instance }; DebugMode = false; foreach (JsDictionaryObject scope in Scopes.ToArray()) { foreach (var property in scope.GetKeys()) { if (!info.Locals.HasProperty(property)) { info.Locals[property] = scope[property]; } } } DebugMode = true; return info; }
public WhileStatement(Expression condition, Statement statement) { Condition = condition; Statement = statement; }
public JsFunction(Statement statement) : this() { Statement = statement; }
public void Visit(Statement expression) { throw new System.NotSupportedException(); }
public CatchClause(string identifier, Statement statement) { Identifier = identifier; Statement = statement; }
public WithStatement(Expression expression, Statement statement) { Statement = statement; Expression = expression; }
public DebugInformation CreateDebugInformation(Statement statement) { DebugInformation info = new DebugInformation(); info.CurrentStatement = statement; info.CallStack = CallStack; info.Locals = new JsObject(JsNull.Instance); DebugMode = false; foreach (var property in CurrentScope.GetKeys()) info.Locals[property] = CurrentScope[property]; DebugMode = true; return info; }
public void Visit(Statement expression) { // fallback for an unsupported expression throw new NotImplementedException(); }
public JsFunction(IGlobal global, Statement statement) : this(global.FunctionClass.PrototypeProperty) { Statement = statement; }
public StatementInfo(int i, Statement s) { index = i; statement = s; }
public void Visit(Statement expression) { throw new NotImplementedException(); }
public FinallyClause(Statement statement) { Statement = statement; }
void Analyze(LinkedList<Statement> Statements) { Statement[] Stmts = new Statement[Statements.Count]; Statements.CopyTo(Stmts, 0); for (int i = 0; i < Stmts.Length; i++) { if (Stmts[i] != null) Analyze(Stmts[i]); } }
void SetCurrentLineAndCharNos(Statement Stmt) { if (Stmt != null) { if (Stmt.Source != null) { CurrentLineNo = Stmt.Source.Start.Line; CurrentCharNo = Stmt.Source.Start.Char; } } }