Esempio n. 1
0
 public IncludeContext(SourceText text)
 {
     CharReader = new CharReader(text);
     Text = text;
 }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 4
0
 public IncludeContext(SourceText text)
 {
     CharReader = new CharReader(text);
     Text       = text;
 }