public DebuggerSyntaxTree(LuaSyntaxNode root, SourceText text, LuaParseOptions options)
     : base(
         text,
         text.Encoding,
         text.ChecksumAlgorithm,
         path: "",
         options: options,
         root: root,
         cloneRoot: true)
 {
 }
Example #2
0
            internal ParsedSyntaxTree(
                SourceText?textOpt,
                Encoding?encodingOpt,
                SourceHashAlgorithm checksumAlgorithm,
                string path,
                LuaParseOptions options,
                LuaSyntaxNode root,
                bool cloneRoot)
            {
                RoslynDebug.Assert(root != null);
                RoslynDebug.Assert(options != null);
                RoslynDebug.Assert(textOpt == null || textOpt.Encoding == encodingOpt && textOpt.ChecksumAlgorithm == checksumAlgorithm);

                _lazyText          = textOpt;
                _encodingOpt       = encodingOpt ?? textOpt?.Encoding;
                _checksumAlgorithm = checksumAlgorithm;
                _options           = options;
                _path = path ?? string.Empty;
                _root = cloneRoot ? CloneNodeAsRoot(root) : root;
                _hasCompilationUnitRoot = root.Kind() == SyntaxKind.CompilationUnit;
            }
Example #3
0
 internal LuaParseOptions(LuaParseOptions other) : this(other.SyntaxOptions)
 {
     _features = other._features;
 }