@dbml/core 3.13.5 → 3.13.6
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/LICENSE +0 -0
- package/README.md +0 -0
- package/lib/export/DbmlExporter.js +8 -10
- package/lib/export/JsonExporter.js +8 -10
- package/lib/export/ModelExporter.js +9 -11
- package/lib/export/MysqlExporter.js +14 -16
- package/lib/export/OracleExporter.js +17 -19
- package/lib/export/PostgresExporter.js +16 -18
- package/lib/export/README.md +0 -0
- package/lib/export/SqlServerExporter.js +14 -16
- package/lib/export/index.js +3 -4
- package/lib/export/utils.js +4 -0
- package/lib/import/index.js +3 -4
- package/lib/index.js +1 -1
- package/lib/model_structure/config.js +6 -12
- package/lib/model_structure/database.js +22 -26
- package/lib/model_structure/dbState.js +9 -11
- package/lib/model_structure/element.js +22 -25
- package/lib/model_structure/endpoint.js +26 -29
- package/lib/model_structure/enum.js +21 -24
- package/lib/model_structure/enumValue.js +21 -24
- package/lib/model_structure/field.js +21 -24
- package/lib/model_structure/indexColumn.js +21 -24
- package/lib/model_structure/indexes.js +21 -24
- package/lib/model_structure/ref.js +21 -24
- package/lib/model_structure/schema.js +21 -24
- package/lib/model_structure/stickyNote.js +21 -24
- package/lib/model_structure/table.js +26 -29
- package/lib/model_structure/tableGroup.js +21 -24
- package/lib/model_structure/tablePartial.js +21 -24
- package/lib/model_structure/utils.js +0 -0
- package/lib/parse/ANTLR/ASTGeneration/AST.js +21 -35
- package/lib/parse/ANTLR/ASTGeneration/ParserErrorListener.js +19 -22
- package/lib/parse/ANTLR/ASTGeneration/SyntaxError.js +21 -23
- package/lib/parse/ANTLR/ASTGeneration/constants.js +5 -9
- package/lib/parse/ANTLR/ASTGeneration/helpers.js +0 -0
- package/lib/parse/ANTLR/ASTGeneration/index.js +1 -1
- package/lib/parse/ANTLR/ASTGeneration/mssql/MssqlASTGen.js +55 -58
- package/lib/parse/ANTLR/ASTGeneration/mysql/MySQLASTGen.js +54 -58
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgreSQLLexerBase.js +17 -19
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgreSQLParserBase.js +17 -19
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgresASTGen.js +38 -42
- package/lib/parse/ANTLR/ASTGeneration/snowflake/SnowflakeASTGen.js +28 -31
- package/lib/parse/ANTLR/README.md +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.g4 +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.interp +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.js +19 -21
- package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.tokens +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlParser.g4 +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlParser.interp +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlParser.js +2 -2
- package/lib/parse/ANTLR/parsers/mssql/TSqlParser.tokens +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlParserVisitor.js +19 -22
- package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.g4 +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.interp +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.js +19 -21
- package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.tokens +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlParser.g4 +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlParser.interp +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlParser.js +2 -2
- package/lib/parse/ANTLR/parsers/mysql/MySqlParser.tokens +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlParserVisitor.js +19 -22
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.g4 +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.interp +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.js +20 -23
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.tokens +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.g4 +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.interp +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.js +2 -2
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.tokens +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParserVisitor.js +19 -22
- package/lib/parse/ANTLR/parsers/postgresql/README.md +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.g4 +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.interp +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.js +19 -21
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.tokens +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.g4 +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.interp +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.js +2 -2
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.tokens +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParserVisitor.js +19 -22
- package/lib/parse/Parser.js +9 -11
- package/lib/parse/buildParser.js +6 -6
- package/lib/parse/databaseGenerator.js +3 -4
- package/lib/parse/dbml/parser.pegjs +0 -0
- package/lib/parse/dbmlParser.js +11 -11
- package/lib/parse/error.js +8 -10
- package/lib/parse/mssql/base_parsers.js +0 -0
- package/lib/parse/mssql/column_definition/actions.js +0 -0
- package/lib/parse/mssql/column_definition/index.js +0 -0
- package/lib/parse/mssql/constraint_definition/actions.js +6 -7
- package/lib/parse/mssql/constraint_definition/index.js +0 -0
- package/lib/parse/mssql/expression.js +0 -0
- package/lib/parse/mssql/fk_definition/actions.js +0 -0
- package/lib/parse/mssql/fk_definition/index.js +0 -0
- package/lib/parse/mssql/index.js +0 -0
- package/lib/parse/mssql/index_definition/actions.js +0 -0
- package/lib/parse/mssql/index_definition/index.js +0 -0
- package/lib/parse/mssql/keyword_parsers.js +0 -0
- package/lib/parse/mssql/keyword_utils.js +0 -0
- package/lib/parse/mssql/statements/actions.js +0 -0
- package/lib/parse/mssql/statements/index.js +0 -0
- package/lib/parse/mssql/statements/statement_types/alter_table/actions.js +0 -0
- package/lib/parse/mssql/statements/statement_types/alter_table/add/actions.js +0 -0
- package/lib/parse/mssql/statements/statement_types/alter_table/add/index.js +0 -0
- package/lib/parse/mssql/statements/statement_types/alter_table/index.js +0 -0
- package/lib/parse/mssql/statements/statement_types/comments/actions.js +0 -0
- package/lib/parse/mssql/statements/statement_types/comments/index.js +5 -5
- package/lib/parse/mssql/statements/statement_types/create_index/actions.js +0 -0
- package/lib/parse/mssql/statements/statement_types/create_index/index.js +0 -0
- package/lib/parse/mssql/statements/statement_types/create_table/actions.js +6 -6
- package/lib/parse/mssql/statements/statement_types/create_table/index.js +0 -0
- package/lib/parse/mssql/statements/statement_types/index.js +0 -0
- package/lib/parse/mssql/utils.js +1 -1
- package/lib/parse/mssql/whitespaces.js +0 -0
- package/lib/parse/mssqlParser.js +2 -3
- package/lib/parse/mysql/parser.pegjs +0 -0
- package/lib/parse/mysqlParser.js +11 -11
- package/lib/parse/postgresParser.js +1 -1
- package/lib/parse/postgresql/Base_rules.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Alter_table/Alter_table.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Commands.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Comment.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_index.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_table/Create_table.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_table/Create_table_normal.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_table/Create_table_of.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_table/Create_table_partition_of.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_type/Create_type.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_type/Create_type_enum.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_type/Create_type_range.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Ignore_syntax.pegjs +0 -0
- package/lib/parse/postgresql/Expression.pegjs +0 -0
- package/lib/parse/postgresql/InitializerUtils.pegjs +0 -0
- package/lib/parse/postgresql/Keywords.pegjs +0 -0
- package/lib/parse/postgresql/get_parser.js +1 -1
- package/lib/parse/postgresql/parser.pegjs +0 -0
- package/lib/parse/schemarb/parser.pegjs +0 -0
- package/lib/parse/schemarbParser.js +8 -10
- package/lib/utils/version.js +1 -2
- package/package.json +3 -3
- package/types/export/ModelExporter.d.ts +0 -0
- package/types/export/index.d.ts +0 -0
- package/types/import/index.d.ts +0 -0
- package/types/index.d.ts +0 -0
- package/types/model_structure/database.d.ts +0 -0
- package/types/model_structure/dbState.d.ts +0 -0
- package/types/model_structure/element.d.ts +0 -0
- package/types/model_structure/endpoint.d.ts +0 -0
- package/types/model_structure/enum.d.ts +0 -0
- package/types/model_structure/enumValue.d.ts +0 -0
- package/types/model_structure/field.d.ts +0 -0
- package/types/model_structure/indexColumn.d.ts +0 -0
- package/types/model_structure/indexes.d.ts +0 -0
- package/types/model_structure/ref.d.ts +0 -0
- package/types/model_structure/schema.d.ts +0 -0
- package/types/model_structure/stickyNote.d.ts +0 -0
- package/types/model_structure/table.d.ts +0 -0
- package/types/model_structure/tableGroup.d.ts +0 -0
- package/types/model_structure/tablePartial.d.ts +0 -0
- package/types/parse/Parser.d.ts +0 -0
- package/types/parse/error.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -11,31 +11,29 @@ var _field = _interopRequireDefault(require("./field"));
|
|
|
11
11
|
var _indexes = _interopRequireDefault(require("./indexes"));
|
|
12
12
|
var _config = require("./config");
|
|
13
13
|
var _utils = require("./utils");
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function _toConsumableArray(
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
16
16
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
-
function _unsupportedIterableToArray(
|
|
18
|
-
function _iterableToArray(
|
|
19
|
-
function _arrayWithoutHoles(
|
|
20
|
-
function _arrayLikeToArray(
|
|
21
|
-
function ownKeys(
|
|
22
|
-
function _objectSpread(
|
|
23
|
-
function _defineProperty(
|
|
24
|
-
function _classCallCheck(
|
|
25
|
-
function _defineProperties(
|
|
26
|
-
function _createClass(
|
|
27
|
-
function _toPropertyKey(
|
|
28
|
-
function _toPrimitive(
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
function
|
|
32
|
-
function
|
|
33
|
-
function
|
|
34
|
-
function
|
|
35
|
-
function
|
|
17
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
18
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
19
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
20
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
21
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
24
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
25
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
26
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
27
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
28
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
29
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
30
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
31
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
32
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
33
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
34
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
35
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
36
36
|
var Table = /*#__PURE__*/function (_Element) {
|
|
37
|
-
_inherits(Table, _Element);
|
|
38
|
-
var _super = _createSuper(Table);
|
|
39
37
|
function Table() {
|
|
40
38
|
var _this;
|
|
41
39
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -55,7 +53,7 @@ var Table = /*#__PURE__*/function (_Element) {
|
|
|
55
53
|
_ref$partials = _ref.partials,
|
|
56
54
|
partials = _ref$partials === void 0 ? [] : _ref$partials;
|
|
57
55
|
_classCallCheck(this, Table);
|
|
58
|
-
_this =
|
|
56
|
+
_this = _callSuper(this, Table, [token]);
|
|
59
57
|
_this.name = name;
|
|
60
58
|
_this.alias = alias;
|
|
61
59
|
_this.note = note ? (0, _lodash.get)(note, 'value', note) : null;
|
|
@@ -75,7 +73,8 @@ var Table = /*#__PURE__*/function (_Element) {
|
|
|
75
73
|
_this.processIndexes(indexes);
|
|
76
74
|
return _this;
|
|
77
75
|
}
|
|
78
|
-
|
|
76
|
+
_inherits(Table, _Element);
|
|
77
|
+
return _createClass(Table, [{
|
|
79
78
|
key: "generateId",
|
|
80
79
|
value: function generateId() {
|
|
81
80
|
this.id = this.dbState.generateId('tableId');
|
|
@@ -317,7 +316,5 @@ var Table = /*#__PURE__*/function (_Element) {
|
|
|
317
316
|
});
|
|
318
317
|
}
|
|
319
318
|
}]);
|
|
320
|
-
return Table;
|
|
321
319
|
}(_element["default"]);
|
|
322
|
-
var _default = Table;
|
|
323
|
-
exports["default"] = _default;
|
|
320
|
+
var _default = exports["default"] = Table;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -8,25 +8,23 @@ exports["default"] = void 0;
|
|
|
8
8
|
var _lodash = require("lodash");
|
|
9
9
|
var _element = _interopRequireDefault(require("./element"));
|
|
10
10
|
var _utils = require("./utils");
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
function ownKeys(
|
|
13
|
-
function _objectSpread(
|
|
14
|
-
function _defineProperty(
|
|
15
|
-
function _classCallCheck(
|
|
16
|
-
function _defineProperties(
|
|
17
|
-
function _createClass(
|
|
18
|
-
function _toPropertyKey(
|
|
19
|
-
function _toPrimitive(
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
function
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
21
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
22
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
23
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
25
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
26
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
27
27
|
var TableGroup = /*#__PURE__*/function (_Element) {
|
|
28
|
-
_inherits(TableGroup, _Element);
|
|
29
|
-
var _super = _createSuper(TableGroup);
|
|
30
28
|
function TableGroup(_ref) {
|
|
31
29
|
var _this;
|
|
32
30
|
var name = _ref.name,
|
|
@@ -40,7 +38,7 @@ var TableGroup = /*#__PURE__*/function (_Element) {
|
|
|
40
38
|
_ref$noteToken = _ref.noteToken,
|
|
41
39
|
noteToken = _ref$noteToken === void 0 ? null : _ref$noteToken;
|
|
42
40
|
_classCallCheck(this, TableGroup);
|
|
43
|
-
_this =
|
|
41
|
+
_this = _callSuper(this, TableGroup, [token]);
|
|
44
42
|
_this.name = name;
|
|
45
43
|
_this.tables = [];
|
|
46
44
|
_this.schema = schema;
|
|
@@ -52,7 +50,8 @@ var TableGroup = /*#__PURE__*/function (_Element) {
|
|
|
52
50
|
_this.processTables(tables);
|
|
53
51
|
return _this;
|
|
54
52
|
}
|
|
55
|
-
|
|
53
|
+
_inherits(TableGroup, _Element);
|
|
54
|
+
return _createClass(TableGroup, [{
|
|
56
55
|
key: "generateId",
|
|
57
56
|
value: function generateId() {
|
|
58
57
|
this.id = this.dbState.generateId('tableGroupId');
|
|
@@ -138,7 +137,5 @@ var TableGroup = /*#__PURE__*/function (_Element) {
|
|
|
138
137
|
}, this.shallowExport()), this.exportChildIds()), this.exportParentIds());
|
|
139
138
|
}
|
|
140
139
|
}]);
|
|
141
|
-
return TableGroup;
|
|
142
140
|
}(_element["default"]);
|
|
143
|
-
var _default = TableGroup;
|
|
144
|
-
exports["default"] = _default;
|
|
141
|
+
var _default = exports["default"] = TableGroup;
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _lodash = require("lodash");
|
|
9
9
|
var _element = _interopRequireDefault(require("./element"));
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
function ownKeys(
|
|
12
|
-
function _objectSpread(
|
|
13
|
-
function _defineProperty(
|
|
14
|
-
function _classCallCheck(
|
|
15
|
-
function _defineProperties(
|
|
16
|
-
function _createClass(
|
|
17
|
-
function _toPropertyKey(
|
|
18
|
-
function _toPrimitive(
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
20
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
21
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
24
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
25
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
26
26
|
var TablePartial = /*#__PURE__*/function (_Element) {
|
|
27
|
-
_inherits(TablePartial, _Element);
|
|
28
|
-
var _super = _createSuper(TablePartial);
|
|
29
27
|
function TablePartial() {
|
|
30
28
|
var _this;
|
|
31
29
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -41,7 +39,7 @@ var TablePartial = /*#__PURE__*/function (_Element) {
|
|
|
41
39
|
noteToken = _ref$noteToken === void 0 ? null : _ref$noteToken,
|
|
42
40
|
dbState = _ref.dbState;
|
|
43
41
|
_classCallCheck(this, TablePartial);
|
|
44
|
-
_this =
|
|
42
|
+
_this = _callSuper(this, TablePartial, [token]);
|
|
45
43
|
_this.name = name;
|
|
46
44
|
_this.note = note ? (0, _lodash.get)(note, 'value', note) : null;
|
|
47
45
|
_this.noteToken = note ? (0, _lodash.get)(note, 'token', noteToken) : null;
|
|
@@ -52,7 +50,8 @@ var TablePartial = /*#__PURE__*/function (_Element) {
|
|
|
52
50
|
_this.generateId();
|
|
53
51
|
return _this;
|
|
54
52
|
}
|
|
55
|
-
|
|
53
|
+
_inherits(TablePartial, _Element);
|
|
54
|
+
return _createClass(TablePartial, [{
|
|
56
55
|
key: "generateId",
|
|
57
56
|
value: function generateId() {
|
|
58
57
|
this.id = this.dbState.generateId('tablePartialId');
|
|
@@ -81,7 +80,5 @@ var TablePartial = /*#__PURE__*/function (_Element) {
|
|
|
81
80
|
}, this.shallowExport());
|
|
82
81
|
}
|
|
83
82
|
}]);
|
|
84
|
-
return TablePartial;
|
|
85
83
|
}(_element["default"]);
|
|
86
|
-
var _default = TablePartial;
|
|
87
|
-
exports["default"] = _default;
|
|
84
|
+
var _default = exports["default"] = TablePartial;
|
|
File without changes
|
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TableRecord = exports.Table = exports.Ref = exports.Index = exports.Field = exports.Enum = exports.Endpoint = void 0;
|
|
7
|
-
function _typeof(
|
|
8
|
-
function _classCallCheck(
|
|
9
|
-
function _defineProperties(
|
|
10
|
-
function _createClass(
|
|
11
|
-
function _toPropertyKey(
|
|
12
|
-
function _toPrimitive(
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
9
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
10
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
/* eslint-disable camelcase */
|
|
14
14
|
/* eslint-disable max-classes-per-file */
|
|
15
|
-
var Index = /*#__PURE__*/function () {
|
|
15
|
+
var Index = exports.Index = /*#__PURE__*/function () {
|
|
16
16
|
/**
|
|
17
17
|
* @param {{
|
|
18
18
|
* name: string,
|
|
@@ -44,7 +44,7 @@ var Index = /*#__PURE__*/function () {
|
|
|
44
44
|
/** @type {{value: string, type: 'column' | 'string' | 'expression'}[]} */
|
|
45
45
|
this.columns = columns;
|
|
46
46
|
}
|
|
47
|
-
_createClass(Index, [{
|
|
47
|
+
return _createClass(Index, [{
|
|
48
48
|
key: "toJSON",
|
|
49
49
|
value: function toJSON() {
|
|
50
50
|
return {
|
|
@@ -56,10 +56,8 @@ var Index = /*#__PURE__*/function () {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
}]);
|
|
59
|
-
return Index;
|
|
60
59
|
}();
|
|
61
|
-
exports.
|
|
62
|
-
var Field = /*#__PURE__*/function () {
|
|
60
|
+
var Field = exports.Field = /*#__PURE__*/function () {
|
|
63
61
|
/** @type {boolean} */
|
|
64
62
|
// fk;
|
|
65
63
|
|
|
@@ -109,7 +107,7 @@ var Field = /*#__PURE__*/function () {
|
|
|
109
107
|
/** @type {{value: string}} */
|
|
110
108
|
this.note = note;
|
|
111
109
|
}
|
|
112
|
-
_createClass(Field, [{
|
|
110
|
+
return _createClass(Field, [{
|
|
113
111
|
key: "toJSON",
|
|
114
112
|
value: function toJSON() {
|
|
115
113
|
return {
|
|
@@ -124,10 +122,8 @@ var Field = /*#__PURE__*/function () {
|
|
|
124
122
|
};
|
|
125
123
|
}
|
|
126
124
|
}]);
|
|
127
|
-
return Field;
|
|
128
125
|
}();
|
|
129
|
-
exports.
|
|
130
|
-
var Table = /*#__PURE__*/function () {
|
|
126
|
+
var Table = exports.Table = /*#__PURE__*/function () {
|
|
131
127
|
/**
|
|
132
128
|
* @param {{
|
|
133
129
|
* name: string,
|
|
@@ -159,7 +155,7 @@ var Table = /*#__PURE__*/function () {
|
|
|
159
155
|
/** @type {{value: string}} */
|
|
160
156
|
this.note = note;
|
|
161
157
|
}
|
|
162
|
-
_createClass(Table, [{
|
|
158
|
+
return _createClass(Table, [{
|
|
163
159
|
key: "toJSON",
|
|
164
160
|
value: function toJSON() {
|
|
165
161
|
var _this$fields, _this$indexes;
|
|
@@ -176,10 +172,8 @@ var Table = /*#__PURE__*/function () {
|
|
|
176
172
|
};
|
|
177
173
|
}
|
|
178
174
|
}]);
|
|
179
|
-
return Table;
|
|
180
175
|
}();
|
|
181
|
-
exports.
|
|
182
|
-
var Endpoint = /*#__PURE__*/function () {
|
|
176
|
+
var Endpoint = exports.Endpoint = /*#__PURE__*/function () {
|
|
183
177
|
/**
|
|
184
178
|
* @param {{
|
|
185
179
|
* tableName: string,
|
|
@@ -206,7 +200,7 @@ var Endpoint = /*#__PURE__*/function () {
|
|
|
206
200
|
/** @type {'*' | '1'} */
|
|
207
201
|
this.relation = relation;
|
|
208
202
|
}
|
|
209
|
-
_createClass(Endpoint, [{
|
|
203
|
+
return _createClass(Endpoint, [{
|
|
210
204
|
key: "toJSON",
|
|
211
205
|
value: function toJSON() {
|
|
212
206
|
return {
|
|
@@ -217,10 +211,8 @@ var Endpoint = /*#__PURE__*/function () {
|
|
|
217
211
|
};
|
|
218
212
|
}
|
|
219
213
|
}]);
|
|
220
|
-
return Endpoint;
|
|
221
214
|
}();
|
|
222
|
-
exports.
|
|
223
|
-
var Ref = /*#__PURE__*/function () {
|
|
215
|
+
var Ref = exports.Ref = /*#__PURE__*/function () {
|
|
224
216
|
/**
|
|
225
217
|
* @param {{
|
|
226
218
|
* name: string,
|
|
@@ -247,7 +239,7 @@ var Ref = /*#__PURE__*/function () {
|
|
|
247
239
|
/** @type {string} */
|
|
248
240
|
this.onUpdate = onUpdate;
|
|
249
241
|
}
|
|
250
|
-
_createClass(Ref, [{
|
|
242
|
+
return _createClass(Ref, [{
|
|
251
243
|
key: "toJSON",
|
|
252
244
|
value: function toJSON() {
|
|
253
245
|
return {
|
|
@@ -260,10 +252,8 @@ var Ref = /*#__PURE__*/function () {
|
|
|
260
252
|
};
|
|
261
253
|
}
|
|
262
254
|
}]);
|
|
263
|
-
return Ref;
|
|
264
255
|
}();
|
|
265
|
-
exports.
|
|
266
|
-
var Enum = /*#__PURE__*/function () {
|
|
256
|
+
var Enum = exports.Enum = /*#__PURE__*/function () {
|
|
267
257
|
function Enum(_ref6) {
|
|
268
258
|
var name = _ref6.name,
|
|
269
259
|
schemaName = _ref6.schemaName,
|
|
@@ -278,7 +268,7 @@ var Enum = /*#__PURE__*/function () {
|
|
|
278
268
|
/** @type {{name: string}[]} */
|
|
279
269
|
this.values = values;
|
|
280
270
|
}
|
|
281
|
-
_createClass(Enum, [{
|
|
271
|
+
return _createClass(Enum, [{
|
|
282
272
|
key: "toJSON",
|
|
283
273
|
value: function toJSON() {
|
|
284
274
|
return {
|
|
@@ -288,10 +278,8 @@ var Enum = /*#__PURE__*/function () {
|
|
|
288
278
|
};
|
|
289
279
|
}
|
|
290
280
|
}]);
|
|
291
|
-
return Enum;
|
|
292
281
|
}();
|
|
293
|
-
exports.
|
|
294
|
-
var TableRecord = /*#__PURE__*/function () {
|
|
282
|
+
var TableRecord = exports.TableRecord = /*#__PURE__*/function () {
|
|
295
283
|
/**
|
|
296
284
|
* @param {{
|
|
297
285
|
* tableName: string,
|
|
@@ -322,7 +310,7 @@ var TableRecord = /*#__PURE__*/function () {
|
|
|
322
310
|
/** @type {{value: any, type: string}[]} */
|
|
323
311
|
this.values = values;
|
|
324
312
|
}
|
|
325
|
-
_createClass(TableRecord, [{
|
|
313
|
+
return _createClass(TableRecord, [{
|
|
326
314
|
key: "toJSON",
|
|
327
315
|
value: function toJSON() {
|
|
328
316
|
return {
|
|
@@ -333,6 +321,4 @@ var TableRecord = /*#__PURE__*/function () {
|
|
|
333
321
|
};
|
|
334
322
|
}
|
|
335
323
|
}]);
|
|
336
|
-
|
|
337
|
-
}();
|
|
338
|
-
exports.TableRecord = TableRecord;
|
|
324
|
+
}();
|
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _antlr = _interopRequireDefault(require("antlr4"));
|
|
9
9
|
var _SyntaxError = _interopRequireDefault(require("./SyntaxError"));
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
function _classCallCheck(
|
|
12
|
-
function _defineProperties(
|
|
13
|
-
function _createClass(
|
|
14
|
-
function _toPropertyKey(
|
|
15
|
-
function _toPrimitive(
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
var ParserErrorListener = /*#__PURE__*/function (_antlr4$error$ErrorLi) {
|
|
24
|
-
_inherits(ParserErrorListener, _antlr4$error$ErrorLi);
|
|
25
|
-
var _super = _createSuper(ParserErrorListener);
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
17
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
18
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
19
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
21
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
22
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
23
|
+
var ParserErrorListener = exports["default"] = /*#__PURE__*/function (_antlr4$error$ErrorLi) {
|
|
26
24
|
function ParserErrorListener(args) {
|
|
27
25
|
var _this;
|
|
28
26
|
_classCallCheck(this, ParserErrorListener);
|
|
29
|
-
_this =
|
|
27
|
+
_this = _callSuper(this, ParserErrorListener, [args]);
|
|
30
28
|
|
|
31
29
|
/** @type {SyntaxError[]} */
|
|
32
30
|
_this.errors = [];
|
|
@@ -34,12 +32,11 @@ var ParserErrorListener = /*#__PURE__*/function (_antlr4$error$ErrorLi) {
|
|
|
34
32
|
}
|
|
35
33
|
|
|
36
34
|
// eslint-disable-next-line no-unused-vars
|
|
37
|
-
|
|
35
|
+
_inherits(ParserErrorListener, _antlr4$error$ErrorLi);
|
|
36
|
+
return _createClass(ParserErrorListener, [{
|
|
38
37
|
key: "syntaxError",
|
|
39
38
|
value: function syntaxError(recognizer, offendingSymbol, line, column, msg, err) {
|
|
40
39
|
this.errors.push(new _SyntaxError["default"](line, column, msg));
|
|
41
40
|
}
|
|
42
41
|
}]);
|
|
43
|
-
|
|
44
|
-
}(_antlr["default"].error.ErrorListener);
|
|
45
|
-
exports["default"] = ParserErrorListener;
|
|
42
|
+
}(_antlr["default"].error.ErrorListener);
|