@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.
Files changed (146) hide show
  1. package/README.md +9 -1
  2. package/bin/delegua +1 -1
  3. package/bin/delegua.cmd +1 -1
  4. package/bin/package.json +51 -0
  5. package/index.js +27 -0
  6. package/index.js.map +1 -0
  7. package/package.json +10 -5
  8. package/src/ambiente.js +34 -38
  9. package/src/ambiente.js.map +1 -0
  10. package/src/avaliador-sintatico/dialetos/egua-classico.js +635 -0
  11. package/src/avaliador-sintatico/dialetos/egua-classico.js.map +1 -0
  12. package/src/avaliador-sintatico/dialetos/index.js +14 -0
  13. package/src/avaliador-sintatico/dialetos/index.js.map +1 -0
  14. package/src/avaliador-sintatico/index.js +635 -0
  15. package/src/avaliador-sintatico/index.js.map +1 -0
  16. package/src/avaliador-sintatico/parser-error.js +27 -0
  17. package/src/avaliador-sintatico/parser-error.js.map +1 -0
  18. package/src/bibliotecas/bibliotecaGlobal.js +97 -0
  19. package/src/bibliotecas/bibliotecaGlobal.js.map +1 -0
  20. package/src/bibliotecas/importarBiblioteca.js +32 -0
  21. package/src/bibliotecas/importarBiblioteca.js.map +1 -0
  22. package/src/construtos/assign-subscript.js +35 -0
  23. package/src/construtos/assign-subscript.js.map +1 -0
  24. package/src/construtos/atribuir.js +34 -0
  25. package/src/construtos/atribuir.js.map +1 -0
  26. package/src/construtos/binario.js +35 -0
  27. package/src/construtos/binario.js.map +1 -0
  28. package/src/construtos/call.js +35 -0
  29. package/src/construtos/call.js.map +1 -0
  30. package/src/construtos/conjunto.js +35 -0
  31. package/src/construtos/conjunto.js.map +1 -0
  32. package/src/construtos/dicionario.js +34 -0
  33. package/src/construtos/dicionario.js.map +1 -0
  34. package/src/construtos/expr.js +11 -0
  35. package/src/construtos/expr.js.map +1 -0
  36. package/src/construtos/funcao.js +34 -0
  37. package/src/construtos/funcao.js.map +1 -0
  38. package/src/construtos/get.js +34 -0
  39. package/src/construtos/get.js.map +1 -0
  40. package/src/construtos/grouping.js +33 -0
  41. package/src/construtos/grouping.js.map +1 -0
  42. package/src/construtos/index.js +31 -0
  43. package/src/construtos/index.js.map +1 -0
  44. package/src/construtos/isto.js +33 -0
  45. package/src/construtos/isto.js.map +1 -0
  46. package/src/construtos/literal.js +33 -0
  47. package/src/construtos/literal.js.map +1 -0
  48. package/src/construtos/logical.js +35 -0
  49. package/src/construtos/logical.js.map +1 -0
  50. package/src/construtos/subscript.js +35 -0
  51. package/src/construtos/subscript.js.map +1 -0
  52. package/src/construtos/super.js +34 -0
  53. package/src/construtos/super.js.map +1 -0
  54. package/src/construtos/unario.js +34 -0
  55. package/src/construtos/unario.js.map +1 -0
  56. package/src/construtos/variavel.js +33 -0
  57. package/src/construtos/variavel.js.map +1 -0
  58. package/src/construtos/vetor.js +33 -0
  59. package/src/construtos/vetor.js.map +1 -0
  60. package/src/declaracoes/index.js +249 -0
  61. package/src/declaracoes/index.js.map +1 -0
  62. package/src/delegua.js +110 -83
  63. package/src/delegua.js.map +1 -0
  64. package/src/estruturas/callable.js +15 -4
  65. package/src/estruturas/callable.js.map +1 -0
  66. package/src/estruturas/classe.js +44 -30
  67. package/src/estruturas/classe.js.map +1 -0
  68. package/src/estruturas/funcao-padrao.js +38 -0
  69. package/src/estruturas/funcao-padrao.js.map +1 -0
  70. package/src/estruturas/funcao.js +71 -52
  71. package/src/estruturas/funcao.js.map +1 -0
  72. package/src/estruturas/index.js +19 -0
  73. package/src/estruturas/index.js.map +1 -0
  74. package/src/estruturas/instancia.js +23 -22
  75. package/src/estruturas/instancia.js.map +1 -0
  76. package/src/estruturas/modulo.js +14 -8
  77. package/src/estruturas/modulo.js.map +1 -0
  78. package/src/excecoes/break-exception.js +27 -0
  79. package/src/excecoes/break-exception.js.map +1 -0
  80. package/src/excecoes/continue-exception.js +27 -0
  81. package/src/excecoes/continue-exception.js.map +1 -0
  82. package/src/excecoes/erro-em-tempo-de-execucao.js +31 -0
  83. package/src/excecoes/erro-em-tempo-de-execucao.js.map +1 -0
  84. package/src/excecoes/index.js +17 -0
  85. package/src/excecoes/index.js.map +1 -0
  86. package/src/excecoes/return-exception.js +30 -0
  87. package/src/excecoes/return-exception.js.map +1 -0
  88. package/src/interfaces/avaliador-sintatico-interface.js +3 -0
  89. package/src/interfaces/avaliador-sintatico-interface.js.map +1 -0
  90. package/src/interfaces/index.js +19 -0
  91. package/src/interfaces/index.js.map +1 -0
  92. package/src/interfaces/interpretador-interface.js +3 -0
  93. package/src/interfaces/interpretador-interface.js.map +1 -0
  94. package/src/interfaces/lexador-interface.js +3 -0
  95. package/src/interfaces/lexador-interface.js.map +1 -0
  96. package/src/interfaces/pilha-interface.js +3 -0
  97. package/src/interfaces/pilha-interface.js.map +1 -0
  98. package/src/interfaces/resolvedor-interface.js +3 -0
  99. package/src/interfaces/resolvedor-interface.js.map +1 -0
  100. package/src/interfaces/simbolo-interface.js +3 -0
  101. package/src/interfaces/simbolo-interface.js.map +1 -0
  102. package/src/interpretador/dialetos/egua-classico.js +656 -0
  103. package/src/interpretador/dialetos/egua-classico.js.map +1 -0
  104. package/src/interpretador/dialetos/index.js +14 -0
  105. package/src/interpretador/dialetos/index.js.map +1 -0
  106. package/src/interpretador/index.js +665 -0
  107. package/src/interpretador/index.js.map +1 -0
  108. package/src/lexador/dialetos/egua-classico.js +287 -0
  109. package/src/lexador/dialetos/egua-classico.js.map +1 -0
  110. package/src/lexador/dialetos/index.js +14 -0
  111. package/src/lexador/dialetos/index.js.map +1 -0
  112. package/src/lexador/index.js +287 -0
  113. package/src/lexador/index.js.map +1 -0
  114. package/src/resolvedor/Pilha.js +27 -0
  115. package/src/resolvedor/Pilha.js.map +1 -0
  116. package/src/resolvedor/ResolverError.js +29 -0
  117. package/src/resolvedor/ResolverError.js.map +1 -0
  118. package/src/resolvedor/dialetos/egua-classico.js +331 -0
  119. package/src/resolvedor/dialetos/egua-classico.js.map +1 -0
  120. package/src/resolvedor/dialetos/index.js +14 -0
  121. package/src/resolvedor/dialetos/index.js.map +1 -0
  122. package/src/resolvedor/index.js +331 -0
  123. package/src/resolvedor/index.js.map +1 -0
  124. package/src/tiposDeSimbolos.js +25 -23
  125. package/src/tiposDeSimbolos.js.map +1 -0
  126. package/src/web.js +64 -68
  127. package/src/web.js.map +1 -0
  128. package/.github/CONTRIBUTING.md +0 -0
  129. package/.github/workflows/principal.yml +0 -20
  130. package/.release-it.json +0 -8
  131. package/.vscode/launch.json +0 -29
  132. package/.vscode/settings.json +0 -3
  133. package/LICENSE +0 -21
  134. package/babel.config.js +0 -1
  135. package/indice.js +0 -14
  136. package/src/erro.js +0 -18
  137. package/src/estruturas/funcaoPadrao.js +0 -18
  138. package/src/expr.js +0 -228
  139. package/src/interpretador.js +0 -802
  140. package/src/lexer.js +0 -316
  141. package/src/lib/globalLib.js +0 -171
  142. package/src/lib/importStdlib.js +0 -32
  143. package/src/parser.js +0 -822
  144. package/src/resolver.js +0 -425
  145. package/src/stmt.js +0 -215
  146. 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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=avaliador-sintatico-interface.js.map
@@ -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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=interpretador-interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpretador-interface.js","sourceRoot":"","sources":["../../../src/interfaces/interpretador-interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=lexador-interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lexador-interface.js","sourceRoot":"","sources":["../../../src/interfaces/lexador-interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pilha-interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pilha-interface.js","sourceRoot":"","sources":["../../../src/interfaces/pilha-interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=resolvedor-interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolvedor-interface.js","sourceRoot":"","sources":["../../../src/interfaces/resolvedor-interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=simbolo-interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simbolo-interface.js","sourceRoot":"","sources":["../../../src/interfaces/simbolo-interface.ts"],"names":[],"mappings":""}