Beispiel #1
0
	public bool testDynamicHeteroCreate() {
		factory = new ASTFactory();
		factory.setMaxNodeType(55);
		factory.setTokenTypeASTNodeType(49,"ASTType49");
		AST t = factory.create(49);
		bool a = checkNode(t, typeof(ASTType49), 49);
		AST u = factory.create(55);
		bool b = checkNode(u, typeof(CommonAST), 55);
		AST v = factory.create(49,"","MyAST");
		bool c = checkNode(v, typeof(MyAST), 49);
		return a&&b&&c;
	}
Beispiel #2
0
    public bool testDynamicHeteroCreate()
    {
        factory = new ASTFactory();
        factory.setMaxNodeType(55);
        factory.setTokenTypeASTNodeType(49, "ASTType49");
        AST  t = factory.create(49);
        bool a = checkNode(t, typeof(ASTType49), 49);
        AST  u = factory.create(55);
        bool b = checkNode(u, typeof(CommonAST), 55);
        AST  v = factory.create(49, "", "MyAST");
        bool c = checkNode(v, typeof(MyAST), 49);

        return(a && b && c);
    }