Skip to content

Commit 3d10cb7

Browse files
committed
remove token.raw
1 parent b76c9a5 commit 3d10cb7

File tree

5 files changed

+0
-12
lines changed

5 files changed

+0
-12
lines changed

src/ast/tokens.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,4 @@ export interface Token extends HasLocation {
1818
* Processed values.
1919
*/
2020
value: string
21-
22-
/**
23-
* Raw values.
24-
*/
25-
raw: string
2621
}

src/html/parser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ export class Parser {
164164
loc: {start: token.loc.start, end: token.loc.end},
165165
parent: parentElement,
166166
value: token.value,
167-
raw: token.raw,
168167
})
169168
parentElement.children.push(text)
170169
}

src/html/tokenizer.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ export class Tokenizer {
232232
range: [offset, offset],
233233
loc: {start: {line, column}, end: {line, column}},
234234
value: "",
235-
raw: "",
236235
}
237236
}
238237
return this.currentToken
@@ -365,7 +364,6 @@ export class Tokenizer {
365364
end: {line: -1, column: -1},
366365
},
367366
value: "",
368-
raw: "",
369367
}
370368

371369
debug("[html] start token: %d %s", offset, token.type)
@@ -402,7 +400,6 @@ export class Tokenizer {
402400
token.range[1] = offset
403401
token.loc.end.line = line
404402
token.loc.end.column = column
405-
token.raw = this.text.slice(token.range[0], token.range[1])
406403

407404
if (provisional) {
408405
this.provisionalTokens.push(token)

src/script/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ export function parseScriptElement(node: VElement, globalLocationCalculator: Loc
178178
range: startTag.range,
179179
loc: startTag.loc,
180180
value: "<script>",
181-
raw: "<script>",
182181
})
183182
}
184183
if (endTag != null) {
@@ -187,7 +186,6 @@ export function parseScriptElement(node: VElement, globalLocationCalculator: Loc
187186
range: endTag.range,
188187
loc: endTag.loc,
189188
value: "</script>",
190-
raw: "</script>",
191189
})
192190
}
193191
}

src/template/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,6 @@ export class TemplateTransformer {
522522
end: this.locationCalculator.getLocation(end),
523523
},
524524
value,
525-
raw: value,
526525
}
527526
}
528527

0 commit comments

Comments
 (0)