Inheritance: AuthoringScope
Exemple #1
0
        public override AuthoringScope ParseSource(ParseRequest req)
        {
            Core.FStarParser parser = new Core.FStarParser();
            var result = new TestAuthoringScope();
            var tokens = new List <TokenInfo>();

            if (req.Sink.BraceMatching || ParseReason.MatchBraces == req.Reason || ParseReason.HighlightBraces == req.Reason)
            {
                var scanner = GetScanner(null);
                scanner.SetSource(req.Text, 0);
                var line = 0;
                var col  = 0;
                req.View.GetCaretPos(out line, out col);
                (scanner as VisualFStar.Core.FStarScanner).MatchPair(req.Sink, req.Text, line, col);
            }
            else
            {
                parser.Parse(req);
            }
            if (ParseReason.Check == req.Reason)
            {
                Console.WriteLine("!!!!");
            }
            return(result);
        }
        public override AuthoringScope ParseSource(ParseRequest req)
        {
            Core.FStarParser parser = new Core.FStarParser();
            var result = new TestAuthoringScope();
            var tokens = new List<TokenInfo>();
            if (req.Sink.BraceMatching || ParseReason.MatchBraces == req.Reason || ParseReason.HighlightBraces == req.Reason)
            {
                var scanner = GetScanner(null);
                scanner.SetSource(req.Text, 0);
                var line = 0;
                var col = 0;
                req.View.GetCaretPos(out line, out col);
                (scanner as VisualFStar.Core.FStarScanner).MatchPair(req.Sink, req.Text, line, col);

            }
            else parser.Parse(req);
            if (ParseReason.Check == req.Reason)
            {
                Console.WriteLine("!!!!");
            }
            return result;
        }