public static Jint_Function jintFunction(this Jint_Visitor jintVisitor, MethodCall methodCall)
        {
            var jintFunction = new Jint_Function();
            var previous     = jintVisitor.previous_All <Identifier>(methodCall);

            if (previous.size() > 0)
            {
                jintFunction.Name = previous.first().Text;
                previous.Reverse();
                var className = "";
                foreach (var item in previous)
                {
                    className = "{0}.{1}".format(className, item.Text);
                }
                className          = className.removeFirstChar();
                jintFunction.Class = className;
            }
            else
            {
                jintFunction.Name = "[anonymous]";
            }
            jintFunction.Arguments = methodCall.Arguments;
            //foreach(var argument in methodCall.Arguments)
            //	jintFunction.Arguments.Add(argument.str());
            return(jintFunction);
        }
예제 #2
0
		public static Jint_Function jintFunction(this Jint_Visitor jintVisitor, MethodCall methodCall)
		{
			var jintFunction = new Jint_Function();			
			var previous = jintVisitor.previous_All<Identifier>(methodCall);     
			if (previous.size()>0)
			{
				jintFunction.Name = previous.first().Text;
				previous.Reverse();  
				var className = "";				
				foreach(var item in previous)
					className= "{0}.{1}".format(className, item.Text);
				className = className.removeFirstChar(); 				 				
				jintFunction.Class = className;
			}
			else
				jintFunction.Name = "[anonymous]";
			jintFunction.Arguments = methodCall.Arguments;
			//foreach(var argument in methodCall.Arguments)
			//	jintFunction.Arguments.Add(argument.str()); 
			return jintFunction;
		}