Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 public WhileStatement(Expression condition, Statement statement)
 {
     Condition = condition;
     Statement = statement;
 }
Exemplo n.º 3
0
 public JsFunction(Statement statement)
     : this()
 {
     Statement = statement;
 }
Exemplo n.º 4
0
		public void Visit(Statement expression)
		{
			throw new System.NotSupportedException();
		}
Exemplo n.º 5
0
 public CatchClause(string identifier, Statement statement) {
     Identifier = identifier;
     Statement = statement;
 }
Exemplo n.º 6
0
 public WithStatement(Expression expression, Statement statement)
 {
     Statement = statement;
     Expression = expression;
 }
Exemplo n.º 7
0
        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;
        }
Exemplo n.º 8
0
 public void Visit(Statement expression)
 {
     // fallback for an unsupported expression
     throw new NotImplementedException();
 }
Exemplo n.º 9
0
 public JsFunction(IGlobal global, Statement statement)
     : this(global.FunctionClass.PrototypeProperty)
 {
     Statement = statement;
 }
Exemplo n.º 10
0
 public StatementInfo(int i, Statement s)
 {
     index = i;
     statement = s;
 }
Exemplo n.º 11
0
 public void Visit(Statement expression)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 12
0
 public FinallyClause(Statement statement)
 {
     Statement = statement;
 }
Exemplo n.º 13
0
        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]);
            }
        }
Exemplo n.º 14
0
 void SetCurrentLineAndCharNos(Statement Stmt)
 {
     if (Stmt != null)
     {
         if (Stmt.Source != null)
         {
             CurrentLineNo = Stmt.Source.Start.Line;
             CurrentCharNo = Stmt.Source.Start.Char;
         }
     }
 }
 public FinallyClause(Statement statement)
 {
     Statement = statement;
 }