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";
 }
Example #2
0
        // NOTE: If you add new state, you should probably add it to ResetPoint as well.

        internal LanguageParser(
            Lexer lexer,
            CSharp.CSharpSyntaxNode oldTree,
            IEnumerable <TextChangeRange> changes,
            CancellationToken cancellationToken = default(CancellationToken))
            : base(lexer, LexerMode.Syntax, oldTree, changes, allowModeReset: false,
                   preLexIfNotIncremental: true, cancellationToken: cancellationToken)
        {
            this._syntaxFactoryContext = new SyntaxFactoryContext();
            this._syntaxFactory        = new ContextAwareSyntax(_syntaxFactoryContext);
        }
Example #3
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 #4
0
        //#endif

        internal XSharpLanguageParser(
            String FileName,
            SourceText Text,
            CSharpParseOptions options,
            CSharp.CSharpSyntaxNode oldTree,
            IEnumerable <TextChangeRange> changes,
            LexerMode lexerMode = LexerMode.Syntax,
            CancellationToken cancellationToken = default(CancellationToken))
            : base(/*lexer*/ null, lexerMode, oldTree, changes, allowModeReset: false,
                   preLexIfNotIncremental: true, cancellationToken: cancellationToken)
        {
            _syntaxFactoryContext = new SyntaxFactoryContext();
            _syntaxFactory        = new ContextAwareSyntax(_syntaxFactoryContext);
            _text          = Text;
            _fileName      = FileName;
            _options       = options;
            _isScript      = options.Kind == SourceCodeKind.Script;
            _isMacroScript = _isScript && options.MacroScript;
        }
Example #5
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 #6
0
 public XSharpTreeTransformationFox(XSharpParser parser, CSharpParseOptions options, SyntaxListPool pool,
                                    ContextAwareSyntax syntaxFactory, string fileName) :
     base(parser, options, pool, syntaxFactory, fileName)
 {
 }