Last change
on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
653 bytes
|
Line | |
---|
1 | /*
|
---|
2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
---|
3 | Author Tobias Koppers @sokra
|
---|
4 | */
|
---|
5 | "use strict";
|
---|
6 |
|
---|
7 | var Source = require("./Source");
|
---|
8 | var SourceNode = require("source-map").SourceNode;
|
---|
9 | var SourceListMap = require("source-list-map").SourceListMap;
|
---|
10 |
|
---|
11 | class RawSource extends Source {
|
---|
12 | constructor(value) {
|
---|
13 | super();
|
---|
14 | this._value = value;
|
---|
15 | }
|
---|
16 |
|
---|
17 | source() {
|
---|
18 | return this._value;
|
---|
19 | }
|
---|
20 |
|
---|
21 | map(options) {
|
---|
22 | return null;
|
---|
23 | }
|
---|
24 |
|
---|
25 | node(options) {
|
---|
26 | return new SourceNode(null, null, null, this._value);
|
---|
27 | }
|
---|
28 |
|
---|
29 | listMap(options) {
|
---|
30 | return new SourceListMap(this._value);
|
---|
31 | }
|
---|
32 |
|
---|
33 | updateHash(hash) {
|
---|
34 | hash.update(this._value);
|
---|
35 | }
|
---|
36 | }
|
---|
37 |
|
---|
38 | module.exports = RawSource;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.