We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f57268 commit 2341ea3Copy full SHA for 2341ea3
ast/node.ts
@@ -1,7 +1,11 @@
1
+import { Position } from "./token.ts";
2
+
3
export interface Rule {
- type: "rule";
4
+ type: string;
5
+ text?: string;
6
selectors: string[];
7
declarations: Decl[];
8
+ position?: Position;
9
}
10
11
export interface Decl {
example.ts
@@ -1,3 +1,6 @@
import { parse } from "./core/parser/parser.ts";
-var ast = parse("p { color: black; }", {});
+var ast = parse(
+ "/* comment */ p { color: black; }",
+ { position: true, comments: true },
+);
console.log(ast);
0 commit comments