Example #1
0
 internal void Free(SyntaxListPool pool)
 {
     pool.Free(Members);
     pool.Free(Imports);
     //pool.Free(Packages);
     //Package = null;
     pool.Free(Annotations);
 }
Example #2
0
 public CompilationUnitBodyBuilder(SyntaxListPool pool)
 {
     Annotations = pool.Allocate <AnnotationSyntax>();
     //Packages = pool.Allocate<JavaPackageDeclarationSyntax>();
     Package = null;
     Imports = pool.Allocate <JavaImportDeclarationSyntax>();
     Members = pool.Allocate <MemberDeclarationSyntax>();
 }
Example #3
0
        internal static XSharpTreeTransformationCore CreateTransform(XSharpParser parser, CSharpParseOptions options, SyntaxListPool pool,
                                                                     ContextAwareSyntax syntaxFactory, string fileName)
        {
            switch (options.Dialect)
            {
            case XSharpDialect.Core:
                return(new XSharpTreeTransformationCore(parser, options, pool, syntaxFactory, fileName));

            case XSharpDialect.VO:
            case XSharpDialect.Vulcan:
                return(new XSharpTreeTransformationVO(parser, options, pool, syntaxFactory, fileName));

            case XSharpDialect.FoxPro:
                return(new XSharpTreeTransformationFox(parser, options, pool, syntaxFactory, fileName));

            case XSharpDialect.XPP:
                return(new XSharpTreeTransformationXPP(parser, options, pool, syntaxFactory, fileName));

            case XSharpDialect.Harbour:
            default:
                return(new XSharpTreeTransformationRT(parser, options, pool, syntaxFactory, fileName));
            }
        }
Example #4
0
 public XSharpTreeTransformationVO(XSharpParser parser, CSharpParseOptions options, SyntaxListPool pool,
                                   ContextAwareSyntax syntaxFactory, string fileName) :
     base(parser, options, pool, syntaxFactory, fileName)
 {
     if (options.XSharpRuntime)
     {
         _winBoolType = XSharpQualifiedTypeNames.WinBool;
     }
     else
     {
         _winBoolType = VulcanQualifiedTypeNames.WinBool;
     }
 }
Example #5
0
 public XSharpTreeTransformationFox(XSharpParser parser, CSharpParseOptions options, SyntaxListPool pool,
                                    ContextAwareSyntax syntaxFactory, string fileName) :
     base(parser, options, pool, syntaxFactory, fileName)
 {
 }
 public XSharpTreeTransformationXPP(XSharpParser parser, CSharpParseOptions options, SyntaxListPool pool,
                                    ContextAwareSyntax syntaxFactory, string fileName) :
     base(parser, options, pool, syntaxFactory, fileName)
 {
     _classes      = new List <XppClassInfo>();
     _classstack   = new Stack <IList <XppClassInfo> >();
     _currentClass = null;
     _entryPoint   = "Main";
 }