@marko/language-server 0.12.2 → 0.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1322 -555
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +1350 -605
- package/dist/index.mjs.map +3 -3
- package/dist/service/index.d.ts +6 -0
- package/dist/service/marko/complete/AttrName.d.ts +3 -0
- package/dist/service/marko/complete/OpenTagName.d.ts +3 -0
- package/dist/service/marko/complete/Tag.d.ts +6 -0
- package/dist/service/marko/complete/index.d.ts +14 -0
- package/dist/service/marko/definition/AttrName.d.ts +3 -0
- package/dist/service/marko/definition/OpenTagName.d.ts +3 -0
- package/dist/service/marko/definition/index.d.ts +14 -0
- package/dist/service/marko/format.d.ts +2 -0
- package/dist/service/marko/index.d.ts +3 -0
- package/dist/service/marko/validate.d.ts +2 -0
- package/dist/service/stylesheet/extract.d.ts +10 -0
- package/dist/service/stylesheet/index.d.ts +3 -0
- package/dist/service/types.d.ts +12 -0
- package/dist/utils/compiler.d.ts +16 -4
- package/dist/utils/doc-file.d.ts +3 -0
- package/dist/utils/extractor.d.ts +12 -0
- package/dist/utils/get-node-at-offset.d.ts +2 -0
- package/dist/utils/messages.d.ts +5 -0
- package/dist/utils/parser.d.ts +176 -0
- package/dist/utils/utils.d.ts +1 -8
- package/package.json +15 -14
- package/LICENSE +0 -20
- package/dist/utils/completions/index.d.ts +0 -6
- package/dist/utils/completions/types/attributeModifier.d.ts +0 -5
- package/dist/utils/completions/types/attributeName.d.ts +0 -5
- package/dist/utils/completions/types/closeTag.d.ts +0 -5
- package/dist/utils/completions/types/openTag.d.ts +0 -5
- package/dist/utils/completions/types/openTagName.d.ts +0 -5
- package/dist/utils/completions/types/styleContent.d.ts +0 -5
- package/dist/utils/definitions/index.d.ts +0 -2
- package/dist/utils/definitions/types/attributeName.d.ts +0 -5
- package/dist/utils/definitions/types/openTagName.d.ts +0 -5
- package/dist/utils/htmljs-parser.d.ts +0 -128
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { TagType, Range, Ranges } from "htmljs-parser";
|
|
2
|
+
export { Range, Ranges };
|
|
3
|
+
export declare const UNFINISHED: number;
|
|
4
|
+
export declare enum NodeType {
|
|
5
|
+
Program = 0,
|
|
6
|
+
Tag = 1,
|
|
7
|
+
OpenTagName = 2,
|
|
8
|
+
ShorthandId = 3,
|
|
9
|
+
ShorthandClassName = 4,
|
|
10
|
+
TagVar = 5,
|
|
11
|
+
TagArgs = 6,
|
|
12
|
+
TagParams = 7,
|
|
13
|
+
AttrNamed = 8,
|
|
14
|
+
AttrName = 9,
|
|
15
|
+
AttrArgs = 10,
|
|
16
|
+
AttrValue = 11,
|
|
17
|
+
AttrMethod = 12,
|
|
18
|
+
AttrSpread = 13,
|
|
19
|
+
AttrTag = 14,
|
|
20
|
+
Text = 15,
|
|
21
|
+
CDATA = 16,
|
|
22
|
+
Doctype = 17,
|
|
23
|
+
Declaration = 18,
|
|
24
|
+
Comment = 19,
|
|
25
|
+
Statement = 20,
|
|
26
|
+
Placeholder = 21,
|
|
27
|
+
Scriptlet = 22
|
|
28
|
+
}
|
|
29
|
+
export declare namespace Node {
|
|
30
|
+
type AnyNode = Program | Tag | OpenTagName | ShorthandId | ShorthandClassName | TagVar | TagArgs | TagParams | AttrNamed | AttrName | AttrArgs | AttrValue | AttrMethod | AttrSpread | AttrTag | Text | CDATA | Doctype | Declaration | Comment | Statement | Placeholder | Scriptlet;
|
|
31
|
+
type ParentNode = Program | Tag | AttrTag;
|
|
32
|
+
type StaticNode = Comment | Statement;
|
|
33
|
+
type ParentTag = Tag | AttrTag;
|
|
34
|
+
type AttrNode = AttrNamed | AttrSpread | AttrTag;
|
|
35
|
+
type ChildNode = Tag | AttrTag | Text | Doctype | Declaration | CDATA | Comment | Placeholder | Scriptlet;
|
|
36
|
+
interface Program extends Range {
|
|
37
|
+
type: NodeType.Program;
|
|
38
|
+
parent: undefined;
|
|
39
|
+
static: StaticNode[];
|
|
40
|
+
body: ChildNode[];
|
|
41
|
+
}
|
|
42
|
+
interface Tag extends Range {
|
|
43
|
+
type: NodeType.Tag;
|
|
44
|
+
parent: ParentNode;
|
|
45
|
+
owner: undefined;
|
|
46
|
+
concise: boolean;
|
|
47
|
+
open: Range;
|
|
48
|
+
close: Range | undefined;
|
|
49
|
+
nameText: string | undefined;
|
|
50
|
+
bodyType: Exclude<TagType, "statement">;
|
|
51
|
+
name: OpenTagName;
|
|
52
|
+
var: TagVar | undefined;
|
|
53
|
+
args: TagArgs | undefined;
|
|
54
|
+
params: TagParams | undefined;
|
|
55
|
+
shorthandId: ShorthandId | undefined;
|
|
56
|
+
shorthandClassNames: ShorthandClassName[] | undefined;
|
|
57
|
+
attrs: AttrNode[] | undefined;
|
|
58
|
+
selfClosed: boolean;
|
|
59
|
+
body: undefined | ChildNode[];
|
|
60
|
+
}
|
|
61
|
+
interface AttrTag extends Range {
|
|
62
|
+
type: NodeType.AttrTag;
|
|
63
|
+
parent: ParentTag;
|
|
64
|
+
owner: ParentTag | undefined;
|
|
65
|
+
concise: boolean;
|
|
66
|
+
open: Range;
|
|
67
|
+
close: Range | undefined;
|
|
68
|
+
nameText: string | undefined;
|
|
69
|
+
bodyType: TagType.html;
|
|
70
|
+
name: OpenTagName;
|
|
71
|
+
var: TagVar | undefined;
|
|
72
|
+
args: TagArgs | undefined;
|
|
73
|
+
params: TagParams | undefined;
|
|
74
|
+
shorthandId: ShorthandId | undefined;
|
|
75
|
+
shorthandClassNames: ShorthandClassName[] | undefined;
|
|
76
|
+
attrs: AttrNode[] | undefined;
|
|
77
|
+
selfClosed: boolean;
|
|
78
|
+
body: undefined | ChildNode[];
|
|
79
|
+
}
|
|
80
|
+
interface OpenTagName extends Ranges.Template {
|
|
81
|
+
type: NodeType.OpenTagName;
|
|
82
|
+
parent: ParentTag;
|
|
83
|
+
}
|
|
84
|
+
interface ShorthandId extends Ranges.Template {
|
|
85
|
+
type: NodeType.ShorthandId;
|
|
86
|
+
parent: ParentTag;
|
|
87
|
+
}
|
|
88
|
+
interface ShorthandClassName extends Ranges.Template {
|
|
89
|
+
type: NodeType.ShorthandClassName;
|
|
90
|
+
parent: ParentTag;
|
|
91
|
+
}
|
|
92
|
+
interface TagVar extends Ranges.Value {
|
|
93
|
+
type: NodeType.TagVar;
|
|
94
|
+
parent: ParentTag;
|
|
95
|
+
}
|
|
96
|
+
interface TagArgs extends Ranges.Value {
|
|
97
|
+
type: NodeType.TagArgs;
|
|
98
|
+
parent: ParentTag;
|
|
99
|
+
}
|
|
100
|
+
interface TagParams extends Ranges.Value {
|
|
101
|
+
type: NodeType.TagParams;
|
|
102
|
+
parent: ParentTag;
|
|
103
|
+
}
|
|
104
|
+
interface Statement extends Range {
|
|
105
|
+
type: NodeType.Statement;
|
|
106
|
+
parent: ParentNode;
|
|
107
|
+
}
|
|
108
|
+
interface Text extends Range {
|
|
109
|
+
type: NodeType.Text;
|
|
110
|
+
parent: ParentNode;
|
|
111
|
+
}
|
|
112
|
+
interface CDATA extends Ranges.Value {
|
|
113
|
+
type: NodeType.CDATA;
|
|
114
|
+
parent: ParentNode;
|
|
115
|
+
}
|
|
116
|
+
interface Doctype extends Ranges.Value {
|
|
117
|
+
type: NodeType.Doctype;
|
|
118
|
+
parent: ParentNode;
|
|
119
|
+
}
|
|
120
|
+
interface Declaration extends Ranges.Value {
|
|
121
|
+
type: NodeType.Declaration;
|
|
122
|
+
parent: ParentNode;
|
|
123
|
+
}
|
|
124
|
+
interface Comment extends Ranges.Value {
|
|
125
|
+
type: NodeType.Comment;
|
|
126
|
+
parent: ParentNode;
|
|
127
|
+
}
|
|
128
|
+
interface Placeholder extends Ranges.Value {
|
|
129
|
+
type: NodeType.Placeholder;
|
|
130
|
+
parent: ParentNode;
|
|
131
|
+
escape: boolean;
|
|
132
|
+
}
|
|
133
|
+
interface Scriptlet extends Ranges.Value {
|
|
134
|
+
type: NodeType.Scriptlet;
|
|
135
|
+
parent: ParentNode;
|
|
136
|
+
block: boolean;
|
|
137
|
+
}
|
|
138
|
+
interface AttrNamed extends Range {
|
|
139
|
+
type: NodeType.AttrNamed;
|
|
140
|
+
parent: ParentTag;
|
|
141
|
+
name: AttrName;
|
|
142
|
+
args: undefined | AttrArgs;
|
|
143
|
+
value: undefined | AttrValue | AttrMethod;
|
|
144
|
+
}
|
|
145
|
+
interface AttrName extends Range {
|
|
146
|
+
type: NodeType.AttrName;
|
|
147
|
+
parent: AttrNamed;
|
|
148
|
+
}
|
|
149
|
+
interface AttrArgs extends Ranges.Value {
|
|
150
|
+
type: NodeType.AttrArgs;
|
|
151
|
+
parent: AttrNamed;
|
|
152
|
+
}
|
|
153
|
+
interface AttrValue extends Range {
|
|
154
|
+
type: NodeType.AttrValue;
|
|
155
|
+
parent: AttrNamed;
|
|
156
|
+
value: Range;
|
|
157
|
+
bound: boolean;
|
|
158
|
+
}
|
|
159
|
+
interface AttrMethod extends Range {
|
|
160
|
+
type: NodeType.AttrMethod;
|
|
161
|
+
parent: AttrNamed;
|
|
162
|
+
params: Range;
|
|
163
|
+
body: Range;
|
|
164
|
+
}
|
|
165
|
+
interface AttrSpread extends Ranges.Value {
|
|
166
|
+
type: NodeType.AttrSpread;
|
|
167
|
+
parent: ParentTag;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
export declare function parse(source: string): {
|
|
171
|
+
read: (range: Range) => string;
|
|
172
|
+
locationAt: (range: Range) => import("htmljs-parser").Location;
|
|
173
|
+
positionAt: (offset: number) => import("htmljs-parser").Position;
|
|
174
|
+
nodeAt: (offset: number) => Node.AnyNode;
|
|
175
|
+
program: Node.Program;
|
|
176
|
+
};
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Range } from "vscode-languageserver";
|
|
2
2
|
import { TextDocument } from "vscode-languageserver-textdocument";
|
|
3
|
-
import type { ParserEvents } from "./htmljs-parser";
|
|
4
3
|
export declare const START_OF_FILE: Range;
|
|
5
|
-
export declare function findNonControlFlowParent(tag: ParserEvents.OpenTagName): ParserEvents.OpenTag | null;
|
|
6
|
-
export declare function rangeFromEvent(document: TextDocument, event: ParserEvents.Any): Range;
|
|
7
4
|
export declare function createTextDocument(filename: string): TextDocument;
|
|
8
|
-
export declare function shiftCompletionRanges(list: CompletionList, offset: Position): CompletionList;
|
|
9
|
-
export declare function shiftEdit(edit: TextEdit | InsertReplaceEdit, offset: Position): void;
|
|
10
|
-
export declare function shiftRange(range: Range | undefined, offset: Position): void;
|
|
11
|
-
export declare function shiftPosition(pos: Position, offset: Position): Position;
|
package/package.json
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/language-server",
|
|
3
3
|
"description": "Marko Language Server",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.5",
|
|
5
5
|
"bin": {
|
|
6
6
|
"marko-language-server": "./bin.js"
|
|
7
7
|
},
|
|
8
8
|
"bugs": "https://github.com/marko-js/language-server/issues/new?template=Bug_report.md",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@marko/babel-utils": "^5.
|
|
11
|
-
"@marko/compiler": "^5.
|
|
12
|
-
"@marko/translator-default": "^5.
|
|
13
|
-
"htmljs-parser": "^
|
|
10
|
+
"@marko/babel-utils": "^5.21.1",
|
|
11
|
+
"@marko/compiler": "^5.21.6",
|
|
12
|
+
"@marko/translator-default": "^5.21.2",
|
|
13
|
+
"htmljs-parser": "^5.0.1",
|
|
14
14
|
"lasso-package-root": "^1.0.1",
|
|
15
|
-
"marko": "^5.
|
|
16
|
-
"prettier": "^2.
|
|
17
|
-
"prettier-plugin-marko": "^1.2.
|
|
15
|
+
"marko": "^5.21.2",
|
|
16
|
+
"prettier": "^2.7.1",
|
|
17
|
+
"prettier-plugin-marko": "^1.2.1",
|
|
18
18
|
"resolve-from": "^5.0.0",
|
|
19
|
-
"
|
|
20
|
-
"vscode-
|
|
21
|
-
"vscode-languageserver
|
|
19
|
+
"tsx": "^3.6.0",
|
|
20
|
+
"vscode-css-languageservice": "^6.0.1",
|
|
21
|
+
"vscode-languageserver": "^8.0.1",
|
|
22
|
+
"vscode-languageserver-textdocument": "^1.0.5",
|
|
22
23
|
"vscode-uri": "^3.0.3"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
|
-
"@types/prettier": "^2.6.
|
|
26
|
+
"@types/prettier": "^2.6.3"
|
|
26
27
|
},
|
|
27
28
|
"exports": {
|
|
28
29
|
".": {
|
|
@@ -51,6 +52,6 @@
|
|
|
51
52
|
"url": "https://github.com/marko-js/language-server/tree/master/server"
|
|
52
53
|
},
|
|
53
54
|
"scripts": {
|
|
54
|
-
"build": "tsc -b &&
|
|
55
|
+
"build": "tsc -b && tsx build.mts"
|
|
55
56
|
}
|
|
56
|
-
}
|
|
57
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright 2022 eBay Inc.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type CompletionParams, CompletionList } from "vscode-languageserver";
|
|
2
|
-
import type { TextDocument } from "vscode-languageserver-textdocument";
|
|
3
|
-
import type { ParserEvents } from "../../htmljs-parser";
|
|
4
|
-
import type { TaglibLookup } from "../../compiler";
|
|
5
|
-
export declare function attributeModifier(_taglib: TaglibLookup, _document: TextDocument, _params: CompletionParams, _event: ParserEvents.OpenTagName): CompletionList;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type CompletionParams, CompletionList } from "vscode-languageserver";
|
|
2
|
-
import type { TextDocument } from "vscode-languageserver-textdocument";
|
|
3
|
-
import type { ParserEvents } from "../../htmljs-parser";
|
|
4
|
-
import type { TaglibLookup } from "../../compiler";
|
|
5
|
-
export declare function attributeName(taglib: TaglibLookup, document: TextDocument, _params: CompletionParams, event: ParserEvents.AttributeName): CompletionList;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type CompletionParams, CompletionList } from "vscode-languageserver";
|
|
2
|
-
import type { TextDocument } from "vscode-languageserver-textdocument";
|
|
3
|
-
import type { ParserEvents } from "../../htmljs-parser";
|
|
4
|
-
import type { TaglibLookup } from "../../compiler";
|
|
5
|
-
export declare function closeTag(_taglib: TaglibLookup, document: TextDocument, _params: CompletionParams, event: ParserEvents.CloseTag): CompletionList | undefined;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type CompletionParams, CompletionList } from "vscode-languageserver";
|
|
2
|
-
import type { TextDocument } from "vscode-languageserver-textdocument";
|
|
3
|
-
import type { ParserEvents } from "../../htmljs-parser";
|
|
4
|
-
import type { TaglibLookup } from "../../compiler";
|
|
5
|
-
export declare function openTag(_taglib: TaglibLookup, _document: TextDocument, params: CompletionParams, event: ParserEvents.OpenTag): CompletionList | undefined;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type CompletionParams, CompletionList } from "vscode-languageserver";
|
|
2
|
-
import type { TextDocument } from "vscode-languageserver-textdocument";
|
|
3
|
-
import type { ParserEvents } from "../../htmljs-parser";
|
|
4
|
-
import type { TaglibLookup } from "../../compiler";
|
|
5
|
-
export declare function openTagName(taglib: TaglibLookup, document: TextDocument, params: CompletionParams, event: ParserEvents.OpenTagName): CompletionList;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type CompletionParams } from "vscode-languageserver";
|
|
2
|
-
import { TextDocument } from "vscode-languageserver-textdocument";
|
|
3
|
-
import type { ParserEvents } from "../../htmljs-parser";
|
|
4
|
-
import type { TaglibLookup } from "../../compiler";
|
|
5
|
-
export declare function styleContent(_taglib: TaglibLookup, document: TextDocument, params: CompletionParams, event: ParserEvents.StyleContent): import("vscode-languageserver").CompletionList;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type TextDocumentPositionParams, LocationLink } from "vscode-languageserver";
|
|
2
|
-
import type { TextDocument } from "vscode-languageserver-textdocument";
|
|
3
|
-
import type { TaglibLookup } from "../../compiler";
|
|
4
|
-
import type { ParserEvents } from "../../htmljs-parser";
|
|
5
|
-
export declare function attributeName(taglib: TaglibLookup, document: TextDocument, _params: TextDocumentPositionParams, event: ParserEvents.AttributeName): LocationLink[] | undefined;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type TextDocumentPositionParams, LocationLink } from "vscode-languageserver";
|
|
2
|
-
import type { TextDocument } from "vscode-languageserver-textdocument";
|
|
3
|
-
import type { ParserEvents } from "../../htmljs-parser";
|
|
4
|
-
import type { TaglibLookup } from "../../compiler";
|
|
5
|
-
export declare function openTagName(taglib: TaglibLookup, document: TextDocument, _params: TextDocumentPositionParams, event: ParserEvents.OpenTagName): LocationLink[] | undefined;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import type { TaglibLookup } from "./compiler";
|
|
2
|
-
export declare namespace ParserEvents {
|
|
3
|
-
export interface Error {
|
|
4
|
-
type: "error";
|
|
5
|
-
code: string;
|
|
6
|
-
message: string;
|
|
7
|
-
pos: number;
|
|
8
|
-
endPos: number;
|
|
9
|
-
}
|
|
10
|
-
export interface OpenTagName extends Tag {
|
|
11
|
-
type: "openTagName";
|
|
12
|
-
}
|
|
13
|
-
export interface OpenTag extends Tag {
|
|
14
|
-
type: "openTag";
|
|
15
|
-
argument: {
|
|
16
|
-
pos: number;
|
|
17
|
-
endPos: number;
|
|
18
|
-
value: string;
|
|
19
|
-
} | undefined;
|
|
20
|
-
params: {
|
|
21
|
-
pos: number;
|
|
22
|
-
endPos: number;
|
|
23
|
-
value: string;
|
|
24
|
-
} | undefined;
|
|
25
|
-
shorthandClassNames: {
|
|
26
|
-
value: string;
|
|
27
|
-
rawParts: {
|
|
28
|
-
text: string;
|
|
29
|
-
pos: number;
|
|
30
|
-
endPos: number;
|
|
31
|
-
}[];
|
|
32
|
-
}[] | undefined;
|
|
33
|
-
attributes: Attribute[];
|
|
34
|
-
nestedTags: {
|
|
35
|
-
[x: string]: Tag;
|
|
36
|
-
} | undefined;
|
|
37
|
-
openTagOnly: boolean;
|
|
38
|
-
selfClosed: boolean;
|
|
39
|
-
tagNameEndPos: number;
|
|
40
|
-
isNestedTag: boolean;
|
|
41
|
-
isRepeated: boolean;
|
|
42
|
-
targetProperty: string | undefined;
|
|
43
|
-
}
|
|
44
|
-
export interface CloseTag {
|
|
45
|
-
type: "closeTag";
|
|
46
|
-
tagName: string;
|
|
47
|
-
pos: number;
|
|
48
|
-
endPos: number;
|
|
49
|
-
}
|
|
50
|
-
export interface Placeholder {
|
|
51
|
-
type: "placeholder";
|
|
52
|
-
escape: boolean;
|
|
53
|
-
pos: number;
|
|
54
|
-
endPos: number;
|
|
55
|
-
value: string;
|
|
56
|
-
withinTagName: string;
|
|
57
|
-
withinOpenTag: string;
|
|
58
|
-
withinAttribute: boolean;
|
|
59
|
-
withinBody: boolean;
|
|
60
|
-
withinString: boolean;
|
|
61
|
-
}
|
|
62
|
-
export interface AttributeName {
|
|
63
|
-
type: "attributeName";
|
|
64
|
-
tag: OpenTag;
|
|
65
|
-
name: string;
|
|
66
|
-
pos: number;
|
|
67
|
-
endPos: number;
|
|
68
|
-
}
|
|
69
|
-
export interface AttributeModifier {
|
|
70
|
-
type: "attributeModifier";
|
|
71
|
-
tag: OpenTag;
|
|
72
|
-
name: string;
|
|
73
|
-
modifier: string;
|
|
74
|
-
pos: number;
|
|
75
|
-
endPos: number;
|
|
76
|
-
}
|
|
77
|
-
export interface AttributeValue {
|
|
78
|
-
type: "attributeValue";
|
|
79
|
-
tag: OpenTag;
|
|
80
|
-
name: string;
|
|
81
|
-
value: string;
|
|
82
|
-
pos: number;
|
|
83
|
-
endPos: number;
|
|
84
|
-
}
|
|
85
|
-
export interface Text {
|
|
86
|
-
type: "text";
|
|
87
|
-
value: string;
|
|
88
|
-
pos: number;
|
|
89
|
-
endPos: number;
|
|
90
|
-
parent: OpenTag | null;
|
|
91
|
-
}
|
|
92
|
-
export interface StyleContent {
|
|
93
|
-
type: "styleContent";
|
|
94
|
-
language: "css" | "less" | "scss";
|
|
95
|
-
block: boolean;
|
|
96
|
-
content: string;
|
|
97
|
-
pos: number;
|
|
98
|
-
endPos: number;
|
|
99
|
-
}
|
|
100
|
-
export type Any = Error | OpenTagName | OpenTag | CloseTag | Placeholder | AttributeName | AttributeModifier | AttributeValue | Text | StyleContent;
|
|
101
|
-
interface Tag {
|
|
102
|
-
tagName: string;
|
|
103
|
-
tagNameExpression: string | undefined;
|
|
104
|
-
emptyTagName: boolean;
|
|
105
|
-
concise: boolean;
|
|
106
|
-
pos: number;
|
|
107
|
-
endPos: number;
|
|
108
|
-
parent: OpenTag | null;
|
|
109
|
-
}
|
|
110
|
-
interface Attribute {
|
|
111
|
-
name: string;
|
|
112
|
-
argument: {
|
|
113
|
-
pos: number;
|
|
114
|
-
endPos: number;
|
|
115
|
-
value: string;
|
|
116
|
-
} | undefined;
|
|
117
|
-
value: string | undefined;
|
|
118
|
-
pos: number;
|
|
119
|
-
endPos: number;
|
|
120
|
-
}
|
|
121
|
-
export {};
|
|
122
|
-
}
|
|
123
|
-
export declare function parseUntilOffset(options: {
|
|
124
|
-
offset: number;
|
|
125
|
-
text: string;
|
|
126
|
-
taglib: TaglibLookup;
|
|
127
|
-
includeErrors?: boolean;
|
|
128
|
-
}): ParserEvents.Any | null;
|