protected TokenizerBackedParser(LanguageCharacteristics <TTokenizer, TToken, TTokenType> language, ParserContext context)
            : base(context)
        {
            Language = language;

            var languageTokenizer = Language.CreateTokenizer(Context.Source);

            _tokenizer = new TokenizerView <TTokenizer, TToken, TTokenType>(languageTokenizer);
            Span       = new SpanBuilder(CurrentLocation);
        }
Beispiel #2
0
        protected TokenizerBackedParser(LanguageCharacteristics <TTokenizer> language, ParserContext context)
            : base(context)
        {
            Language = language;

            var languageTokenizer = Language.CreateTokenizer(Context.Source);

            _tokenizer  = new TokenizerView <TTokenizer>(languageTokenizer);
            SpanContext = new SpanContextBuilder();
        }