Path: blob/main/extensions/emmet/src/typings/EmmetNode.d.ts
4774 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45declare module 'EmmetNode' {6import { Position } from 'vscode';78export interface Node {9start: Position10end: Position11type: string12parent: Node13firstChild: Node14nextSibling: Node15previousSibling: Node16children: Node[]17}1819export interface Token {20start: Position21end: Position22stream: BufferStream23toString(): string24}2526export interface CssToken extends Token {27size: number28item(number: number): any29type: string30}3132export interface HtmlToken extends Token {33value: string34}3536export interface Attribute extends Token {37name: Token38value: Token39}4041export interface HtmlNode extends Node {42name: string43open: Token44close: Token45parent: HtmlNode46firstChild: HtmlNode47nextSibling: HtmlNode48previousSibling: HtmlNode49children: HtmlNode[]50attributes: Attribute[]51}5253export interface CssNode extends Node {54name: string55parent: CssNode56firstChild: CssNode57nextSibling: CssNode58previousSibling: CssNode59children: CssNode[]60}6162export interface Rule extends CssNode {63selectorToken: Token64contentStartToken: Token65contentEndToken: Token66}6768export interface Property extends CssNode {69valueToken: Token70separator: string71parent: Rule72terminatorToken: Token73separatorToken: Token74value: string75}7677export interface Stylesheet extends Node {78comments: Token[]79}8081export interface BufferStream {82peek(): number83next(): number84backUp(n: number): number85current(): string86substring(from: Position, to: Position): string87eat(match: any): boolean88eatWhile(match: any): boolean89}90}91929394959697