Ejemplo n.º 1
0
		public void Visit(JsonExpression expression)
		{
			Builder.Append("{");
			indent++;

			foreach (var value in expression.Values)
			{
				Indent();
				Builder.Append("\"").Append(value.Key).Append("\": ");
				value.Value.Accept(this);
			}

			indent--;
			Indent();
			Builder.Append("}");
		}
Ejemplo n.º 2
0
        public void Visit(JsonExpression json)
        {
            JsObject instance = Global.ObjectClass.New();

            JsScope scope = new JsScope() { Prototype = CurrentScope };
            scope.DefineOwnProperty(JsInstance.THIS, instance);
            EnterScope(scope);
            try
            {
                foreach (var item in json.Values)
                {
                    item.Value.Accept(this);
                    instance.DefineOwnProperty(item.Key, Result);
                }
            }
            finally
            {
                ExitScope();
            }

            Result = instance;
        }
Ejemplo n.º 3
0
        public void Visit(JsonExpression json)
        {
            JsObject instance = Global.ObjectClass.New();

            foreach (var item in json.Values) {
                Result = instance;
                item.Value.Accept(this);
            }

            Result = instance;
        }
Ejemplo n.º 4
0
 void Analyze(JsonExpression Stmt)
 {
     SetCurrentLineAndCharNos(Stmt);
     if (Stmt.Values != null)
     {
         foreach(string Name in Stmt.Values.Keys)
         {
             //if (Name != null) Analyzer.CheckIdentifier(Name);
             Analyze(Stmt.Values[Name]);
         }
     }
 }