yapp 5.1.294 → 5.1.296
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/.aiignore +12 -0
- package/.swcrc +4 -3
- package/example.js +7037 -12028
- package/lib/colours.js +26 -26
- package/lib/constants.js +9 -9
- package/lib/customEventTypes.js +2 -2
- package/lib/defaults.js +8 -8
- package/lib/div/gutter.js +49 -253
- package/lib/div/lineNumbers.js +42 -197
- package/lib/div/pretty.js +55 -257
- package/lib/div/syntax.js +78 -253
- package/lib/example/constants.js +2 -2
- package/lib/example/view/div/sizeable/left.js +12 -104
- package/lib/example/view/div/sizeable/middle.js +12 -104
- package/lib/example/view/div/sizeable/right.js +12 -104
- package/lib/example/view/div/sizeable/top.js +12 -104
- package/lib/example/view/input.js +11 -23
- package/lib/example/view/javascript.js +32 -86
- package/lib/example/view/json.js +20 -87
- package/lib/example/view/plainText.js +9 -87
- package/lib/example/view/subHeading.js +13 -23
- package/lib/example/view/textarea/bnf.js +21 -124
- package/lib/example/view/textarea/lexicalEntries.js +21 -124
- package/lib/example/view/textarea/parseTree.js +27 -130
- package/lib/example/view/textarea/tokens.js +40 -143
- package/lib/example/view/textarea.js +15 -23
- package/lib/example/view/xml.js +24 -87
- package/lib/example/view.js +85 -258
- package/lib/example/yapp.js +8 -86
- package/lib/example.js +11 -11
- package/lib/index.js +10 -10
- package/lib/languages.js +5 -5
- package/lib/lexer/javascript.js +21 -121
- package/lib/lexer/json.js +21 -121
- package/lib/lexer/plainText.js +21 -121
- package/lib/lexer/xml.js +21 -121
- package/lib/mixins/style.js +27 -27
- package/lib/parser/javascript.js +276 -115
- package/lib/parser/json.js +30 -110
- package/lib/parser/plainText.js +14 -110
- package/lib/parser/xml.js +55 -111
- package/lib/plugin/javascript.js +13 -156
- package/lib/plugin/json.js +13 -156
- package/lib/plugin/plainText.js +13 -156
- package/lib/plugin/xml.js +13 -156
- package/lib/plugin.js +41 -98
- package/lib/prettyPrinter.js +81 -273
- package/lib/processor/javascript.js +64 -153
- package/lib/processor/json.js +17 -105
- package/lib/processor/plainText.js +8 -96
- package/lib/processor/xml.js +32 -120
- package/lib/processor.js +53 -103
- package/lib/renderYappStyles.js +6 -6
- package/lib/richTextarea.js +66 -182
- package/lib/scheme/colour.js +17 -17
- package/lib/scheme/syntax/default.js +6 -6
- package/lib/scheme/syntax/javaScript.js +6 -6
- package/lib/scheme/syntax/json.js +3 -3
- package/lib/scheme/syntax/xml.js +4 -4
- package/lib/style/firaCode.js +18 -7
- package/lib/style/syntax/default.js +33 -5
- package/lib/style/syntax/javaScript.js +14 -4
- package/lib/style/syntax/json.js +8 -4
- package/lib/style/syntax/xml.js +10 -4
- package/lib/style/syntax.js +17 -7
- package/lib/style/yapp.js +70 -5
- package/lib/styles.js +3 -3
- package/lib/token/significant/argument.js +7 -91
- package/lib/token/significant/attribute.js +7 -91
- package/lib/token/significant/comment.js +7 -91
- package/lib/token/significant/error.js +7 -91
- package/lib/token/significant/jsx/attributeName.js +7 -91
- package/lib/token/significant/jsx/tagName.js +7 -91
- package/lib/token/significant/name.js +7 -91
- package/lib/token/significant/string.js +7 -91
- package/lib/token/significant/variable.js +7 -91
- package/lib/tokenTypes.js +9 -9
- package/lib/utilities/configuration.js +4 -6
- package/lib/utilities/content.js +10 -10
- package/lib/utilities/css.js +5 -5
- package/lib/utilities/element.js +5 -5
- package/lib/utilities/plugin.js +10 -11
- package/lib/utilities/rules.js +6 -6
- package/lib/utilities/scrollbar.js +7 -7
- package/lib/utilities/tokens.js +4 -4
- package/lib/yapp.js +115 -337
- package/package.json +3 -3
package/lib/plugin/json.js
CHANGED
|
@@ -8,167 +8,24 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return JSONPlugin;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function _assert_this_initialized(self) {
|
|
17
|
-
if (self === void 0) {
|
|
18
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19
|
-
}
|
|
20
|
-
return self;
|
|
21
|
-
}
|
|
22
|
-
function _call_super(_this, derived, args) {
|
|
23
|
-
derived = _get_prototype_of(derived);
|
|
24
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
25
|
-
}
|
|
26
|
-
function _class_call_check(instance, Constructor) {
|
|
27
|
-
if (!(instance instanceof Constructor)) {
|
|
28
|
-
throw new TypeError("Cannot call a class as a function");
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function _construct(Parent, args, Class) {
|
|
32
|
-
if (_is_native_reflect_construct()) {
|
|
33
|
-
_construct = Reflect.construct;
|
|
34
|
-
} else {
|
|
35
|
-
_construct = function construct(Parent, args, Class) {
|
|
36
|
-
var a = [
|
|
37
|
-
null
|
|
38
|
-
];
|
|
39
|
-
a.push.apply(a, args);
|
|
40
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
41
|
-
var instance = new Constructor();
|
|
42
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
43
|
-
return instance;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
return _construct.apply(null, arguments);
|
|
47
|
-
}
|
|
48
|
-
function _defineProperties(target, props) {
|
|
49
|
-
for(var i = 0; i < props.length; i++){
|
|
50
|
-
var descriptor = props[i];
|
|
51
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
52
|
-
descriptor.configurable = true;
|
|
53
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
54
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
58
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
59
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
60
|
-
return Constructor;
|
|
61
|
-
}
|
|
62
|
-
function _define_property(obj, key, value) {
|
|
63
|
-
if (key in obj) {
|
|
64
|
-
Object.defineProperty(obj, key, {
|
|
65
|
-
value: value,
|
|
66
|
-
enumerable: true,
|
|
67
|
-
configurable: true,
|
|
68
|
-
writable: true
|
|
69
|
-
});
|
|
70
|
-
} else {
|
|
71
|
-
obj[key] = value;
|
|
72
|
-
}
|
|
73
|
-
return obj;
|
|
74
|
-
}
|
|
75
|
-
function _get_prototype_of(o) {
|
|
76
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
77
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
78
|
-
};
|
|
79
|
-
return _get_prototype_of(o);
|
|
80
|
-
}
|
|
81
|
-
function _inherits(subClass, superClass) {
|
|
82
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
83
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
84
|
-
}
|
|
85
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
86
|
-
constructor: {
|
|
87
|
-
value: subClass,
|
|
88
|
-
writable: true,
|
|
89
|
-
configurable: true
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
93
|
-
}
|
|
11
|
+
const _plugin = /*#__PURE__*/ _interop_require_default(require("../plugin"));
|
|
12
|
+
const _json = /*#__PURE__*/ _interop_require_default(require("../lexer/json"));
|
|
13
|
+
const _json1 = /*#__PURE__*/ _interop_require_default(require("../parser/json"));
|
|
14
|
+
const _json2 = /*#__PURE__*/ _interop_require_default(require("../processor/json"));
|
|
15
|
+
const _languages = require("../languages");
|
|
94
16
|
function _interop_require_default(obj) {
|
|
95
17
|
return obj && obj.__esModule ? obj : {
|
|
96
18
|
default: obj
|
|
97
19
|
};
|
|
98
20
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
21
|
+
class JSONPlugin extends _plugin.default {
|
|
22
|
+
static language = _languages.JSON_LANGUAGE;
|
|
23
|
+
static Lexer = _json.default;
|
|
24
|
+
static Parser = _json1.default;
|
|
25
|
+
static Processor = _json2.default;
|
|
26
|
+
static fromNothing() {
|
|
27
|
+
return _plugin.default.fromNothing(JSONPlugin);
|
|
105
28
|
}
|
|
106
|
-
return _assert_this_initialized(self);
|
|
107
|
-
}
|
|
108
|
-
function _set_prototype_of(o, p) {
|
|
109
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
110
|
-
o.__proto__ = p;
|
|
111
|
-
return o;
|
|
112
|
-
};
|
|
113
|
-
return _set_prototype_of(o, p);
|
|
114
|
-
}
|
|
115
|
-
function _type_of(obj) {
|
|
116
|
-
"@swc/helpers - typeof";
|
|
117
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
118
|
-
}
|
|
119
|
-
function _wrap_native_super(Class) {
|
|
120
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
121
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
122
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
123
|
-
if (typeof Class !== "function") {
|
|
124
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
125
|
-
}
|
|
126
|
-
if (typeof _cache !== "undefined") {
|
|
127
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
128
|
-
_cache.set(Class, Wrapper);
|
|
129
|
-
}
|
|
130
|
-
function Wrapper() {
|
|
131
|
-
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
132
|
-
}
|
|
133
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
134
|
-
constructor: {
|
|
135
|
-
value: Wrapper,
|
|
136
|
-
enumerable: false,
|
|
137
|
-
writable: true,
|
|
138
|
-
configurable: true
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
return _set_prototype_of(Wrapper, Class);
|
|
142
|
-
};
|
|
143
|
-
return _wrap_native_super(Class);
|
|
144
|
-
}
|
|
145
|
-
function _is_native_reflect_construct() {
|
|
146
|
-
try {
|
|
147
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
148
|
-
} catch (_) {}
|
|
149
|
-
return (_is_native_reflect_construct = function() {
|
|
150
|
-
return !!result;
|
|
151
|
-
})();
|
|
152
29
|
}
|
|
153
|
-
var JSONPlugin = /*#__PURE__*/ function(Plugin) {
|
|
154
|
-
_inherits(JSONPlugin, Plugin);
|
|
155
|
-
function JSONPlugin() {
|
|
156
|
-
_class_call_check(this, JSONPlugin);
|
|
157
|
-
return _call_super(this, JSONPlugin, arguments);
|
|
158
|
-
}
|
|
159
|
-
_create_class(JSONPlugin, null, [
|
|
160
|
-
{
|
|
161
|
-
key: "fromNothing",
|
|
162
|
-
value: function fromNothing() {
|
|
163
|
-
return _plugin.default.fromNothing(JSONPlugin);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
]);
|
|
167
|
-
return JSONPlugin;
|
|
168
|
-
}(_wrap_native_super(_plugin.default));
|
|
169
|
-
_define_property(JSONPlugin, "language", _languages.JSON_LANGUAGE);
|
|
170
|
-
_define_property(JSONPlugin, "Lexer", _json.default);
|
|
171
|
-
_define_property(JSONPlugin, "Parser", _json1.default);
|
|
172
|
-
_define_property(JSONPlugin, "Processor", _json2.default);
|
|
173
30
|
|
|
174
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wbHVnaW4vanNvbi5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IFBsdWdpbiBmcm9tIFwiLi4vcGx1Z2luXCI7XG5pbXBvcnQgSlNPTkxleGVyIGZyb20gXCIuLi9sZXhlci9qc29uXCI7XG5pbXBvcnQgSlNPTl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xXQUFXLENBQUNWO0lBQWE7QUFDaEUifQ==
|
package/lib/plugin/plainText.js
CHANGED
|
@@ -8,167 +8,24 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return PlainTextPlugin;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function _assert_this_initialized(self) {
|
|
17
|
-
if (self === void 0) {
|
|
18
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19
|
-
}
|
|
20
|
-
return self;
|
|
21
|
-
}
|
|
22
|
-
function _call_super(_this, derived, args) {
|
|
23
|
-
derived = _get_prototype_of(derived);
|
|
24
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
25
|
-
}
|
|
26
|
-
function _class_call_check(instance, Constructor) {
|
|
27
|
-
if (!(instance instanceof Constructor)) {
|
|
28
|
-
throw new TypeError("Cannot call a class as a function");
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function _construct(Parent, args, Class) {
|
|
32
|
-
if (_is_native_reflect_construct()) {
|
|
33
|
-
_construct = Reflect.construct;
|
|
34
|
-
} else {
|
|
35
|
-
_construct = function construct(Parent, args, Class) {
|
|
36
|
-
var a = [
|
|
37
|
-
null
|
|
38
|
-
];
|
|
39
|
-
a.push.apply(a, args);
|
|
40
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
41
|
-
var instance = new Constructor();
|
|
42
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
43
|
-
return instance;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
return _construct.apply(null, arguments);
|
|
47
|
-
}
|
|
48
|
-
function _defineProperties(target, props) {
|
|
49
|
-
for(var i = 0; i < props.length; i++){
|
|
50
|
-
var descriptor = props[i];
|
|
51
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
52
|
-
descriptor.configurable = true;
|
|
53
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
54
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
58
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
59
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
60
|
-
return Constructor;
|
|
61
|
-
}
|
|
62
|
-
function _define_property(obj, key, value) {
|
|
63
|
-
if (key in obj) {
|
|
64
|
-
Object.defineProperty(obj, key, {
|
|
65
|
-
value: value,
|
|
66
|
-
enumerable: true,
|
|
67
|
-
configurable: true,
|
|
68
|
-
writable: true
|
|
69
|
-
});
|
|
70
|
-
} else {
|
|
71
|
-
obj[key] = value;
|
|
72
|
-
}
|
|
73
|
-
return obj;
|
|
74
|
-
}
|
|
75
|
-
function _get_prototype_of(o) {
|
|
76
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
77
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
78
|
-
};
|
|
79
|
-
return _get_prototype_of(o);
|
|
80
|
-
}
|
|
81
|
-
function _inherits(subClass, superClass) {
|
|
82
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
83
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
84
|
-
}
|
|
85
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
86
|
-
constructor: {
|
|
87
|
-
value: subClass,
|
|
88
|
-
writable: true,
|
|
89
|
-
configurable: true
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
93
|
-
}
|
|
11
|
+
const _plugin = /*#__PURE__*/ _interop_require_default(require("../plugin"));
|
|
12
|
+
const _plainText = /*#__PURE__*/ _interop_require_default(require("../lexer/plainText"));
|
|
13
|
+
const _plainText1 = /*#__PURE__*/ _interop_require_default(require("../parser/plainText"));
|
|
14
|
+
const _plainText2 = /*#__PURE__*/ _interop_require_default(require("../processor/plainText"));
|
|
15
|
+
const _languages = require("../languages");
|
|
94
16
|
function _interop_require_default(obj) {
|
|
95
17
|
return obj && obj.__esModule ? obj : {
|
|
96
18
|
default: obj
|
|
97
19
|
};
|
|
98
20
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
21
|
+
class PlainTextPlugin extends _plugin.default {
|
|
22
|
+
static language = _languages.PLAIN_TEXT_LANGUAGE;
|
|
23
|
+
static Lexer = _plainText.default;
|
|
24
|
+
static Parser = _plainText1.default;
|
|
25
|
+
static Processor = _plainText2.default;
|
|
26
|
+
static fromNothing() {
|
|
27
|
+
return _plugin.default.fromNothing(PlainTextPlugin);
|
|
105
28
|
}
|
|
106
|
-
return _assert_this_initialized(self);
|
|
107
|
-
}
|
|
108
|
-
function _set_prototype_of(o, p) {
|
|
109
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
110
|
-
o.__proto__ = p;
|
|
111
|
-
return o;
|
|
112
|
-
};
|
|
113
|
-
return _set_prototype_of(o, p);
|
|
114
|
-
}
|
|
115
|
-
function _type_of(obj) {
|
|
116
|
-
"@swc/helpers - typeof";
|
|
117
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
118
|
-
}
|
|
119
|
-
function _wrap_native_super(Class) {
|
|
120
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
121
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
122
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
123
|
-
if (typeof Class !== "function") {
|
|
124
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
125
|
-
}
|
|
126
|
-
if (typeof _cache !== "undefined") {
|
|
127
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
128
|
-
_cache.set(Class, Wrapper);
|
|
129
|
-
}
|
|
130
|
-
function Wrapper() {
|
|
131
|
-
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
132
|
-
}
|
|
133
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
134
|
-
constructor: {
|
|
135
|
-
value: Wrapper,
|
|
136
|
-
enumerable: false,
|
|
137
|
-
writable: true,
|
|
138
|
-
configurable: true
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
return _set_prototype_of(Wrapper, Class);
|
|
142
|
-
};
|
|
143
|
-
return _wrap_native_super(Class);
|
|
144
|
-
}
|
|
145
|
-
function _is_native_reflect_construct() {
|
|
146
|
-
try {
|
|
147
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
148
|
-
} catch (_) {}
|
|
149
|
-
return (_is_native_reflect_construct = function() {
|
|
150
|
-
return !!result;
|
|
151
|
-
})();
|
|
152
29
|
}
|
|
153
|
-
var PlainTextPlugin = /*#__PURE__*/ function(Plugin) {
|
|
154
|
-
_inherits(PlainTextPlugin, Plugin);
|
|
155
|
-
function PlainTextPlugin() {
|
|
156
|
-
_class_call_check(this, PlainTextPlugin);
|
|
157
|
-
return _call_super(this, PlainTextPlugin, arguments);
|
|
158
|
-
}
|
|
159
|
-
_create_class(PlainTextPlugin, null, [
|
|
160
|
-
{
|
|
161
|
-
key: "fromNothing",
|
|
162
|
-
value: function fromNothing() {
|
|
163
|
-
return _plugin.default.fromNothing(PlainTextPlugin);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
]);
|
|
167
|
-
return PlainTextPlugin;
|
|
168
|
-
}(_wrap_native_super(_plugin.default));
|
|
169
|
-
_define_property(PlainTextPlugin, "language", _languages.PLAIN_TEXT_LANGUAGE);
|
|
170
|
-
_define_property(PlainTextPlugin, "Lexer", _plainText.default);
|
|
171
|
-
_define_property(PlainTextPlugin, "Parser", _plainText1.default);
|
|
172
|
-
_define_property(PlainTextPlugin, "Processor", _plainText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GV4dExleGVyIiwiUGFyc2VyIiwiUGxhaW5UZXh0UGFyc2VyIiwiUHJvY2Vzc29yIiwiUGxhaW5UZXh0UHJvY2Vzc29yIiwiZnJvbU5vdGhpbmciXSwibWFwcGluZ3MiOiJBQUFBOzs7OytCQVNBOzs7ZUFBcUJBOzs7K0RBUEY7a0VBQ1E7bUVBQ0M7bUVBQ0c7MkJBRUs7Ozs7OztBQUVyQixNQUFNQSx3QkFBd0JDLGVBQU07SUFDakQsT0FBT0MsV0FBV0MsOEJBQW1CLENBQUM7SUFFdEMsT0FBT0MsUUFBUUMsa0JBQWMsQ0FBQztJQUU5QixPQUFPQyxTQUFTQyxtQkFBZSxDQUFDO0lBRWhDLE9BQU9DLFlBQVlDLG1CQUFrQixDQUFDO0lBRXRDLE9BQU9DLGNBQWM7UUFBRSxPQUFPVCxlQUFNLENBQUNTLFdBQVcsQ0FBQ1Y7SUFBa0I7QUFDckUifQ==
|
package/lib/plugin/xml.js
CHANGED
|
@@ -8,167 +8,24 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return XMLPlugin;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function _assert_this_initialized(self) {
|
|
17
|
-
if (self === void 0) {
|
|
18
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19
|
-
}
|
|
20
|
-
return self;
|
|
21
|
-
}
|
|
22
|
-
function _call_super(_this, derived, args) {
|
|
23
|
-
derived = _get_prototype_of(derived);
|
|
24
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
25
|
-
}
|
|
26
|
-
function _class_call_check(instance, Constructor) {
|
|
27
|
-
if (!(instance instanceof Constructor)) {
|
|
28
|
-
throw new TypeError("Cannot call a class as a function");
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function _construct(Parent, args, Class) {
|
|
32
|
-
if (_is_native_reflect_construct()) {
|
|
33
|
-
_construct = Reflect.construct;
|
|
34
|
-
} else {
|
|
35
|
-
_construct = function construct(Parent, args, Class) {
|
|
36
|
-
var a = [
|
|
37
|
-
null
|
|
38
|
-
];
|
|
39
|
-
a.push.apply(a, args);
|
|
40
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
41
|
-
var instance = new Constructor();
|
|
42
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
43
|
-
return instance;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
return _construct.apply(null, arguments);
|
|
47
|
-
}
|
|
48
|
-
function _defineProperties(target, props) {
|
|
49
|
-
for(var i = 0; i < props.length; i++){
|
|
50
|
-
var descriptor = props[i];
|
|
51
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
52
|
-
descriptor.configurable = true;
|
|
53
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
54
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
58
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
59
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
60
|
-
return Constructor;
|
|
61
|
-
}
|
|
62
|
-
function _define_property(obj, key, value) {
|
|
63
|
-
if (key in obj) {
|
|
64
|
-
Object.defineProperty(obj, key, {
|
|
65
|
-
value: value,
|
|
66
|
-
enumerable: true,
|
|
67
|
-
configurable: true,
|
|
68
|
-
writable: true
|
|
69
|
-
});
|
|
70
|
-
} else {
|
|
71
|
-
obj[key] = value;
|
|
72
|
-
}
|
|
73
|
-
return obj;
|
|
74
|
-
}
|
|
75
|
-
function _get_prototype_of(o) {
|
|
76
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
77
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
78
|
-
};
|
|
79
|
-
return _get_prototype_of(o);
|
|
80
|
-
}
|
|
81
|
-
function _inherits(subClass, superClass) {
|
|
82
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
83
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
84
|
-
}
|
|
85
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
86
|
-
constructor: {
|
|
87
|
-
value: subClass,
|
|
88
|
-
writable: true,
|
|
89
|
-
configurable: true
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
93
|
-
}
|
|
11
|
+
const _plugin = /*#__PURE__*/ _interop_require_default(require("../plugin"));
|
|
12
|
+
const _xml = /*#__PURE__*/ _interop_require_default(require("../lexer/xml"));
|
|
13
|
+
const _xml1 = /*#__PURE__*/ _interop_require_default(require("../parser/xml"));
|
|
14
|
+
const _xml2 = /*#__PURE__*/ _interop_require_default(require("../processor/xml"));
|
|
15
|
+
const _languages = require("../languages");
|
|
94
16
|
function _interop_require_default(obj) {
|
|
95
17
|
return obj && obj.__esModule ? obj : {
|
|
96
18
|
default: obj
|
|
97
19
|
};
|
|
98
20
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
21
|
+
class XMLPlugin extends _plugin.default {
|
|
22
|
+
static language = _languages.XML_LANGUAGE;
|
|
23
|
+
static Lexer = _xml.default;
|
|
24
|
+
static Parser = _xml1.default;
|
|
25
|
+
static Processor = _xml2.default;
|
|
26
|
+
static fromNothing() {
|
|
27
|
+
return _plugin.default.fromNothing(XMLPlugin);
|
|
105
28
|
}
|
|
106
|
-
return _assert_this_initialized(self);
|
|
107
|
-
}
|
|
108
|
-
function _set_prototype_of(o, p) {
|
|
109
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
110
|
-
o.__proto__ = p;
|
|
111
|
-
return o;
|
|
112
|
-
};
|
|
113
|
-
return _set_prototype_of(o, p);
|
|
114
|
-
}
|
|
115
|
-
function _type_of(obj) {
|
|
116
|
-
"@swc/helpers - typeof";
|
|
117
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
118
|
-
}
|
|
119
|
-
function _wrap_native_super(Class) {
|
|
120
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
121
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
122
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
123
|
-
if (typeof Class !== "function") {
|
|
124
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
125
|
-
}
|
|
126
|
-
if (typeof _cache !== "undefined") {
|
|
127
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
128
|
-
_cache.set(Class, Wrapper);
|
|
129
|
-
}
|
|
130
|
-
function Wrapper() {
|
|
131
|
-
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
132
|
-
}
|
|
133
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
134
|
-
constructor: {
|
|
135
|
-
value: Wrapper,
|
|
136
|
-
enumerable: false,
|
|
137
|
-
writable: true,
|
|
138
|
-
configurable: true
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
return _set_prototype_of(Wrapper, Class);
|
|
142
|
-
};
|
|
143
|
-
return _wrap_native_super(Class);
|
|
144
|
-
}
|
|
145
|
-
function _is_native_reflect_construct() {
|
|
146
|
-
try {
|
|
147
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
148
|
-
} catch (_) {}
|
|
149
|
-
return (_is_native_reflect_construct = function() {
|
|
150
|
-
return !!result;
|
|
151
|
-
})();
|
|
152
29
|
}
|
|
153
|
-
var XMLPlugin = /*#__PURE__*/ function(Plugin) {
|
|
154
|
-
_inherits(XMLPlugin, Plugin);
|
|
155
|
-
function XMLPlugin() {
|
|
156
|
-
_class_call_check(this, XMLPlugin);
|
|
157
|
-
return _call_super(this, XMLPlugin, arguments);
|
|
158
|
-
}
|
|
159
|
-
_create_class(XMLPlugin, null, [
|
|
160
|
-
{
|
|
161
|
-
key: "fromNothing",
|
|
162
|
-
value: function fromNothing() {
|
|
163
|
-
return _plugin.default.fromNothing(XMLPlugin);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
]);
|
|
167
|
-
return XMLPlugin;
|
|
168
|
-
}(_wrap_native_super(_plugin.default));
|
|
169
|
-
_define_property(XMLPlugin, "language", _languages.XML_LANGUAGE);
|
|
170
|
-
_define_property(XMLPlugin, "Lexer", _xml.default);
|
|
171
|
-
_define_property(XMLPlugin, "Parser", _xml1.default);
|
|
172
|
-
_define_property(XMLPlugin, "Processor", _xml2.default);
|
|
173
30
|
|
|
174
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wbHVnaW4veG1sLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgUGx1Z2luIGZyb20gXCIuLi9wbHVnaW5cIjtcbmltcG9ydCBYTUxMZXhlciBmcm9tIFwiLi4vbGV4ZXIveG1sXCI7XG5pbXBvcnQgWE1MUGFyc2VyIGZyb20gXCIuLi9wYXJzZXIveG1sXCI7XG5pbXBvcnQgWE1MUHJvY2Vzc29yIGZyb20gXCIuLi9wcm9jZXNzb3IveG1sXCI7XG5cbmltcG9ydCB7IFhNTF9MQU5HVUFHRSB9IGZyb20gXCIuLi9sYW5ndWFnZXNcIlxuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBYTUxQbHVnaW4gZXh0ZW5kcyBQbHVnaW4ge1xuICBzdGF0aWMgbGFuZ3VhZ2UgPSBYTUxfTEFOR1VBR0U7XG5cbiAgc3RhdGljIExleGVyID0gWE1MTGV4ZXI7XG5cbiAgc3RhdGljIFBh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