@designliquido/delegua 0.0.2 → 0.1.3
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/README.md +9 -1
- package/bin/delegua +1 -1
- package/bin/delegua.cmd +1 -1
- package/bin/package.json +51 -0
- package/index.js +27 -0
- package/index.js.map +1 -0
- package/package.json +10 -5
- package/src/ambiente.js +34 -38
- package/src/ambiente.js.map +1 -0
- package/src/avaliador-sintatico/dialetos/egua-classico.js +635 -0
- package/src/avaliador-sintatico/dialetos/egua-classico.js.map +1 -0
- package/src/avaliador-sintatico/dialetos/index.js +14 -0
- package/src/avaliador-sintatico/dialetos/index.js.map +1 -0
- package/src/avaliador-sintatico/index.js +635 -0
- package/src/avaliador-sintatico/index.js.map +1 -0
- package/src/avaliador-sintatico/parser-error.js +27 -0
- package/src/avaliador-sintatico/parser-error.js.map +1 -0
- package/src/bibliotecas/bibliotecaGlobal.js +97 -0
- package/src/bibliotecas/bibliotecaGlobal.js.map +1 -0
- package/src/bibliotecas/importarBiblioteca.js +32 -0
- package/src/bibliotecas/importarBiblioteca.js.map +1 -0
- package/src/construtos/assign-subscript.js +35 -0
- package/src/construtos/assign-subscript.js.map +1 -0
- package/src/construtos/atribuir.js +34 -0
- package/src/construtos/atribuir.js.map +1 -0
- package/src/construtos/binario.js +35 -0
- package/src/construtos/binario.js.map +1 -0
- package/src/construtos/call.js +35 -0
- package/src/construtos/call.js.map +1 -0
- package/src/construtos/conjunto.js +35 -0
- package/src/construtos/conjunto.js.map +1 -0
- package/src/construtos/dicionario.js +34 -0
- package/src/construtos/dicionario.js.map +1 -0
- package/src/construtos/expr.js +11 -0
- package/src/construtos/expr.js.map +1 -0
- package/src/construtos/funcao.js +34 -0
- package/src/construtos/funcao.js.map +1 -0
- package/src/construtos/get.js +34 -0
- package/src/construtos/get.js.map +1 -0
- package/src/construtos/grouping.js +33 -0
- package/src/construtos/grouping.js.map +1 -0
- package/src/construtos/index.js +31 -0
- package/src/construtos/index.js.map +1 -0
- package/src/construtos/isto.js +33 -0
- package/src/construtos/isto.js.map +1 -0
- package/src/construtos/literal.js +33 -0
- package/src/construtos/literal.js.map +1 -0
- package/src/construtos/logical.js +35 -0
- package/src/construtos/logical.js.map +1 -0
- package/src/construtos/subscript.js +35 -0
- package/src/construtos/subscript.js.map +1 -0
- package/src/construtos/super.js +34 -0
- package/src/construtos/super.js.map +1 -0
- package/src/construtos/unario.js +34 -0
- package/src/construtos/unario.js.map +1 -0
- package/src/construtos/variavel.js +33 -0
- package/src/construtos/variavel.js.map +1 -0
- package/src/construtos/vetor.js +33 -0
- package/src/construtos/vetor.js.map +1 -0
- package/src/declaracoes/index.js +249 -0
- package/src/declaracoes/index.js.map +1 -0
- package/src/delegua.js +110 -83
- package/src/delegua.js.map +1 -0
- package/src/estruturas/callable.js +15 -4
- package/src/estruturas/callable.js.map +1 -0
- package/src/estruturas/classe.js +44 -30
- package/src/estruturas/classe.js.map +1 -0
- package/src/estruturas/funcao-padrao.js +38 -0
- package/src/estruturas/funcao-padrao.js.map +1 -0
- package/src/estruturas/funcao.js +71 -52
- package/src/estruturas/funcao.js.map +1 -0
- package/src/estruturas/index.js +19 -0
- package/src/estruturas/index.js.map +1 -0
- package/src/estruturas/instancia.js +23 -22
- package/src/estruturas/instancia.js.map +1 -0
- package/src/estruturas/modulo.js +14 -8
- package/src/estruturas/modulo.js.map +1 -0
- package/src/excecoes/break-exception.js +27 -0
- package/src/excecoes/break-exception.js.map +1 -0
- package/src/excecoes/continue-exception.js +27 -0
- package/src/excecoes/continue-exception.js.map +1 -0
- package/src/excecoes/erro-em-tempo-de-execucao.js +31 -0
- package/src/excecoes/erro-em-tempo-de-execucao.js.map +1 -0
- package/src/excecoes/index.js +17 -0
- package/src/excecoes/index.js.map +1 -0
- package/src/excecoes/return-exception.js +30 -0
- package/src/excecoes/return-exception.js.map +1 -0
- package/src/interfaces/avaliador-sintatico-interface.js +3 -0
- package/src/interfaces/avaliador-sintatico-interface.js.map +1 -0
- package/src/interfaces/index.js +19 -0
- package/src/interfaces/index.js.map +1 -0
- package/src/interfaces/interpretador-interface.js +3 -0
- package/src/interfaces/interpretador-interface.js.map +1 -0
- package/src/interfaces/lexador-interface.js +3 -0
- package/src/interfaces/lexador-interface.js.map +1 -0
- package/src/interfaces/pilha-interface.js +3 -0
- package/src/interfaces/pilha-interface.js.map +1 -0
- package/src/interfaces/resolvedor-interface.js +3 -0
- package/src/interfaces/resolvedor-interface.js.map +1 -0
- package/src/interfaces/simbolo-interface.js +3 -0
- package/src/interfaces/simbolo-interface.js.map +1 -0
- package/src/interpretador/dialetos/egua-classico.js +656 -0
- package/src/interpretador/dialetos/egua-classico.js.map +1 -0
- package/src/interpretador/dialetos/index.js +14 -0
- package/src/interpretador/dialetos/index.js.map +1 -0
- package/src/interpretador/index.js +665 -0
- package/src/interpretador/index.js.map +1 -0
- package/src/lexador/dialetos/egua-classico.js +287 -0
- package/src/lexador/dialetos/egua-classico.js.map +1 -0
- package/src/lexador/dialetos/index.js +14 -0
- package/src/lexador/dialetos/index.js.map +1 -0
- package/src/lexador/index.js +287 -0
- package/src/lexador/index.js.map +1 -0
- package/src/resolvedor/Pilha.js +27 -0
- package/src/resolvedor/Pilha.js.map +1 -0
- package/src/resolvedor/ResolverError.js +29 -0
- package/src/resolvedor/ResolverError.js.map +1 -0
- package/src/resolvedor/dialetos/egua-classico.js +331 -0
- package/src/resolvedor/dialetos/egua-classico.js.map +1 -0
- package/src/resolvedor/dialetos/index.js +14 -0
- package/src/resolvedor/dialetos/index.js.map +1 -0
- package/src/resolvedor/index.js +331 -0
- package/src/resolvedor/index.js.map +1 -0
- package/src/tiposDeSimbolos.js +25 -23
- package/src/tiposDeSimbolos.js.map +1 -0
- package/src/web.js +64 -68
- package/src/web.js.map +1 -0
- package/.github/CONTRIBUTING.md +0 -0
- package/.github/workflows/principal.yml +0 -20
- package/.release-it.json +0 -8
- package/.vscode/launch.json +0 -29
- package/.vscode/settings.json +0 -3
- package/LICENSE +0 -21
- package/babel.config.js +0 -1
- package/indice.js +0 -14
- package/src/erro.js +0 -18
- package/src/estruturas/funcaoPadrao.js +0 -18
- package/src/expr.js +0 -228
- package/src/interpretador.js +0 -802
- package/src/lexer.js +0 -316
- package/src/lib/globalLib.js +0 -171
- package/src/lib/importStdlib.js +0 -32
- package/src/parser.js +0 -822
- package/src/resolver.js +0 -425
- package/src/stmt.js +0 -215
- package/testes/testes.egua +0 -630
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.BreakException = void 0;
|
|
19
|
+
var BreakException = /** @class */ (function (_super) {
|
|
20
|
+
__extends(BreakException, _super);
|
|
21
|
+
function BreakException() {
|
|
22
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
23
|
+
}
|
|
24
|
+
return BreakException;
|
|
25
|
+
}(Error));
|
|
26
|
+
exports.BreakException = BreakException;
|
|
27
|
+
//# sourceMappingURL=break-exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"break-exception.js","sourceRoot":"","sources":["../../../src/excecoes/break-exception.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;IAAoC,kCAAK;IAAzC;;IAA4C,CAAC;IAAD,qBAAC;AAAD,CAAC,AAA7C,CAAoC,KAAK,GAAI;AAAhC,wCAAc"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ContinueException = void 0;
|
|
19
|
+
var ContinueException = /** @class */ (function (_super) {
|
|
20
|
+
__extends(ContinueException, _super);
|
|
21
|
+
function ContinueException() {
|
|
22
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
23
|
+
}
|
|
24
|
+
return ContinueException;
|
|
25
|
+
}(Error));
|
|
26
|
+
exports.ContinueException = ContinueException;
|
|
27
|
+
//# sourceMappingURL=continue-exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continue-exception.js","sourceRoot":"","sources":["../../../src/excecoes/continue-exception.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;IAAuC,qCAAK;IAA5C;;IAA+C,CAAC;IAAD,wBAAC;AAAD,CAAC,AAAhD,CAAuC,KAAK,GAAI;AAAnC,8CAAiB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ErroEmTempoDeExecucao = void 0;
|
|
19
|
+
var ErroEmTempoDeExecucao = /** @class */ (function (_super) {
|
|
20
|
+
__extends(ErroEmTempoDeExecucao, _super);
|
|
21
|
+
function ErroEmTempoDeExecucao(simbolo, mensagem) {
|
|
22
|
+
var _this = _super.call(this, mensagem) || this;
|
|
23
|
+
_this.simbolo = simbolo;
|
|
24
|
+
_this.mensagem = mensagem;
|
|
25
|
+
Object.setPrototypeOf(_this, ErroEmTempoDeExecucao.prototype);
|
|
26
|
+
return _this;
|
|
27
|
+
}
|
|
28
|
+
return ErroEmTempoDeExecucao;
|
|
29
|
+
}(Error));
|
|
30
|
+
exports.ErroEmTempoDeExecucao = ErroEmTempoDeExecucao;
|
|
31
|
+
//# sourceMappingURL=erro-em-tempo-de-execucao.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erro-em-tempo-de-execucao.js","sourceRoot":"","sources":["../../../src/excecoes/erro-em-tempo-de-execucao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;IAA2C,yCAAK;IAI9C,+BAAY,OAAa,EAAE,QAAiB;QAA5C,YACE,kBAAM,QAAQ,CAAC,SAIhB;QAHC,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;;IAC/D,CAAC;IACH,4BAAC;AAAD,CAAC,AAVD,CAA2C,KAAK,GAU/C;AAVY,sDAAqB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./break-exception"), exports);
|
|
14
|
+
__exportStar(require("./continue-exception"), exports);
|
|
15
|
+
__exportStar(require("./erro-em-tempo-de-execucao"), exports);
|
|
16
|
+
__exportStar(require("./return-exception"), exports);
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/excecoes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAkC;AAClC,uDAAqC;AACrC,8DAA4C;AAC5C,qDAAmC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ReturnException = void 0;
|
|
19
|
+
var ReturnException = /** @class */ (function (_super) {
|
|
20
|
+
__extends(ReturnException, _super);
|
|
21
|
+
function ReturnException(valor) {
|
|
22
|
+
var _this = _super.call(this, valor) || this;
|
|
23
|
+
_this.valor = valor;
|
|
24
|
+
Object.setPrototypeOf(_this, ReturnException.prototype);
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
return ReturnException;
|
|
28
|
+
}(Error));
|
|
29
|
+
exports.ReturnException = ReturnException;
|
|
30
|
+
//# sourceMappingURL=return-exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"return-exception.js","sourceRoot":"","sources":["../../../src/excecoes/return-exception.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA;IAAqC,mCAAK;IAGxC,yBAAY,KAAU;QAAtB,YACE,kBAAM,KAAK,CAAC,SAGb;QAFC,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;;IACzD,CAAC;IACH,sBAAC;AAAD,CAAC,AARD,CAAqC,KAAK,GAQzC;AARY,0CAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avaliador-sintatico-interface.js","sourceRoot":"","sources":["../../../src/interfaces/avaliador-sintatico-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./avaliador-sintatico-interface"), exports);
|
|
14
|
+
__exportStar(require("./interpretador-interface"), exports);
|
|
15
|
+
__exportStar(require("./lexador-interface"), exports);
|
|
16
|
+
__exportStar(require("./pilha-interface"), exports);
|
|
17
|
+
__exportStar(require("./resolvedor-interface"), exports);
|
|
18
|
+
__exportStar(require("./simbolo-interface"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kEAAgD;AAChD,4DAA0C;AAC1C,sDAAoC;AACpC,oDAAiC;AACjC,yDAAuC;AACvC,sDAAmC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpretador-interface.js","sourceRoot":"","sources":["../../../src/interfaces/interpretador-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lexador-interface.js","sourceRoot":"","sources":["../../../src/interfaces/lexador-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pilha-interface.js","sourceRoot":"","sources":["../../../src/interfaces/pilha-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolvedor-interface.js","sourceRoot":"","sources":["../../../src/interfaces/resolvedor-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simbolo-interface.js","sourceRoot":"","sources":["../../../src/interfaces/simbolo-interface.ts"],"names":[],"mappings":""}
|