@designliquido/delegua 0.3.0 → 0.4.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/bin/package.json +3 -1
- package/fontes/ambiente.js.map +1 -1
- package/fontes/avaliador-sintatico/avaliador-sintatico.d.ts +6 -5
- package/fontes/avaliador-sintatico/avaliador-sintatico.js +55 -41
- package/fontes/avaliador-sintatico/avaliador-sintatico.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.d.ts +4 -3
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.js +38 -37
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.d.ts +4 -3
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.js +38 -37
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.js.map +1 -1
- package/fontes/bibliotecas/biblioteca-global.d.ts +2 -2
- package/fontes/bibliotecas/biblioteca-global.js.map +1 -1
- package/fontes/construtos/acesso-indice-variavel.d.ts +2 -1
- package/fontes/construtos/acesso-indice-variavel.js +2 -1
- package/fontes/construtos/acesso-indice-variavel.js.map +1 -1
- package/fontes/construtos/acesso-metodo.d.ts +4 -3
- package/fontes/construtos/acesso-metodo.js +2 -1
- package/fontes/construtos/acesso-metodo.js.map +1 -1
- package/fontes/construtos/agrupamento.d.ts +2 -1
- package/fontes/construtos/agrupamento.js +2 -1
- package/fontes/construtos/agrupamento.js.map +1 -1
- package/fontes/construtos/atribuicao-sobrescrita.d.ts +2 -1
- package/fontes/construtos/atribuicao-sobrescrita.js +2 -1
- package/fontes/construtos/atribuicao-sobrescrita.js.map +1 -1
- package/fontes/construtos/atribuir.d.ts +2 -1
- package/fontes/construtos/atribuir.js +2 -1
- package/fontes/construtos/atribuir.js.map +1 -1
- package/fontes/construtos/binario.d.ts +2 -1
- package/fontes/construtos/binario.js +2 -1
- package/fontes/construtos/binario.js.map +1 -1
- package/fontes/construtos/chamada.d.ts +2 -1
- package/fontes/construtos/chamada.js +2 -1
- package/fontes/construtos/chamada.js.map +1 -1
- package/fontes/construtos/conjunto.d.ts +2 -1
- package/fontes/construtos/conjunto.js +2 -1
- package/fontes/construtos/conjunto.js.map +1 -1
- package/fontes/construtos/construto.d.ts +1 -0
- package/fontes/construtos/dicionario.d.ts +2 -1
- package/fontes/construtos/dicionario.js +2 -1
- package/fontes/construtos/dicionario.js.map +1 -1
- package/fontes/construtos/funcao.d.ts +2 -1
- package/fontes/construtos/funcao.js +2 -1
- package/fontes/construtos/funcao.js.map +1 -1
- package/fontes/construtos/isto.d.ts +2 -1
- package/fontes/construtos/isto.js +2 -1
- package/fontes/construtos/isto.js.map +1 -1
- package/fontes/construtos/literal.d.ts +2 -1
- package/fontes/construtos/literal.js +2 -1
- package/fontes/construtos/literal.js.map +1 -1
- package/fontes/construtos/logico.d.ts +2 -1
- package/fontes/construtos/logico.js +2 -1
- package/fontes/construtos/logico.js.map +1 -1
- package/fontes/construtos/super.d.ts +4 -2
- package/fontes/construtos/super.js +4 -3
- package/fontes/construtos/super.js.map +1 -1
- package/fontes/construtos/unario.d.ts +2 -1
- package/fontes/construtos/unario.js +2 -1
- package/fontes/construtos/unario.js.map +1 -1
- package/fontes/construtos/variavel.d.ts +2 -1
- package/fontes/construtos/variavel.js +2 -1
- package/fontes/construtos/variavel.js.map +1 -1
- package/fontes/construtos/vetor.d.ts +2 -1
- package/fontes/construtos/vetor.js +2 -1
- package/fontes/construtos/vetor.js.map +1 -1
- package/fontes/declaracoes/bloco.js +1 -1
- package/fontes/declaracoes/bloco.js.map +1 -1
- package/fontes/declaracoes/classe.js +1 -1
- package/fontes/declaracoes/classe.js.map +1 -1
- package/fontes/declaracoes/continua.d.ts +2 -1
- package/fontes/declaracoes/continua.js +2 -2
- package/fontes/declaracoes/continua.js.map +1 -1
- package/fontes/declaracoes/declaracao.d.ts +2 -1
- package/fontes/declaracoes/declaracao.js +2 -1
- package/fontes/declaracoes/declaracao.js.map +1 -1
- package/fontes/declaracoes/enquanto.d.ts +3 -2
- package/fontes/declaracoes/enquanto.js +1 -1
- package/fontes/declaracoes/enquanto.js.map +1 -1
- package/fontes/declaracoes/escolha.d.ts +2 -1
- package/fontes/declaracoes/escolha.js +1 -1
- package/fontes/declaracoes/escolha.js.map +1 -1
- package/fontes/declaracoes/escreva.d.ts +3 -2
- package/fontes/declaracoes/escreva.js +1 -1
- package/fontes/declaracoes/escreva.js.map +1 -1
- package/fontes/declaracoes/expressao.js +1 -1
- package/fontes/declaracoes/expressao.js.map +1 -1
- package/fontes/declaracoes/fazer.js +1 -1
- package/fontes/declaracoes/fazer.js.map +1 -1
- package/fontes/declaracoes/funcao.js +1 -1
- package/fontes/declaracoes/funcao.js.map +1 -1
- package/fontes/declaracoes/importar.js +1 -1
- package/fontes/declaracoes/importar.js.map +1 -1
- package/fontes/declaracoes/para.d.ts +1 -1
- package/fontes/declaracoes/para.js +2 -2
- package/fontes/declaracoes/para.js.map +1 -1
- package/fontes/declaracoes/retorna.d.ts +3 -3
- package/fontes/declaracoes/retorna.js +3 -3
- package/fontes/declaracoes/retorna.js.map +1 -1
- package/fontes/declaracoes/se.js +1 -1
- package/fontes/declaracoes/se.js.map +1 -1
- package/fontes/declaracoes/sustar.d.ts +2 -1
- package/fontes/declaracoes/sustar.js +2 -2
- package/fontes/declaracoes/sustar.js.map +1 -1
- package/fontes/declaracoes/tente.js +1 -1
- package/fontes/declaracoes/tente.js.map +1 -1
- package/fontes/declaracoes/var.js +1 -1
- package/fontes/declaracoes/var.js.map +1 -1
- package/fontes/delegua.d.ts +28 -5
- package/fontes/delegua.js +67 -20
- package/fontes/delegua.js.map +1 -1
- package/fontes/depuracao/cyrb53.d.ts +9 -0
- package/fontes/depuracao/cyrb53.js +25 -0
- package/fontes/depuracao/cyrb53.js.map +1 -0
- package/fontes/depuracao/index.d.ts +3 -0
- package/fontes/depuracao/index.js +20 -0
- package/fontes/depuracao/index.js.map +1 -0
- package/fontes/depuracao/ponto-parada.d.ts +4 -0
- package/fontes/depuracao/ponto-parada.js +3 -0
- package/fontes/depuracao/ponto-parada.js.map +1 -0
- package/fontes/depuracao/servidor-depuracao.d.ts +15 -0
- package/fontes/depuracao/servidor-depuracao.js +187 -0
- package/fontes/depuracao/servidor-depuracao.js.map +1 -0
- package/fontes/estruturas/funcao.d.ts +1 -1
- package/fontes/estruturas/funcao.js.map +1 -1
- package/fontes/importador/importador.d.ts +18 -1
- package/fontes/importador/importador.js +23 -5
- package/fontes/importador/importador.js.map +1 -1
- package/fontes/importador/retorno-importador.d.ts +2 -3
- package/fontes/interfaces/avaliador-sintatico-interface.d.ts +3 -3
- package/fontes/interfaces/delegua-interface.d.ts +2 -4
- package/fontes/interfaces/index.d.ts +2 -1
- package/fontes/interfaces/index.js +2 -1
- package/fontes/interfaces/index.js.map +1 -1
- package/fontes/interfaces/interpretador-com-depuracao-interface.d.ts +11 -0
- package/fontes/interfaces/interpretador-com-depuracao-interface.js +3 -0
- package/fontes/interfaces/interpretador-com-depuracao-interface.js.map +1 -0
- package/fontes/interfaces/interpretador-interface.d.ts +3 -4
- package/fontes/interfaces/lexador-interface.d.ts +2 -2
- package/fontes/interfaces/pilha-escopos-execucao-interface.d.ts +17 -0
- package/fontes/interfaces/pilha-escopos-execucao-interface.js +3 -0
- package/fontes/interfaces/pilha-escopos-execucao-interface.js.map +1 -0
- package/fontes/interfaces/pilha-interface.d.ts +2 -2
- package/fontes/interfaces/retornos/index.d.ts +4 -0
- package/fontes/interfaces/retornos/index.js +21 -0
- package/fontes/interfaces/retornos/index.js.map +1 -0
- package/fontes/interfaces/retornos/retorno-avaliador-sintatico.d.ts +6 -0
- package/fontes/{avaliador-sintatico → interfaces/retornos}/retorno-avaliador-sintatico.js +0 -0
- package/fontes/interfaces/retornos/retorno-avaliador-sintatico.js.map +1 -0
- package/fontes/interfaces/retornos/retorno-execucao-interface.d.ts +11 -0
- package/fontes/interfaces/{retorno-execucao-interface.js → retornos/retorno-execucao-interface.js} +0 -0
- package/fontes/interfaces/retornos/retorno-execucao-interface.js.map +1 -0
- package/fontes/{interpretador → interfaces/retornos}/retorno-interpretador.d.ts +1 -1
- package/fontes/{interpretador → interfaces/retornos}/retorno-interpretador.js +0 -0
- package/fontes/interfaces/retornos/retorno-interpretador.js.map +1 -0
- package/fontes/interfaces/retornos/retorno-lexador.d.ts +10 -0
- package/fontes/{lexador → interfaces/retornos}/retorno-lexador.js +0 -0
- package/fontes/interfaces/retornos/retorno-lexador.js.map +1 -0
- package/fontes/interfaces/simbolo-interface.d.ts +1 -0
- package/fontes/interpretador/dialetos/egua-classico.d.ts +1 -1
- package/fontes/interpretador/dialetos/egua-classico.js +2 -2
- package/fontes/interpretador/dialetos/egua-classico.js.map +1 -1
- package/fontes/interpretador/index.d.ts +1 -1
- package/fontes/interpretador/index.js +1 -1
- package/fontes/interpretador/index.js.map +1 -1
- package/fontes/interpretador/interpretador-com-depuracao.d.ts +94 -0
- package/fontes/interpretador/interpretador-com-depuracao.js +278 -0
- package/fontes/interpretador/interpretador-com-depuracao.js.map +1 -0
- package/fontes/interpretador/interpretador.d.ts +16 -8
- package/fontes/interpretador/interpretador.js +17 -9
- package/fontes/interpretador/interpretador.js.map +1 -1
- package/fontes/interpretador/pilha-escopos-execucao.d.ts +12 -5
- package/fontes/interpretador/pilha-escopos-execucao.js +26 -9
- package/fontes/interpretador/pilha-escopos-execucao.js.map +1 -1
- package/fontes/lexador/dialetos/lexador-egua-classico.d.ts +1 -1
- package/fontes/lexador/dialetos/lexador-egua-classico.js +2 -2
- package/fontes/lexador/dialetos/lexador-egua-classico.js.map +1 -1
- package/fontes/lexador/dialetos/lexador-eguap.d.ts +3 -2
- package/fontes/lexador/dialetos/lexador-eguap.js +6 -5
- package/fontes/lexador/dialetos/lexador-eguap.js.map +1 -1
- package/fontes/lexador/lexador.d.ts +3 -2
- package/fontes/lexador/lexador.js +4 -2
- package/fontes/lexador/lexador.js.map +1 -1
- package/fontes/lexador/simbolo.d.ts +2 -1
- package/fontes/lexador/simbolo.js +2 -1
- package/fontes/lexador/simbolo.js.map +1 -1
- package/fontes/resolvedor/dialetos/egua-classico.d.ts +1 -1
- package/fontes/resolvedor/dialetos/egua-classico.js +3 -3
- package/fontes/resolvedor/dialetos/egua-classico.js.map +1 -1
- package/fontes/resolvedor/resolvedor.js +3 -3
- package/index.js +6 -4
- package/index.js.map +1 -1
- package/package.json +3 -1
- package/testes/avaliador-sintatico.test.js +1 -1
- package/testes/avaliador-sintatico.test.js.map +1 -1
- package/testes/biblioteca-global.test.js +14 -14
- package/testes/biblioteca-global.test.js.map +1 -1
- package/testes/egua-classico/avaliador-sintatico.test.js +1 -1
- package/testes/egua-classico/avaliador-sintatico.test.js.map +1 -1
- package/testes/egua-classico/interpretador.test.js +20 -20
- package/testes/egua-classico/interpretador.test.js.map +1 -1
- package/testes/egua-classico/lexador.test.js +8 -8
- package/testes/egua-classico/lexador.test.js.map +1 -1
- package/testes/egua-classico/resolvedor.test.js +1 -1
- package/testes/egua-classico/resolvedor.test.js.map +1 -1
- package/testes/eguap/lexador.test.js +6 -6
- package/testes/eguap/lexador.test.js.map +1 -1
- package/testes/interpretador.test.js +20 -20
- package/testes/interpretador.test.js.map +1 -1
- package/testes/lexador.test.js +8 -8
- package/testes/lexador.test.js.map +1 -1
- package/testes/resolvedor.test.js +1 -1
- package/testes/resolvedor.test.js.map +1 -1
- package/fontes/avaliador-sintatico/retorno-avaliador-sintatico.d.ts +0 -6
- package/fontes/avaliador-sintatico/retorno-avaliador-sintatico.js.map +0 -1
- package/fontes/interfaces/retorno-execucao-interface.d.ts +0 -11
- package/fontes/interfaces/retorno-execucao-interface.js.map +0 -1
- package/fontes/interpretador/retorno-interpretador.js.map +0 -1
- package/fontes/lexador/retorno-lexador.d.ts +0 -10
- package/fontes/lexador/retorno-lexador.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"para.js","sourceRoot":"","sources":["../../../fontes/declaracoes/para.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAA0C;AAG1C;IAA0B,wBAAU;IAMhC,cAAY,KAAa,EAAE,aAAkB,EAAE,QAAa,EAAE,WAAgB,EAAE,KAAU;
|
|
1
|
+
{"version":3,"file":"para.js","sourceRoot":"","sources":["../../../fontes/declaracoes/para.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAA0C;AAG1C;IAA0B,wBAAU;IAMhC,cAAY,WAAmB,EAAE,KAAa,EAAE,aAAkB,EAAE,QAAa,EAAE,WAAgB,EAAE,KAAU;QAA/G,YACI,kBAAM,KAAK,EAAE,WAAW,CAAC,SAK5B;QAJG,KAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,sBAAO,GAAP,UAAQ,SAAc;QAClB,OAAO,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IACL,WAAC;AAAD,CAAC,AAjBD,CAA0B,uBAAU,GAiBnC;AAjBY,oBAAI"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { InterpretadorInterface, ResolvedorInterface } from "../interfaces";
|
|
1
|
+
import { InterpretadorInterface, ResolvedorInterface, SimboloInterface } from "../interfaces";
|
|
2
2
|
import { Declaracao } from "./declaracao";
|
|
3
3
|
export declare class Retorna extends Declaracao {
|
|
4
|
-
|
|
4
|
+
simboloChave: SimboloInterface;
|
|
5
5
|
valor: any;
|
|
6
|
-
constructor(
|
|
6
|
+
constructor(simboloChave: SimboloInterface, valor: any);
|
|
7
7
|
aceitar(visitante: ResolvedorInterface | InterpretadorInterface): any;
|
|
8
8
|
}
|
|
@@ -19,9 +19,9 @@ exports.Retorna = void 0;
|
|
|
19
19
|
var declaracao_1 = require("./declaracao");
|
|
20
20
|
var Retorna = /** @class */ (function (_super) {
|
|
21
21
|
__extends(Retorna, _super);
|
|
22
|
-
function Retorna(
|
|
23
|
-
var _this = _super.call(this,
|
|
24
|
-
_this.
|
|
22
|
+
function Retorna(simboloChave, valor) {
|
|
23
|
+
var _this = _super.call(this, Number(simboloChave.linha), simboloChave.hashArquivo) || this;
|
|
24
|
+
_this.simboloChave = simboloChave;
|
|
25
25
|
_this.valor = valor;
|
|
26
26
|
return _this;
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retorna.js","sourceRoot":"","sources":["../../../fontes/declaracoes/retorna.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA6B,2BAAU;IAInC,iBAAY,
|
|
1
|
+
{"version":3,"file":"retorna.js","sourceRoot":"","sources":["../../../fontes/declaracoes/retorna.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA6B,2BAAU;IAInC,iBAAY,YAA8B,EAAE,KAAU;QAAtD,YACI,kBAAM,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAG9D;QAFG,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,yBAAO,GAAP,UAAQ,SAAuD;QAC3D,OAAO,SAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACL,cAAC;AAAD,CAAC,AAbD,CAA6B,uBAAU,GAatC;AAbY,0BAAO"}
|
package/fontes/declaracoes/se.js
CHANGED
|
@@ -20,7 +20,7 @@ var declaracao_1 = require("./declaracao");
|
|
|
20
20
|
var Se = /** @class */ (function (_super) {
|
|
21
21
|
__extends(Se, _super);
|
|
22
22
|
function Se(linha, condicao, caminhoEntao, caminhosSeSenao, caminhoSenao) {
|
|
23
|
-
var _this = _super.call(this, linha) || this;
|
|
23
|
+
var _this = _super.call(this, linha, 0) || this;
|
|
24
24
|
_this.condicao = condicao;
|
|
25
25
|
_this.caminhoEntao = caminhoEntao;
|
|
26
26
|
_this.caminhosSeSenao = caminhosSeSenao;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"se.js","sourceRoot":"","sources":["../../../fontes/declaracoes/se.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAAwB,sBAAU;IAM9B,YAAY,KAAa,EAAE,QAAa,EAAE,YAAiB,EAAE,eAAoB,EAAE,YAAiB;QAApG,YACI,kBAAM,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"se.js","sourceRoot":"","sources":["../../../fontes/declaracoes/se.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAAwB,sBAAU;IAM9B,YAAY,KAAa,EAAE,QAAa,EAAE,YAAiB,EAAE,eAAoB,EAAE,YAAiB;QAApG,YACI,kBAAM,KAAK,EAAE,CAAC,CAAC,SAKlB;QAJG,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;;IACrC,CAAC;IAED,oBAAO,GAAP,UAAQ,SAAuD;QAC3D,OAAO,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IACL,SAAC;AAAD,CAAC,AAjBD,CAAwB,uBAAU,GAiBjC;AAjBY,gBAAE"}
|
|
@@ -19,8 +19,8 @@ exports.Sustar = void 0;
|
|
|
19
19
|
var declaracao_1 = require("./declaracao");
|
|
20
20
|
var Sustar = /** @class */ (function (_super) {
|
|
21
21
|
__extends(Sustar, _super);
|
|
22
|
-
function Sustar() {
|
|
23
|
-
return _super.call(this,
|
|
22
|
+
function Sustar(simbolo) {
|
|
23
|
+
return _super.call(this, Number(simbolo.linha), simbolo.hashArquivo) || this;
|
|
24
24
|
}
|
|
25
25
|
Sustar.prototype.aceitar = function (visitante) {
|
|
26
26
|
return visitante.visitarExpressaoSustar(this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sustar.js","sourceRoot":"","sources":["../../../fontes/declaracoes/sustar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sustar.js","sourceRoot":"","sources":["../../../fontes/declaracoes/sustar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA4B,0BAAU;IAClC,gBAAY,OAAyB;eACjC,kBAAM,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;IACrD,CAAC;IAED,wBAAO,GAAP,UAAQ,SAAc;QAClB,OAAO,SAAS,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;IACL,aAAC;AAAD,CAAC,AARD,CAA4B,uBAAU,GAQrC;AARY,wBAAM"}
|
|
@@ -20,7 +20,7 @@ var declaracao_1 = require("./declaracao");
|
|
|
20
20
|
var Tente = /** @class */ (function (_super) {
|
|
21
21
|
__extends(Tente, _super);
|
|
22
22
|
function Tente(caminhoTente, caminhoPegue, caminhoSenao, caminhoFinalmente) {
|
|
23
|
-
var _this = _super.call(this, 0) || this;
|
|
23
|
+
var _this = _super.call(this, 0, 0) || this;
|
|
24
24
|
_this.caminhoTente = caminhoTente;
|
|
25
25
|
_this.caminhoPegue = caminhoPegue;
|
|
26
26
|
_this.caminhoSenao = caminhoSenao;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tente.js","sourceRoot":"","sources":["../../../fontes/declaracoes/tente.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAA0C;AAG1C;IAA2B,yBAAU;IAMjC,eAAY,YAAiB,EAAE,YAAiB,EAAE,YAAiB,EAAE,iBAAsB;QAA3F,YACI,kBAAM,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"tente.js","sourceRoot":"","sources":["../../../fontes/declaracoes/tente.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAA0C;AAG1C;IAA2B,yBAAU;IAMjC,eAAY,YAAiB,EAAE,YAAiB,EAAE,YAAiB,EAAE,iBAAsB;QAA3F,YACI,kBAAM,CAAC,EAAE,CAAC,CAAC,SAKd;QAJG,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;;IAC/C,CAAC;IAED,uBAAO,GAAP,UAAQ,SAAc;QAClB,OAAO,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACL,YAAC;AAAD,CAAC,AAjBD,CAA2B,uBAAU,GAiBpC;AAjBY,sBAAK"}
|
|
@@ -20,7 +20,7 @@ var declaracao_1 = require("./declaracao");
|
|
|
20
20
|
var Var = /** @class */ (function (_super) {
|
|
21
21
|
__extends(Var, _super);
|
|
22
22
|
function Var(simbolo, inicializador) {
|
|
23
|
-
var _this = _super.call(this, Number(simbolo.linha)) || this;
|
|
23
|
+
var _this = _super.call(this, Number(simbolo.linha), simbolo.hashArquivo) || this;
|
|
24
24
|
_this.simbolo = simbolo;
|
|
25
25
|
_this.inicializador = inicializador;
|
|
26
26
|
return _this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"var.js","sourceRoot":"","sources":["../../../fontes/declaracoes/var.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAAyB,uBAAU;IAI/B,aAAY,OAAyB,EAAE,aAAkB;QAAzD,YACI,kBAAM,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"var.js","sourceRoot":"","sources":["../../../fontes/declaracoes/var.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAAyB,uBAAU;IAI/B,aAAY,OAAyB,EAAE,aAAkB;QAAzD,YACI,kBAAM,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,SAGpD;QAFG,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,aAAa,GAAG,aAAa,CAAC;;IACvC,CAAC;IAED,qBAAO,GAAP,UAAQ,SAAuD;QAC3D,OAAO,SAAS,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACL,UAAC;AAAD,CAAC,AAbD,CAAyB,uBAAU,GAalC;AAbY,kBAAG"}
|
package/fontes/delegua.d.ts
CHANGED
|
@@ -1,24 +1,47 @@
|
|
|
1
|
-
import { AvaliadorSintaticoInterface, DeleguaInterface, InterpretadorInterface, LexadorInterface, RetornoExecucaoInterface, SimboloInterface } from './interfaces';
|
|
1
|
+
import { AvaliadorSintaticoInterface, DeleguaInterface, InterpretadorComDepuracaoInterface, InterpretadorInterface, LexadorInterface, RetornoExecucaoInterface, SimboloInterface } from './interfaces';
|
|
2
2
|
import { ResolvedorInterface } from './interfaces/resolvedor-interface';
|
|
3
|
+
import { ServidorDepuracao } from './depuracao';
|
|
3
4
|
import { ImportadorInterface } from './interfaces/importador-interface';
|
|
4
5
|
import { RetornoImportador } from './importador';
|
|
6
|
+
/**
|
|
7
|
+
* O núcleo da linguagem.
|
|
8
|
+
*
|
|
9
|
+
* Responsável por avaliar a entrada fornecida, entender o código e executá-lo.
|
|
10
|
+
*/
|
|
5
11
|
export declare class Delegua implements DeleguaInterface {
|
|
6
|
-
nomeArquivo: string;
|
|
7
12
|
teveErro: boolean;
|
|
8
13
|
teveErroEmTempoDeExecucao: boolean;
|
|
9
14
|
dialeto: string;
|
|
10
15
|
arquivosAbertos: {
|
|
11
16
|
[identificador: string]: string;
|
|
12
17
|
};
|
|
13
|
-
|
|
18
|
+
conteudoArquivosAbertos: {
|
|
19
|
+
[identificador: string]: string[];
|
|
20
|
+
};
|
|
21
|
+
interpretador: InterpretadorInterface | InterpretadorComDepuracaoInterface;
|
|
14
22
|
lexador: LexadorInterface;
|
|
15
23
|
avaliadorSintatico: AvaliadorSintaticoInterface;
|
|
16
24
|
resolvedor: ResolvedorInterface;
|
|
17
25
|
importador: ImportadorInterface;
|
|
18
26
|
funcaoDeRetorno: Function;
|
|
19
|
-
|
|
27
|
+
servidorDepuracao: ServidorDepuracao;
|
|
28
|
+
constructor(dialeto?: string, performance?: boolean, depurador?: boolean, funcaoDeRetorno?: Function);
|
|
20
29
|
versao(): string;
|
|
21
|
-
|
|
30
|
+
/**
|
|
31
|
+
* LAIR (Leia-Avalie-Imprima-Repita) é o modo em que Delégua executa em modo console,
|
|
32
|
+
* ou seja, esperando como entrada linhas de código fornecidas pelo usuário.
|
|
33
|
+
*/
|
|
34
|
+
iniciarLairDelegua(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Instancia um servidor de depuração, normalmente recebendo requisições na porta 7777.
|
|
37
|
+
*/
|
|
38
|
+
iniciarDepuracao(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Pede ao servidor de depuração que finalize a execução.
|
|
41
|
+
* Se não for feito, o servidor de depuração mantém um _stream_ aberto e nunca finaliza.
|
|
42
|
+
* Mais informações: https://stackoverflow.com/a/47456805/1314276
|
|
43
|
+
*/
|
|
44
|
+
finalizarDepuracao(): void;
|
|
22
45
|
carregarArquivo(caminhoRelativoArquivo: string): void;
|
|
23
46
|
executar(retornoImportador: RetornoImportador, manterAmbiente?: boolean): RetornoExecucaoInterface;
|
|
24
47
|
reportar(linha: number, onde: any, mensagem: string): void;
|
package/fontes/delegua.js
CHANGED
|
@@ -42,23 +42,35 @@ var lexador_eguap_1 = require("./lexador/dialetos/lexador-eguap");
|
|
|
42
42
|
var avaliador_sintatico_eguap_1 = require("./avaliador-sintatico/dialetos/avaliador-sintatico-eguap");
|
|
43
43
|
var egua_classico_2 = require("./resolvedor/dialetos/egua-classico");
|
|
44
44
|
var dialetos_1 = require("./avaliador-sintatico/dialetos");
|
|
45
|
+
var depuracao_1 = require("./depuracao");
|
|
45
46
|
var importador_1 = require("./importador");
|
|
47
|
+
var interpretador_com_depuracao_1 = require("./interpretador/interpretador-com-depuracao");
|
|
48
|
+
/**
|
|
49
|
+
* O núcleo da linguagem.
|
|
50
|
+
*
|
|
51
|
+
* Responsável por avaliar a entrada fornecida, entender o código e executá-lo.
|
|
52
|
+
*/
|
|
46
53
|
var Delegua = /** @class */ (function () {
|
|
47
|
-
function Delegua(dialeto, performance,
|
|
54
|
+
function Delegua(dialeto, performance, depurador, funcaoDeRetorno) {
|
|
48
55
|
if (dialeto === void 0) { dialeto = 'delegua'; }
|
|
49
56
|
if (performance === void 0) { performance = false; }
|
|
57
|
+
if (depurador === void 0) { depurador = false; }
|
|
50
58
|
if (funcaoDeRetorno === void 0) { funcaoDeRetorno = null; }
|
|
51
|
-
this.
|
|
59
|
+
this.arquivosAbertos = {};
|
|
60
|
+
this.conteudoArquivosAbertos = {};
|
|
52
61
|
this.teveErro = false;
|
|
53
62
|
this.teveErroEmTempoDeExecucao = false;
|
|
54
63
|
this.dialeto = dialeto;
|
|
55
64
|
this.funcaoDeRetorno = funcaoDeRetorno || console.log;
|
|
56
65
|
switch (this.dialeto) {
|
|
57
66
|
case 'egua':
|
|
67
|
+
if (depurador) {
|
|
68
|
+
throw new Error("Dialeto " + this.dialeto + " não suporta depuração.");
|
|
69
|
+
}
|
|
58
70
|
this.resolvedor = new egua_classico_2.ResolvedorEguaClassico();
|
|
59
71
|
this.lexador = new lexador_egua_classico_1.LexadorEguaClassico();
|
|
60
72
|
this.avaliadorSintatico = new dialetos_1.AvaliadorSintaticoEguaClassico();
|
|
61
|
-
this.importador = new importador_1.Importador(this.lexador, this.avaliadorSintatico);
|
|
73
|
+
this.importador = new importador_1.Importador(this.lexador, this.avaliadorSintatico, this.arquivosAbertos, this.conteudoArquivosAbertos, depurador);
|
|
62
74
|
this.interpretador = new egua_classico_1.InterpretadorEguaClassico(this, process.cwd());
|
|
63
75
|
console.log('Usando dialeto: Égua');
|
|
64
76
|
break;
|
|
@@ -66,31 +78,42 @@ var Delegua = /** @class */ (function () {
|
|
|
66
78
|
this.resolvedor = new resolvedor_1.Resolvedor();
|
|
67
79
|
this.lexador = new lexador_eguap_1.LexadorEguaP();
|
|
68
80
|
this.avaliadorSintatico = new avaliador_sintatico_eguap_1.AvaliadorSintaticoEguaP();
|
|
69
|
-
this.importador = new importador_1.Importador(this.lexador, this.avaliadorSintatico);
|
|
70
|
-
this.interpretador =
|
|
81
|
+
this.importador = new importador_1.Importador(this.lexador, this.avaliadorSintatico, this.arquivosAbertos, this.conteudoArquivosAbertos, depurador);
|
|
82
|
+
this.interpretador = depurador ?
|
|
83
|
+
new interpretador_com_depuracao_1.InterpretadorComDepuracao(this.importador, this.resolvedor, process.cwd(), funcaoDeRetorno) :
|
|
84
|
+
new interpretador_1.Interpretador(this.importador, this.resolvedor, process.cwd(), performance, funcaoDeRetorno);
|
|
71
85
|
console.log('Usando dialeto: ÉguaP');
|
|
72
86
|
break;
|
|
73
87
|
default:
|
|
74
88
|
this.resolvedor = new resolvedor_1.Resolvedor();
|
|
75
89
|
this.lexador = new lexador_1.Lexador(performance);
|
|
76
90
|
this.avaliadorSintatico = new avaliador_sintatico_1.AvaliadorSintatico(performance);
|
|
77
|
-
this.importador = new importador_1.Importador(this.lexador, this.avaliadorSintatico);
|
|
78
|
-
this.interpretador =
|
|
91
|
+
this.importador = new importador_1.Importador(this.lexador, this.avaliadorSintatico, this.arquivosAbertos, this.conteudoArquivosAbertos, depurador);
|
|
92
|
+
this.interpretador = depurador ?
|
|
93
|
+
new interpretador_com_depuracao_1.InterpretadorComDepuracao(this.importador, this.resolvedor, process.cwd(), funcaoDeRetorno) :
|
|
94
|
+
new interpretador_1.Interpretador(this.importador, this.resolvedor, process.cwd(), performance, funcaoDeRetorno);
|
|
79
95
|
console.log('Usando dialeto: padrão');
|
|
80
96
|
break;
|
|
81
97
|
}
|
|
98
|
+
if (depurador) {
|
|
99
|
+
this.iniciarDepuracao();
|
|
100
|
+
}
|
|
82
101
|
}
|
|
83
102
|
Delegua.prototype.versao = function () {
|
|
84
103
|
try {
|
|
85
104
|
var manifesto = caminho.resolve('package.json');
|
|
86
105
|
return (JSON.parse(fs.readFileSync(manifesto, { encoding: 'utf8' }))
|
|
87
|
-
.version || '0.
|
|
106
|
+
.version || '0.3');
|
|
88
107
|
}
|
|
89
108
|
catch (error) {
|
|
90
|
-
return '0.
|
|
109
|
+
return '0.3 (desenvolvimento)';
|
|
91
110
|
}
|
|
92
111
|
};
|
|
93
|
-
|
|
112
|
+
/**
|
|
113
|
+
* LAIR (Leia-Avalie-Imprima-Repita) é o modo em que Delégua executa em modo console,
|
|
114
|
+
* ou seja, esperando como entrada linhas de código fornecidas pelo usuário.
|
|
115
|
+
*/
|
|
116
|
+
Delegua.prototype.iniciarLairDelegua = function () {
|
|
94
117
|
var _this = this;
|
|
95
118
|
console.log("Console da Linguagem Del\u00E9gua v".concat(this.versao()));
|
|
96
119
|
console.log('Pressione Ctrl + C para sair');
|
|
@@ -103,10 +126,9 @@ var Delegua = /** @class */ (function () {
|
|
|
103
126
|
leiaLinha.on('line', function (linha) {
|
|
104
127
|
_this.teveErro = false;
|
|
105
128
|
_this.teveErroEmTempoDeExecucao = false;
|
|
106
|
-
var retornoLexador = _this.lexador.mapear([linha]);
|
|
129
|
+
var retornoLexador = _this.lexador.mapear([linha], -1);
|
|
107
130
|
var retornoAvaliadorSintatico = _this.avaliadorSintatico.analisar(retornoLexador);
|
|
108
131
|
var retornoInterpretacao = _this.executar({
|
|
109
|
-
codigo: [linha],
|
|
110
132
|
retornoLexador: retornoLexador,
|
|
111
133
|
retornoAvaliadorSintatico: retornoAvaliadorSintatico
|
|
112
134
|
}, true);
|
|
@@ -117,7 +139,26 @@ var Delegua = /** @class */ (function () {
|
|
|
117
139
|
leiaLinha.prompt();
|
|
118
140
|
});
|
|
119
141
|
};
|
|
142
|
+
/**
|
|
143
|
+
* Instancia um servidor de depuração, normalmente recebendo requisições na porta 7777.
|
|
144
|
+
*/
|
|
145
|
+
Delegua.prototype.iniciarDepuracao = function () {
|
|
146
|
+
this.servidorDepuracao = new depuracao_1.ServidorDepuracao(this);
|
|
147
|
+
this.servidorDepuracao.iniciarServidorDepuracao();
|
|
148
|
+
this.interpretador.finalizacaoDaExecucao = this.finalizarDepuracao.bind(this);
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Pede ao servidor de depuração que finalize a execução.
|
|
152
|
+
* Se não for feito, o servidor de depuração mantém um _stream_ aberto e nunca finaliza.
|
|
153
|
+
* Mais informações: https://stackoverflow.com/a/47456805/1314276
|
|
154
|
+
*/
|
|
155
|
+
Delegua.prototype.finalizarDepuracao = function () {
|
|
156
|
+
if (this.servidorDepuracao) {
|
|
157
|
+
this.servidorDepuracao.finalizarServidorDepuracao();
|
|
158
|
+
}
|
|
159
|
+
};
|
|
120
160
|
Delegua.prototype.carregarArquivo = function (caminhoRelativoArquivo) {
|
|
161
|
+
// this.nomeArquivo = caminho.basename(caminhoRelativoArquivo);
|
|
121
162
|
var retornoImportador = this.importador.importar(caminhoRelativoArquivo);
|
|
122
163
|
this.executar(retornoImportador);
|
|
123
164
|
if (this.teveErro)
|
|
@@ -165,10 +206,13 @@ var Delegua = /** @class */ (function () {
|
|
|
165
206
|
};
|
|
166
207
|
};
|
|
167
208
|
Delegua.prototype.reportar = function (linha, onde, mensagem) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
209
|
+
// TODO: Voltar isso após revisar pragmas de Lexador.
|
|
210
|
+
/* if (this.nomeArquivo)
|
|
211
|
+
console.error(
|
|
212
|
+
chalk.red(`[Arquivo: ${this.nomeArquivo}] [Linha: ${linha}]`) + ` Erro${onde}: ${mensagem}`
|
|
213
|
+
);
|
|
214
|
+
else */
|
|
215
|
+
console.error(chalk_1.default.red("[Linha: ".concat(linha, "]")) + " Erro".concat(onde, ": ").concat(mensagem));
|
|
172
216
|
this.teveErro = true;
|
|
173
217
|
};
|
|
174
218
|
Delegua.prototype.erro = function (simbolo, mensagemDeErro) {
|
|
@@ -181,10 +225,13 @@ var Delegua = /** @class */ (function () {
|
|
|
181
225
|
};
|
|
182
226
|
Delegua.prototype.erroEmTempoDeExecucao = function (erro) {
|
|
183
227
|
if (erro && erro.simbolo && erro.simbolo.linha) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
228
|
+
// TODO: Voltar isso após revisar pragmas de Interpretador.
|
|
229
|
+
/* if (this.nomeArquivo)
|
|
230
|
+
console.error(
|
|
231
|
+
chalk.red(`Erro: [Arquivo: ${this.nomeArquivo}] [Linha: ${erro.simbolo.linha}]`) + ` ${erro.mensagem}`
|
|
232
|
+
);
|
|
233
|
+
else */
|
|
234
|
+
console.error(chalk_1.default.red("Erro: [Linha: ".concat(erro.simbolo.linha, "]")) + " ".concat(erro.mensagem));
|
|
188
235
|
}
|
|
189
236
|
else {
|
|
190
237
|
console.error(chalk_1.default.red("Erro: [Linha: ".concat(erro.linha || 0, "]")) + " ".concat(erro.mensagem));
|
package/fontes/delegua.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegua.js","sourceRoot":"","sources":["../../fontes/delegua.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,4CAAgC;AAChC,iDAAqC;AACrC,gDAA0B;AAE1B,6CAA4C;AAC5C,iFAA+E;AAC/E,2CAA0C;AAC1C,+DAA8D;AAC9D,kFAA0D;
|
|
1
|
+
{"version":3,"file":"delegua.js","sour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AAC,OAAO,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;SACrE;aAAM;YACH,IAAI,CAAC,QAAQ,CACT,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EACrB,eAAQ,OAAO,CAAC,MAAM,MAAG,EACzB,cAAc,CACjB,CAAC;SACL;IACL,CAAC;IAED,uCAAqB,GAArB,UAAsB,IAAS;QAC3B,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;YAC5C,2DAA2D;YAC3D;;;;mBAIO;YACP,OAAO,CAAC,KAAK,CACT,eAAK,CAAC,GAAG,CAAC,wBAAiB,IAAI,CAAC,OAAO,CAAC,KAAK,MAAG,CAAC,GAAG,WAAI,IAAI,CAAC,QAAQ,CAAE,CAC1E,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,wBAAiB,IAAI,CAAC,KAAK,IAAI,CAAC,MAAG,CAAC,GAAG,WAAI,IAAI,CAAC,QAAQ,CAAE,CAAC,CAAC;SACvF;QAED,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC;IAC1C,CAAC;IACL,cAAC;AAAD,CAAC,AAtOD,IAsOC;AAtOY,0BAAO"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Função de geração de hashes copiada de https://stackoverflow.com/a/52171480/1314276.
|
|
3
|
+
* A ideia é gerar hashes únicos para nomes de arquivos importados e usar o hash para os
|
|
4
|
+
* pragmas de elementos catalogados pelo lexador e usados pelo interpretador.
|
|
5
|
+
* @param str Nome do arquivo
|
|
6
|
+
* @param seed Uma semente de dispersão, padrão: 0
|
|
7
|
+
* @returns Texto com o hash correspondente ao nome do arquivo
|
|
8
|
+
*/
|
|
9
|
+
export default function cyrb53(str: string, seed?: number): number;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Função de geração de hashes copiada de https://stackoverflow.com/a/52171480/1314276.
|
|
5
|
+
* A ideia é gerar hashes únicos para nomes de arquivos importados e usar o hash para os
|
|
6
|
+
* pragmas de elementos catalogados pelo lexador e usados pelo interpretador.
|
|
7
|
+
* @param str Nome do arquivo
|
|
8
|
+
* @param seed Uma semente de dispersão, padrão: 0
|
|
9
|
+
* @returns Texto com o hash correspondente ao nome do arquivo
|
|
10
|
+
*/
|
|
11
|
+
function cyrb53(str, seed) {
|
|
12
|
+
if (seed === void 0) { seed = 0; }
|
|
13
|
+
var h1 = 0xdeadbeef ^ seed, h2 = 0x41c6ce57 ^ seed;
|
|
14
|
+
for (var i = 0, ch = void 0; i < str.length; i++) {
|
|
15
|
+
ch = str.charCodeAt(i);
|
|
16
|
+
h1 = Math.imul(h1 ^ ch, 2654435761);
|
|
17
|
+
h2 = Math.imul(h2 ^ ch, 1597334677);
|
|
18
|
+
}
|
|
19
|
+
h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ Math.imul(h2 ^ (h2 >>> 13), 3266489909);
|
|
20
|
+
h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909);
|
|
21
|
+
return 4294967296 * (2097151 & h2) + (h1 >>> 0);
|
|
22
|
+
}
|
|
23
|
+
exports.default = cyrb53;
|
|
24
|
+
;
|
|
25
|
+
//# sourceMappingURL=cyrb53.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cyrb53.js","sourceRoot":"","sources":["../../../fontes/depuracao/cyrb53.ts"],"names":[],"mappings":";;AAAA;;;;;;;GAOG;AACH,SAAwB,MAAM,CAAC,GAAW,EAAE,IAAQ;IAAR,qBAAA,EAAA,QAAQ;IAChD,IAAI,EAAE,GAAG,UAAU,GAAG,IAAI,EAAE,EAAE,GAAG,UAAU,GAAG,IAAI,CAAC;IACnD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,SAAQ,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC7C,EAAE,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACvB,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;QACpC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;KACvC;IACD,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,KAAG,EAAE,CAAC,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,KAAG,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;IACnF,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,KAAG,EAAE,CAAC,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,KAAG,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;IACnF,OAAO,UAAU,GAAG,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAG,CAAC,CAAC,CAAC;AAClD,CAAC;AAVD,yBAUC;AAAA,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./cyrb53"), exports);
|
|
18
|
+
__exportStar(require("./ponto-parada"), exports);
|
|
19
|
+
__exportStar(require("./servidor-depuracao"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fontes/depuracao/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,iDAA+B;AAC/B,uDAAqC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ponto-parada.js","sourceRoot":"","sources":["../../../fontes/depuracao/ponto-parada.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import * as net from 'net';
|
|
3
|
+
import { Delegua } from '../delegua';
|
|
4
|
+
export declare class ServidorDepuracao {
|
|
5
|
+
instanciaDelegua: Delegua;
|
|
6
|
+
servidor: net.Server;
|
|
7
|
+
conexoes: {
|
|
8
|
+
[chave: number]: any;
|
|
9
|
+
};
|
|
10
|
+
contadorConexoes: number;
|
|
11
|
+
constructor(_instanciaDelegua: Delegua);
|
|
12
|
+
operarConexao: (conexao: net.Socket) => void;
|
|
13
|
+
iniciarServidorDepuracao(): net.AddressInfo;
|
|
14
|
+
finalizarServidorDepuracao(): void;
|
|
15
|
+
}
|