예제 #1
0
		public void init ()
		{
			idtable = new IdentifierTable ();
			maptable = new IdentifierMappingTable ();
			gen = new RowanGenerator (maptable,
									idtable.InsertIdentifier ("this"),
									idtable.InsertIdentifier ("_"),
									idtable.InsertIdentifier ("arguments"),
									idtable.InsertIdentifier ("eval"));
		}
예제 #2
0
		public SLE.LambdaExpression CompileExpression (char[] Input, ref List<Diagnostic> Diagnostics)
		{
			IdentifierMappingTable idmtable = new IdentifierMappingTable ();
			IdentifierTable idtable = new IdentifierTable ();
			Parser parser = new Parser (Input, idtable, true);
			List<Comment> comments = null;
			BindingInfo bindinginfo = null;
			Expression expr = parser.ParseExpression (ref comments, ref bindinginfo);
			Diagnostics = parser.Diagnostics;
			RowanGenerator gen = new RowanGenerator (idmtable, idtable.InsertIdentifier("this"),  idtable.InsertIdentifier("arguments"));
			return gen.BindAndTransform (expr, bindinginfo);
		}
예제 #3
0
		public SLE.LambdaExpression CompileProgram (char[] Input, ref List<Diagnostic> Diagnostics, ref bool IncompleteInput, bool PrintExpressions)
		{
			IdentifierMappingTable idmtable = new IdentifierMappingTable ();
			IdentifierTable idtable = new IdentifierTable ();
			Parser parser = new Parser (Input, new IdentifierTable (), true);//tode get ecma from somewhere
			List<Comment> comments = null;
			BindingInfo bindinginfo = null;
			DList<Statement, BlockStatement> list = parser.ParseProgram (ref comments, ref bindinginfo);
			Diagnostics = parser.Diagnostics;
			IncompleteInput = parser.SyntaxIncomplete();
			RowanGenerator gen = new RowanGenerator (idmtable, idtable.InsertIdentifier ("this"), idtable.InsertIdentifier ("arguments"));
			return gen.BindAndTransform (list, bindinginfo, PrintExpressions);
		}
예제 #4
0
파일: Compiler.cs 프로젝트: stanasse/olive
        public SLE.LambdaExpression CompileExpression(char[] Input, ref List <Diagnostic> Diagnostics)
        {
            IdentifierMappingTable idmtable = new IdentifierMappingTable();
            IdentifierTable        idtable  = new IdentifierTable();
            Parser         parser           = new Parser(Input, idtable, true);
            List <Comment> comments         = null;
            BindingInfo    bindinginfo      = null;
            Expression     expr             = parser.ParseExpression(ref comments, ref bindinginfo);

            Diagnostics = parser.Diagnostics;
            RowanGenerator gen = new RowanGenerator(idmtable, idtable.InsertIdentifier("this"), idtable.InsertIdentifier("arguments"));

            return(gen.BindAndTransform(expr, bindinginfo));
        }
예제 #5
0
파일: Compiler.cs 프로젝트: stanasse/olive
        public SLE.LambdaExpression CompileProgram(char[] Input, ref List <Diagnostic> Diagnostics, ref bool IncompleteInput, bool PrintExpressions)
        {
            IdentifierMappingTable idmtable        = new IdentifierMappingTable();
            IdentifierTable        idtable         = new IdentifierTable();
            Parser         parser                  = new Parser(Input, new IdentifierTable(), true);//tode get ecma from somewhere
            List <Comment> comments                = null;
            BindingInfo    bindinginfo             = null;
            DList <Statement, BlockStatement> list = parser.ParseProgram(ref comments, ref bindinginfo);

            Diagnostics     = parser.Diagnostics;
            IncompleteInput = parser.SyntaxIncomplete();
            RowanGenerator gen = new RowanGenerator(idmtable, idtable.InsertIdentifier("this"), idtable.InsertIdentifier("arguments"));

            return(gen.BindAndTransform(list, bindinginfo, PrintExpressions));
        }