/// <summary> /// Initializes a new instance of the <see cref="UvssTextParserResult"/> structure. /// </summary> /// <param name="snapshot">The snapshot from which the document was generated.</param> /// <param name="document">The document that was generated by the parser.</param> public UvssTextParserResult(ITextSnapshot snapshot, UvssDocumentSyntax document) { this.Snapshot = snapshot; this.Document = document; }
/// <summary> /// Visits the specified document node. /// </summary> /// <param name="node">The node to visit.</param> /// <returns>A node which should replace the visited node, or a reference to the visited node /// itself if no changes were made.</returns> public virtual SyntaxNode VisitDocument(UvssDocumentSyntax node) { return VisitSyntaxNode(node); }
/// <summary> /// Compiles an Ultraviolet Style Sheet (UVSS) document from the specified abstract syntax tree. /// </summary> /// <param name="uv">The Ultraviolet context.</param> /// <param name="tree">A <see cref="UvssDocumentSyntax"/> that represents the /// abstract syntax tree to compile.</param> /// <returns>A new instance of <see cref="UvssDocument"/> that represents the compiled data.</returns> public static UvssDocument Compile(UltravioletContext uv, UvssDocumentSyntax tree) { Contract.Require(uv, nameof(uv)); Contract.Require(tree, nameof(tree)); return UvssCompiler.Compile(uv, tree); }