Пример #1
0
 public IncludeContext(SourceText text)
 {
     CharReader = new CharReader(text);
     Text = text;
 }
Пример #2
0
        private void PushIncludeContext(SourceText text)
        {
            _currentFileSegmentAbsolutePosition = FileSegments.Sum(x => x.Length);

            var includeContext = new IncludeContext(text);
            _includeStack.Push(includeContext);
            _charReader = includeContext.CharReader;
            FileSegments.Add(new FileSegment(text, 0));
        }
Пример #3
0
        private void PopIncludeContext()
        {
            _currentFileSegmentAbsolutePosition = FileSegments.Sum(x => x.Length);

            _includeStack.Pop();
            _charReader = _includeStack.Peek().CharReader;

            FileSegments.Add(new FileSegment(_includeStack.Peek().Text, _charReader.Position));
        }
Пример #4
0
 public IncludeContext(SourceText text)
 {
     CharReader = new CharReader(text);
     Text       = text;
 }