@kontur.candy/generator 6.15.0 → 6.16.0-kl-features.0
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/dist/index.js +62 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -61344,6 +61344,60 @@ const denominatorKCLangFunction = params => {
|
|
|
61344
61344
|
|
|
61345
61345
|
/***/ }),
|
|
61346
61346
|
|
|
61347
|
+
/***/ "./Generator/src/common/KCLang/Antlr/Parser/KCLangLocationDecorator.ts":
|
|
61348
|
+
/*!*****************************************************************************!*\
|
|
61349
|
+
!*** ./Generator/src/common/KCLang/Antlr/Parser/KCLangLocationDecorator.ts ***!
|
|
61350
|
+
\*****************************************************************************/
|
|
61351
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
61352
|
+
|
|
61353
|
+
"use strict";
|
|
61354
|
+
__webpack_require__.r(__webpack_exports__);
|
|
61355
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
61356
|
+
/* harmony export */ KCLangLocationDecorator: () => (/* binding */ KCLangLocationDecorator)
|
|
61357
|
+
/* harmony export */ });
|
|
61358
|
+
/* harmony import */ var antlr4ts_ParserRuleContext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antlr4ts/ParserRuleContext */ "./node_modules/antlr4ts/ParserRuleContext.js");
|
|
61359
|
+
/* harmony import */ var antlr4ts_ParserRuleContext__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(antlr4ts_ParserRuleContext__WEBPACK_IMPORTED_MODULE_0__);
|
|
61360
|
+
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
61361
|
+
/* harmony import */ var _CodeDom_KCLangBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../CodeDom/KCLangBase */ "./Generator/src/common/KCLang/CodeDom/KCLangBase.ts");
|
|
61362
|
+
|
|
61363
|
+
|
|
61364
|
+
|
|
61365
|
+
const KCLangLocationDecorator = input => {
|
|
61366
|
+
const patchedVisitMethodEntries = Object.getOwnPropertyNames(input.prototype).map(key => {
|
|
61367
|
+
const value = input.prototype[key];
|
|
61368
|
+
return key.startsWith("visit") && typeof value == "function" ? {
|
|
61369
|
+
name: key,
|
|
61370
|
+
visitFunc: value
|
|
61371
|
+
} : undefined;
|
|
61372
|
+
}).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.isNotNullOrUndefined).map(x => {
|
|
61373
|
+
const originalFunc = x.visitFunc;
|
|
61374
|
+
const patchedFunc = function (...args) {
|
|
61375
|
+
const result = originalFunc.apply(this, args);
|
|
61376
|
+
const ctx = args[0] instanceof antlr4ts_ParserRuleContext__WEBPACK_IMPORTED_MODULE_0__.ParserRuleContext ? args[0] : undefined;
|
|
61377
|
+
if (ctx != undefined && result instanceof _CodeDom_KCLangBase__WEBPACK_IMPORTED_MODULE_2__.KCLangBase) {
|
|
61378
|
+
var _ctx$_stop$line, _ctx$_stop, _ref, _ctx$_stop2, _ctx$_stop$stopIndex, _ctx$_stop3;
|
|
61379
|
+
result.location = {
|
|
61380
|
+
start: {
|
|
61381
|
+
line: ctx._start.line,
|
|
61382
|
+
column: ctx._start.charPositionInLine,
|
|
61383
|
+
absolutePosition: ctx._start.startIndex
|
|
61384
|
+
},
|
|
61385
|
+
end: {
|
|
61386
|
+
line: (_ctx$_stop$line = (_ctx$_stop = ctx._stop) === null || _ctx$_stop === void 0 ? void 0 : _ctx$_stop.line) !== null && _ctx$_stop$line !== void 0 ? _ctx$_stop$line : ctx._start.line,
|
|
61387
|
+
column: (_ref = ctx._stop != undefined ? ((_ctx$_stop2 = ctx._stop) === null || _ctx$_stop2 === void 0 ? void 0 : _ctx$_stop2.charPositionInLine) + ctx._stop.stopIndex - ctx._stop.startIndex : undefined) !== null && _ref !== void 0 ? _ref : ctx._start.charPositionInLine + ctx._start.stopIndex - ctx._start.startIndex,
|
|
61388
|
+
absolutePosition: (_ctx$_stop$stopIndex = (_ctx$_stop3 = ctx._stop) === null || _ctx$_stop3 === void 0 ? void 0 : _ctx$_stop3.stopIndex) !== null && _ctx$_stop$stopIndex !== void 0 ? _ctx$_stop$stopIndex : ctx._start.stopIndex
|
|
61389
|
+
}
|
|
61390
|
+
};
|
|
61391
|
+
}
|
|
61392
|
+
return result;
|
|
61393
|
+
};
|
|
61394
|
+
return [x.name, patchedFunc];
|
|
61395
|
+
});
|
|
61396
|
+
Object.assign(input.prototype, Object.fromEntries(patchedVisitMethodEntries));
|
|
61397
|
+
};
|
|
61398
|
+
|
|
61399
|
+
/***/ }),
|
|
61400
|
+
|
|
61347
61401
|
/***/ "./Generator/src/common/KCLang/Antlr/Parser/KCLangMainVisitor.ts":
|
|
61348
61402
|
/*!***********************************************************************!*\
|
|
61349
61403
|
!*** ./Generator/src/common/KCLang/Antlr/Parser/KCLangMainVisitor.ts ***!
|
|
@@ -61402,6 +61456,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61402
61456
|
/* harmony import */ var _CodeDom_ArrayExpression__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../CodeDom/ArrayExpression */ "./Generator/src/common/KCLang/CodeDom/ArrayExpression.ts");
|
|
61403
61457
|
/* harmony import */ var _CodeDom_FunctionDefinition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../CodeDom/FunctionDefinition */ "./Generator/src/common/KCLang/CodeDom/FunctionDefinition.ts");
|
|
61404
61458
|
/* harmony import */ var _CodeDom_StringArrayConstExpression__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../CodeDom/StringArrayConstExpression */ "./Generator/src/common/KCLang/CodeDom/StringArrayConstExpression.ts");
|
|
61459
|
+
/* harmony import */ var _KCLangLocationDecorator__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./KCLangLocationDecorator */ "./Generator/src/common/KCLang/Antlr/Parser/KCLangLocationDecorator.ts");
|
|
61460
|
+
var _class;
|
|
61405
61461
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
61406
61462
|
|
|
61407
61463
|
|
|
@@ -61448,6 +61504,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61448
61504
|
|
|
61449
61505
|
|
|
61450
61506
|
|
|
61507
|
+
|
|
61451
61508
|
|
|
61452
61509
|
|
|
61453
61510
|
class FunctionAttributeWithName {
|
|
@@ -61500,7 +61557,7 @@ class WithBlockItem {
|
|
|
61500
61557
|
this.descriptionTokens = descriptionTokens;
|
|
61501
61558
|
}
|
|
61502
61559
|
}
|
|
61503
|
-
class KCLangMainVisitor {
|
|
61560
|
+
let KCLangMainVisitor = (0,_KCLangLocationDecorator__WEBPACK_IMPORTED_MODULE_46__.KCLangLocationDecorator)(_class = class KCLangMainVisitor {
|
|
61504
61561
|
constructor(options) {
|
|
61505
61562
|
this.options = void 0;
|
|
61506
61563
|
this.options = options;
|
|
@@ -62057,7 +62114,7 @@ class KCLangMainVisitor {
|
|
|
62057
62114
|
const right = (_resultExpressions$2 = resultExpressions[1]) !== null && _resultExpressions$2 !== void 0 ? _resultExpressions$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
|
|
62058
62115
|
return new expressionCtor(left, right);
|
|
62059
62116
|
}
|
|
62060
|
-
}
|
|
62117
|
+
}) || _class;
|
|
62061
62118
|
|
|
62062
62119
|
/***/ }),
|
|
62063
62120
|
|
|
@@ -64240,6 +64297,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
64240
64297
|
/* harmony export */ KCLangBase: () => (/* binding */ KCLangBase)
|
|
64241
64298
|
/* harmony export */ });
|
|
64242
64299
|
class KCLangBase {
|
|
64300
|
+
constructor() {
|
|
64301
|
+
this.location = void 0;
|
|
64302
|
+
}
|
|
64243
64303
|
getPathString(path) {
|
|
64244
64304
|
const legacyPath = path.toLegacyPath();
|
|
64245
64305
|
return legacyPath[0] == "/" ? legacyPath.slice(1) : legacyPath;
|