first commit
This commit is contained in:
34
build/node_modules/css-tree/lib/syntax/node/Raw.js
generated
vendored
Normal file
34
build/node_modules/css-tree/lib/syntax/node/Raw.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
module.exports = {
|
||||
name: 'Raw',
|
||||
structure: {
|
||||
value: String
|
||||
},
|
||||
parse: function(startToken, endTokenType1, endTokenType2, includeTokenType2, excludeWhiteSpace) {
|
||||
var startOffset = this.scanner.getTokenStart(startToken);
|
||||
var endOffset;
|
||||
|
||||
this.scanner.skip(
|
||||
this.scanner.getRawLength(
|
||||
startToken,
|
||||
endTokenType1,
|
||||
endTokenType2,
|
||||
includeTokenType2
|
||||
)
|
||||
);
|
||||
|
||||
if (excludeWhiteSpace && this.scanner.tokenStart > startOffset) {
|
||||
endOffset = this.scanner.getOffsetExcludeWS();
|
||||
} else {
|
||||
endOffset = this.scanner.tokenStart;
|
||||
}
|
||||
|
||||
return {
|
||||
type: 'Raw',
|
||||
loc: this.getLocation(startOffset, endOffset),
|
||||
value: this.scanner.source.substring(startOffset, endOffset)
|
||||
};
|
||||
},
|
||||
generate: function(processChunk, node) {
|
||||
processChunk(node.value);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user