@designliquido/delegua 0.9.3 → 0.9.5
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 +25 -3
- package/bin/delegua +1 -1
- package/bin/delegua.cmd +1 -1
- package/bin/package.json +7 -5
- package/coverage/lcov-report/sorter.js +4 -4
- package/coverage/lcov-report/sorter.js.map +1 -1
- package/execucao.d.ts +1 -0
- package/execucao.js +29 -0
- package/execucao.js.map +1 -0
- package/fontes/avaliador-sintatico/avaliador-sintatico-base.js +108 -105
- package/fontes/avaliador-sintatico/avaliador-sintatico-base.js.map +1 -1
- package/fontes/avaliador-sintatico/avaliador-sintatico.js +226 -232
- package/fontes/avaliador-sintatico/avaliador-sintatico.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-birl.js +35 -55
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-birl.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.js +211 -216
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.js +231 -237
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-visualg.d.ts +3 -0
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-visualg.js +188 -121
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-visualg.js.map +1 -1
- package/fontes/avaliador-sintatico/erro-avaliador-sintatico.js +6 -24
- package/fontes/avaliador-sintatico/erro-avaliador-sintatico.js.map +1 -1
- package/fontes/bibliotecas/biblioteca-global.js +206 -367
- package/fontes/bibliotecas/biblioteca-global.js.map +1 -1
- package/fontes/bibliotecas/importar-biblioteca.js +28 -29
- package/fontes/bibliotecas/importar-biblioteca.js.map +1 -1
- package/fontes/bibliotecas/primitivas-texto.js +9 -22
- package/fontes/bibliotecas/primitivas-texto.js.map +1 -1
- package/fontes/bibliotecas/primitivas-vetor.js +12 -14
- package/fontes/bibliotecas/primitivas-vetor.js.map +1 -1
- package/fontes/construtos/acesso-indice-variavel.js +6 -50
- package/fontes/construtos/acesso-indice-variavel.js.map +1 -1
- package/fontes/construtos/acesso-metodo.js +6 -50
- package/fontes/construtos/acesso-metodo.js.map +1 -1
- package/fontes/construtos/agrupamento.js +6 -50
- package/fontes/construtos/agrupamento.js.map +1 -1
- package/fontes/construtos/atribuicao-sobrescrita.js +6 -50
- package/fontes/construtos/atribuicao-sobrescrita.js.map +1 -1
- package/fontes/construtos/atribuir.js +6 -50
- package/fontes/construtos/atribuir.js.map +1 -1
- package/fontes/construtos/binario.js +6 -50
- package/fontes/construtos/binario.js.map +1 -1
- package/fontes/construtos/chamada.js +6 -50
- package/fontes/construtos/chamada.js.map +1 -1
- package/fontes/construtos/definir-valor.js +6 -50
- package/fontes/construtos/definir-valor.js.map +1 -1
- package/fontes/construtos/dicionario.js +6 -50
- package/fontes/construtos/dicionario.js.map +1 -1
- package/fontes/construtos/funcao.d.ts +2 -2
- package/fontes/construtos/funcao.js +6 -47
- package/fontes/construtos/funcao.js.map +1 -1
- package/fontes/construtos/isto.js +6 -47
- package/fontes/construtos/isto.js.map +1 -1
- package/fontes/construtos/literal.js +6 -47
- package/fontes/construtos/literal.js.map +1 -1
- package/fontes/construtos/logico.js +6 -50
- package/fontes/construtos/logico.js.map +1 -1
- package/fontes/construtos/super.js +6 -47
- package/fontes/construtos/super.js.map +1 -1
- package/fontes/construtos/unario.js +6 -50
- package/fontes/construtos/unario.js.map +1 -1
- package/fontes/construtos/variavel.js +6 -47
- package/fontes/construtos/variavel.js.map +1 -1
- package/fontes/construtos/vetor.js +6 -50
- package/fontes/construtos/vetor.js.map +1 -1
- package/fontes/declaracoes/bloco.js +9 -70
- package/fontes/declaracoes/bloco.js.map +1 -1
- package/fontes/declaracoes/classe.js +11 -72
- package/fontes/declaracoes/classe.js.map +1 -1
- package/fontes/declaracoes/continua.js +8 -65
- package/fontes/declaracoes/continua.js.map +1 -1
- package/fontes/declaracoes/declaracao.js +6 -47
- package/fontes/declaracoes/declaracao.js.map +1 -1
- package/fontes/declaracoes/enquanto.js +10 -71
- package/fontes/declaracoes/enquanto.js.map +1 -1
- package/fontes/declaracoes/escolha.js +11 -72
- package/fontes/declaracoes/escolha.js.map +1 -1
- package/fontes/declaracoes/escreva.js +9 -70
- package/fontes/declaracoes/escreva.js.map +1 -1
- package/fontes/declaracoes/expressao.js +9 -70
- package/fontes/declaracoes/expressao.js.map +1 -1
- package/fontes/declaracoes/fazer.js +10 -71
- package/fontes/declaracoes/fazer.js.map +1 -1
- package/fontes/declaracoes/funcao.js +10 -68
- package/fontes/declaracoes/funcao.js.map +1 -1
- package/fontes/declaracoes/importar.js +10 -71
- package/fontes/declaracoes/importar.js.map +1 -1
- package/fontes/declaracoes/leia.js +9 -70
- package/fontes/declaracoes/leia.js.map +1 -1
- package/fontes/declaracoes/para.js +12 -73
- package/fontes/declaracoes/para.js.map +1 -1
- package/fontes/declaracoes/retorna.js +10 -71
- package/fontes/declaracoes/retorna.js.map +1 -1
- package/fontes/declaracoes/se.js +12 -73
- package/fontes/declaracoes/se.js.map +1 -1
- package/fontes/declaracoes/sustar.js +8 -65
- package/fontes/declaracoes/sustar.js.map +1 -1
- package/fontes/declaracoes/tente.js +12 -73
- package/fontes/declaracoes/tente.js.map +1 -1
- package/fontes/declaracoes/var.js +10 -71
- package/fontes/declaracoes/var.js.map +1 -1
- package/fontes/delegua.js +117 -200
- package/fontes/delegua.js.map +1 -1
- package/fontes/depuracao/cyrb53.js +3 -4
- package/fontes/depuracao/cyrb53.js.map +1 -1
- package/fontes/depuracao/servidor-depuracao.js +125 -209
- package/fontes/depuracao/servidor-depuracao.js.map +1 -1
- package/fontes/espaco-variaveis.js +3 -4
- package/fontes/espaco-variaveis.js.map +1 -1
- package/fontes/estruturas/chamavel.js +6 -9
- package/fontes/estruturas/chamavel.js.map +1 -1
- package/fontes/estruturas/classe-padrao.js +17 -35
- package/fontes/estruturas/classe-padrao.js.map +1 -1
- package/fontes/estruturas/delegua-classe.d.ts +2 -2
- package/fontes/estruturas/delegua-classe.js +21 -39
- package/fontes/estruturas/delegua-classe.js.map +1 -1
- package/fontes/estruturas/delegua-funcao.js +48 -114
- package/fontes/estruturas/delegua-funcao.js.map +1 -1
- package/fontes/estruturas/funcao-padrao.js +13 -75
- package/fontes/estruturas/funcao-padrao.js.map +1 -1
- package/fontes/estruturas/metodo-primitiva.js +11 -39
- package/fontes/estruturas/metodo-primitiva.js.map +1 -1
- package/fontes/estruturas/modulo.js +6 -7
- package/fontes/estruturas/modulo.js.map +1 -1
- package/fontes/estruturas/objeto-delegua-classe.d.ts +3 -3
- package/fontes/estruturas/objeto-delegua-classe.js +12 -13
- package/fontes/estruturas/objeto-delegua-classe.js.map +1 -1
- package/fontes/estruturas/objeto-padrao.js +9 -11
- package/fontes/estruturas/objeto-padrao.js.map +1 -1
- package/fontes/excecoes/erro-em-tempo-de-execucao.js +8 -26
- package/fontes/excecoes/erro-em-tempo-de-execucao.js.map +1 -1
- package/fontes/importador/importador.js +21 -22
- package/fontes/importador/importador.js.map +1 -1
- package/fontes/interfaces/parametro-interface.d.ts +1 -1
- package/fontes/interpretador/dialetos/egua-classico.js +592 -1019
- package/fontes/interpretador/dialetos/egua-classico.js.map +1 -1
- package/fontes/interpretador/inferenciador.js +1 -1
- package/fontes/interpretador/inferenciador.js.map +1 -1
- package/fontes/interpretador/interpretador-com-depuracao.js +186 -336
- package/fontes/interpretador/interpretador-com-depuracao.js.map +1 -1
- package/fontes/interpretador/interpretador.js +706 -1175
- package/fontes/interpretador/interpretador.js.map +1 -1
- package/fontes/interpretador/pilha-escopos-execucao.js +52 -57
- package/fontes/interpretador/pilha-escopos-execucao.js.map +1 -1
- package/fontes/lexador/dialetos/lexador-birl.d.ts +1 -0
- package/fontes/lexador/dialetos/lexador-birl.js +55 -64
- package/fontes/lexador/dialetos/lexador-birl.js.map +1 -1
- package/fontes/lexador/dialetos/lexador-egua-classico.js +43 -46
- package/fontes/lexador/dialetos/lexador-egua-classico.js.map +1 -1
- package/fontes/lexador/dialetos/lexador-eguap.js +59 -63
- package/fontes/lexador/dialetos/lexador-eguap.js.map +1 -1
- package/fontes/lexador/dialetos/lexador-visualg.js +45 -54
- package/fontes/lexador/dialetos/lexador-visualg.js.map +1 -1
- package/fontes/lexador/dialetos/palavras-reservadas/birl.js +1 -1
- package/fontes/lexador/dialetos/palavras-reservadas/birl.js.map +1 -1
- package/fontes/lexador/dialetos/palavras-reservadas/egua-classico.js +1 -1
- package/fontes/lexador/dialetos/palavras-reservadas/egua-classico.js.map +1 -1
- package/fontes/lexador/dialetos/palavras-reservadas/visualg.d.ts +24 -0
- package/fontes/lexador/dialetos/palavras-reservadas/visualg.js +25 -1
- package/fontes/lexador/dialetos/palavras-reservadas/visualg.js.map +1 -1
- package/fontes/lexador/lexador-base-linha-unica.js +28 -29
- package/fontes/lexador/lexador-base-linha-unica.js.map +1 -1
- package/fontes/lexador/lexador.js +53 -57
- package/fontes/lexador/lexador.js.map +1 -1
- package/fontes/lexador/palavras-reservadas.js +1 -1
- package/fontes/lexador/palavras-reservadas.js.map +1 -1
- package/fontes/lexador/simbolo.js +5 -6
- package/fontes/lexador/simbolo.js.map +1 -1
- package/fontes/quebras/index.js +11 -42
- package/fontes/quebras/index.js.map +1 -1
- package/fontes/resolvedor/dialetos/egua-classico.js +143 -144
- package/fontes/resolvedor/dialetos/egua-classico.js.map +1 -1
- package/fontes/resolvedor/erro-resolvedor.js +6 -24
- package/fontes/resolvedor/erro-resolvedor.js.map +1 -1
- package/fontes/resolvedor/pilha-escopos.js +11 -12
- package/fontes/resolvedor/pilha-escopos.js.map +1 -1
- package/fontes/tipos-de-simbolos/birl.d.ts +1 -0
- package/fontes/tipos-de-simbolos/birl.js +1 -0
- package/fontes/tipos-de-simbolos/birl.js.map +1 -1
- package/fontes/tipos-de-simbolos/comum.d.ts +2 -0
- package/fontes/tipos-de-simbolos/comum.js +2 -0
- package/fontes/tipos-de-simbolos/comum.js.map +1 -1
- package/fontes/tipos-de-simbolos/visualg.d.ts +9 -0
- package/fontes/tipos-de-simbolos/visualg.js +9 -0
- package/fontes/tipos-de-simbolos/visualg.js.map +1 -1
- package/index.d.ts +4 -0
- package/index.js +4 -26
- package/index.js.map +1 -1
- package/jest.config.js +9 -47
- package/jest.config.js.map +1 -1
- package/package.json +7 -5
- package/testes/__mocks__/estatistica.js +1 -1
- package/testes/__mocks__/estatistica.js.map +1 -1
- package/testes/__mocks__/fisica.js +1 -1
- package/testes/__mocks__/fisica.js.map +1 -1
- package/testes/__mocks__/matematica.js +1 -1
- package/testes/__mocks__/matematica.js.map +1 -1
- package/testes/avaliador-sintatico.test.js +27 -27
- package/testes/avaliador-sintatico.test.js.map +1 -1
- package/testes/biblioteca-global.test.js +197 -440
- package/testes/biblioteca-global.test.js.map +1 -1
- package/testes/birl/avaliador-sintatico.test.js +8 -8
- package/testes/birl/avaliador-sintatico.test.js.map +1 -1
- package/testes/birl/lexador.test.js +10 -10
- package/testes/birl/lexador.test.js.map +1 -1
- package/testes/delegua.test.js +7 -7
- package/testes/delegua.test.js.map +1 -1
- package/testes/egua-classico/avaliador-sintatico.test.js +14 -14
- package/testes/egua-classico/avaliador-sintatico.test.js.map +1 -1
- package/testes/egua-classico/delegua.test.js +5 -5
- package/testes/egua-classico/delegua.test.js.map +1 -1
- package/testes/egua-classico/interpretador.test.js +180 -396
- package/testes/egua-classico/interpretador.test.js.map +1 -1
- package/testes/egua-classico/lexador.test.js +23 -23
- package/testes/egua-classico/lexador.test.js.map +1 -1
- package/testes/egua-classico/resolvedor.test.js +12 -12
- package/testes/egua-classico/resolvedor.test.js.map +1 -1
- package/testes/eguap/avaliador-sintatico.test.js +11 -11
- package/testes/eguap/avaliador-sintatico.test.js.map +1 -1
- package/testes/eguap/interpretador.test.js +189 -405
- package/testes/eguap/interpretador.test.js.map +1 -1
- package/testes/eguap/lexador.test.js +18 -18
- package/testes/eguap/lexador.test.js.map +1 -1
- package/testes/interpretador.test.js +431 -908
- package/testes/interpretador.test.js.map +1 -1
- package/testes/lexador.test.js +42 -42
- package/testes/lexador.test.js.map +1 -1
- package/testes/visualg/avaliador-sintatico.test.js +23 -23
- package/testes/visualg/avaliador-sintatico.test.js.map +1 -1
- package/testes/visualg/interpretador.test.js +16 -61
- package/testes/visualg/interpretador.test.js.map +1 -1
- package/testes/visualg/lexador.test.js +15 -15
- package/testes/visualg/lexador.test.js.map +1 -1
|
@@ -22,162 +22,96 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (_) try {
|
|
41
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
27
|
};
|
|
64
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
29
|
exports.ServidorDepuracao = void 0;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
conexao.write("[adicionar-ponto-parada]: Arquivo '".concat(caminhoArquivo, "' n\u00E3o encontrado\n"));
|
|
30
|
+
const net = __importStar(require("net"));
|
|
31
|
+
const cyrb53_1 = __importDefault(require("./cyrb53"));
|
|
32
|
+
class ServidorDepuracao {
|
|
33
|
+
constructor(_instanciaDelegua) {
|
|
34
|
+
this.validarPontoParada = (caminhoArquivo, linha, conexao) => {
|
|
35
|
+
const hashArquivo = (0, cyrb53_1.default)(caminhoArquivo.toLowerCase());
|
|
36
|
+
if (!this.instanciaDelegua.arquivosAbertos.hasOwnProperty(hashArquivo)) {
|
|
37
|
+
conexao.write(`[adicionar-ponto-parada]: Arquivo '${caminhoArquivo}' não encontrado\n`);
|
|
75
38
|
return { sucesso: false };
|
|
76
39
|
}
|
|
77
|
-
if (
|
|
40
|
+
if (this.instanciaDelegua.conteudoArquivosAbertos[hashArquivo].length <
|
|
78
41
|
linha) {
|
|
79
|
-
conexao.write(
|
|
42
|
+
conexao.write(`[adicionar-ponto-parada]: Linha ${linha} não existente em arquivo '${caminhoArquivo}'\n`);
|
|
80
43
|
return { sucesso: false };
|
|
81
44
|
}
|
|
82
|
-
return { sucesso: true, hashArquivo
|
|
45
|
+
return { sucesso: true, hashArquivo, linha };
|
|
83
46
|
};
|
|
84
|
-
this.comandoAdentrarEscopo =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return [4 /*yield*/, this.interpretador.interpretacaoApenasUmaInstrucao()];
|
|
95
|
-
case 1:
|
|
96
|
-
_a.sent();
|
|
97
|
-
conexao.write(linhasResposta);
|
|
98
|
-
return [2 /*return*/];
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
}); };
|
|
102
|
-
this.comandoAdicionarPontoParada = function (comando, conexao) {
|
|
47
|
+
this.comandoAdentrarEscopo = async (conexao) => {
|
|
48
|
+
let linhasResposta = '';
|
|
49
|
+
linhasResposta += "Recebido comando 'adentrar-escopo'\n";
|
|
50
|
+
linhasResposta += '--- adentrar-escopo-resposta ---\n';
|
|
51
|
+
this.interpretador.comandoAdentrarEscopo = true;
|
|
52
|
+
this.interpretador.pontoDeParadaAtivo = false;
|
|
53
|
+
await this.interpretador.interpretacaoApenasUmaInstrucao();
|
|
54
|
+
conexao.write(linhasResposta);
|
|
55
|
+
};
|
|
56
|
+
this.comandoAdicionarPontoParada = (comando, conexao) => {
|
|
103
57
|
conexao.write("Recebido comando 'adicionar-ponto-parada'\n");
|
|
104
58
|
if (comando.length < 3) {
|
|
105
|
-
conexao.write(
|
|
59
|
+
conexao.write(`[adicionar-ponto-parada]: Formato: adicionar-ponto-parada /caminho/do/arquivo.egua 1\n`);
|
|
106
60
|
return;
|
|
107
61
|
}
|
|
108
|
-
|
|
62
|
+
const validacaoPontoParada = this.validarPontoParada(comando[1], parseInt(comando[2]), conexao);
|
|
109
63
|
if (validacaoPontoParada.sucesso) {
|
|
110
|
-
|
|
64
|
+
this.interpretador.pontosParada.push({
|
|
111
65
|
hashArquivo: validacaoPontoParada.hashArquivo,
|
|
112
66
|
linha: validacaoPontoParada.linha,
|
|
113
67
|
});
|
|
114
68
|
}
|
|
115
69
|
};
|
|
116
|
-
this.comandoAvaliar =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}); };
|
|
147
|
-
this.comandoContinuar = function (conexao) { return __awaiter(_this, void 0, void 0, function () {
|
|
148
|
-
var linhasResposta;
|
|
149
|
-
return __generator(this, function (_a) {
|
|
150
|
-
switch (_a.label) {
|
|
151
|
-
case 0:
|
|
152
|
-
linhasResposta = '';
|
|
153
|
-
linhasResposta += "Recebido comando 'continuar'\n";
|
|
154
|
-
this.interpretador.pontoDeParadaAtivo = false;
|
|
155
|
-
return [4 /*yield*/, this.interpretador.continuarInterpretacao()];
|
|
156
|
-
case 1:
|
|
157
|
-
_a.sent();
|
|
158
|
-
linhasResposta += '--- continuar-resposta ---\n';
|
|
159
|
-
conexao.write(linhasResposta);
|
|
160
|
-
return [2 /*return*/];
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
}); };
|
|
164
|
-
this.comandoPilhaExecucao = function (conexao) {
|
|
165
|
-
var linhasResposta = '';
|
|
70
|
+
this.comandoAvaliar = async (comando, conexao) => {
|
|
71
|
+
let linhasResposta = '';
|
|
72
|
+
comando.shift();
|
|
73
|
+
const expressaoAvaliar = comando.join(' ');
|
|
74
|
+
let retornoInterpretacao;
|
|
75
|
+
let textoInterpretacao;
|
|
76
|
+
try {
|
|
77
|
+
retornoInterpretacao =
|
|
78
|
+
await this.instanciaDelegua.executarUmaLinha(expressaoAvaliar);
|
|
79
|
+
textoInterpretacao = retornoInterpretacao.resultado;
|
|
80
|
+
}
|
|
81
|
+
catch (erro) {
|
|
82
|
+
textoInterpretacao = [String(erro)];
|
|
83
|
+
}
|
|
84
|
+
linhasResposta += "Recebido comando 'avaliar'\n";
|
|
85
|
+
linhasResposta += '--- avaliar-resposta ---\n';
|
|
86
|
+
linhasResposta += textoInterpretacao.join('\n') + '\n';
|
|
87
|
+
linhasResposta += '--- fim-avaliar-resposta ---\n';
|
|
88
|
+
conexao.write(linhasResposta);
|
|
89
|
+
};
|
|
90
|
+
this.comandoContinuar = async (conexao) => {
|
|
91
|
+
let linhasResposta = '';
|
|
92
|
+
linhasResposta += "Recebido comando 'continuar'\n";
|
|
93
|
+
this.interpretador.pontoDeParadaAtivo = false;
|
|
94
|
+
await this.interpretador.continuarInterpretacao();
|
|
95
|
+
linhasResposta += '--- continuar-resposta ---\n';
|
|
96
|
+
conexao.write(linhasResposta);
|
|
97
|
+
};
|
|
98
|
+
this.comandoPilhaExecucao = (conexao) => {
|
|
99
|
+
let linhasResposta = '';
|
|
166
100
|
linhasResposta += "Recebido comando 'pilha-execucao'\n";
|
|
167
|
-
|
|
101
|
+
const pilhaEscoposExecucao = this.interpretador.pilhaEscoposExecucao;
|
|
168
102
|
linhasResposta += '--- pilha-execucao-resposta ---\n';
|
|
169
103
|
try {
|
|
170
|
-
for (
|
|
171
|
-
|
|
172
|
-
|
|
104
|
+
for (let i = pilhaEscoposExecucao.pilha.length - 1; i > 0; i--) {
|
|
105
|
+
const elementoPilha = pilhaEscoposExecucao.pilha[i];
|
|
106
|
+
const posicaoDeclaracaoAtual = elementoPilha.declaracaoAtual >=
|
|
173
107
|
elementoPilha.declaracoes.length
|
|
174
108
|
? elementoPilha.declaracoes.length - 1
|
|
175
109
|
: elementoPilha.declaracaoAtual;
|
|
176
|
-
|
|
110
|
+
const declaracaoAtual = elementoPilha.declaracoes[posicaoDeclaracaoAtual];
|
|
177
111
|
linhasResposta +=
|
|
178
|
-
|
|
112
|
+
this.instanciaDelegua.conteudoArquivosAbertos[declaracaoAtual.hashArquivo][declaracaoAtual.linha - 1].trim() +
|
|
179
113
|
' --- ' +
|
|
180
|
-
|
|
114
|
+
this.instanciaDelegua.arquivosAbertos[declaracaoAtual.hashArquivo] +
|
|
181
115
|
'::' +
|
|
182
116
|
declaracaoAtual.assinaturaMetodo +
|
|
183
117
|
'::' +
|
|
@@ -191,70 +125,56 @@ var ServidorDepuracao = /** @class */ (function () {
|
|
|
191
125
|
conexao.write(erro + '\n');
|
|
192
126
|
}
|
|
193
127
|
};
|
|
194
|
-
this.comandoPontosParada =
|
|
195
|
-
|
|
128
|
+
this.comandoPontosParada = (conexao) => {
|
|
129
|
+
let linhasResposta = '';
|
|
196
130
|
linhasResposta += "Recebido comando 'pontos-parada'\n";
|
|
197
|
-
for (
|
|
198
|
-
var pontoParada = _a[_i];
|
|
131
|
+
for (const pontoParada of this.interpretador.pontosParada) {
|
|
199
132
|
linhasResposta +=
|
|
200
|
-
|
|
133
|
+
this.instanciaDelegua.arquivosAbertos[pontoParada.hashArquivo] +
|
|
201
134
|
': ' +
|
|
202
135
|
pontoParada.linha +
|
|
203
136
|
'\n';
|
|
204
137
|
}
|
|
205
138
|
conexao.write(linhasResposta);
|
|
206
139
|
};
|
|
207
|
-
this.comandoProximo =
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
_a.sent();
|
|
220
|
-
this.interpretador.comandoProximo = false;
|
|
221
|
-
conexao.write(linhasResposta);
|
|
222
|
-
return [2 /*return*/];
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
}); };
|
|
226
|
-
this.comandoRemoverPontoParada = function (comando, conexao) {
|
|
227
|
-
var linhasResposta = '';
|
|
140
|
+
this.comandoProximo = async (conexao) => {
|
|
141
|
+
let linhasResposta = '';
|
|
142
|
+
linhasResposta += "Recebido comando 'proximo'\n";
|
|
143
|
+
linhasResposta += '--- proximo-resposta ---\n';
|
|
144
|
+
this.interpretador.comandoProximo = true;
|
|
145
|
+
this.interpretador.pontoDeParadaAtivo = false;
|
|
146
|
+
await this.interpretador.interpretacaoApenasUmaInstrucao();
|
|
147
|
+
this.interpretador.comandoProximo = false;
|
|
148
|
+
conexao.write(linhasResposta);
|
|
149
|
+
};
|
|
150
|
+
this.comandoRemoverPontoParada = (comando, conexao) => {
|
|
151
|
+
let linhasResposta = '';
|
|
228
152
|
linhasResposta += "Recebido comando 'remover-ponto-parada'\n";
|
|
229
153
|
if (comando.length < 3) {
|
|
230
|
-
linhasResposta +=
|
|
154
|
+
linhasResposta += `[adicionar-ponto-parada]: Formato: adicionar-ponto-parada /caminho/do/arquivo.egua 1\n`;
|
|
231
155
|
conexao.write(linhasResposta);
|
|
232
156
|
return;
|
|
233
157
|
}
|
|
234
|
-
|
|
158
|
+
const validacaoPontoParada = this.validarPontoParada(comando[1], parseInt(comando[2]), conexao);
|
|
235
159
|
if (validacaoPontoParada.sucesso) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
p.linha !== validacaoPontoParada.linha;
|
|
240
|
-
});
|
|
160
|
+
this.interpretador.pontosParada =
|
|
161
|
+
this.interpretador.pontosParada.filter((p) => p.hashArquivo !== validacaoPontoParada.hashArquivo &&
|
|
162
|
+
p.linha !== validacaoPontoParada.linha);
|
|
241
163
|
}
|
|
242
164
|
};
|
|
243
|
-
this.comandoSairEscopo =
|
|
165
|
+
this.comandoSairEscopo = (conexao) => {
|
|
244
166
|
conexao.write("Recebido comando 'sair-escopo'\n");
|
|
245
|
-
|
|
246
|
-
|
|
167
|
+
this.interpretador.pontoDeParadaAtivo = false;
|
|
168
|
+
this.interpretador.proximoESair();
|
|
247
169
|
};
|
|
248
|
-
this.comandoVariaveis =
|
|
249
|
-
|
|
170
|
+
this.comandoVariaveis = (conexao) => {
|
|
171
|
+
let linhasResposta = '';
|
|
250
172
|
linhasResposta +=
|
|
251
173
|
"Recebido comando 'variaveis'. Enviando variáveis do escopo atual\n";
|
|
252
|
-
|
|
174
|
+
const todasVariaveis = this.interpretador.pilhaEscoposExecucao.obterTodasVariaveis([]);
|
|
253
175
|
linhasResposta += '--- variaveis-resposta ---\n';
|
|
254
|
-
for (
|
|
255
|
-
|
|
256
|
-
for (var _a = 0, _b = Object.entries(grupoVariavel); _a < _b.length; _a++) {
|
|
257
|
-
var _c = _b[_a], nomeVariavel = _c[0], valor = _c[1];
|
|
176
|
+
for (const grupoVariavel of todasVariaveis) {
|
|
177
|
+
for (const [nomeVariavel, valor] of Object.entries(grupoVariavel)) {
|
|
258
178
|
if (valor) {
|
|
259
179
|
linhasResposta +=
|
|
260
180
|
nomeVariavel +
|
|
@@ -273,68 +193,67 @@ var ServidorDepuracao = /** @class */ (function () {
|
|
|
273
193
|
* Função que descreve como conexão com clientes de depuração deve ser operada.
|
|
274
194
|
* @param conexao Instância de conexão, tipo net.Socket.
|
|
275
195
|
*/
|
|
276
|
-
this.operarConexao =
|
|
277
|
-
|
|
196
|
+
this.operarConexao = (conexao) => {
|
|
197
|
+
const enderecoRemoto = conexao.remoteAddress + ':' + conexao.remotePort;
|
|
278
198
|
process.stdout.write('\n[Depurador] Nova conexão de cliente de ' +
|
|
279
199
|
enderecoRemoto +
|
|
280
200
|
'\ndelegua> ');
|
|
281
201
|
conexao.setEncoding('utf8');
|
|
282
|
-
|
|
202
|
+
this.conexoes[this.contadorConexoes++] = conexao;
|
|
283
203
|
// Aqui, dados pode ter uma série de comandos, sendo um por linha.
|
|
284
|
-
|
|
285
|
-
|
|
204
|
+
const aoReceberDados = (dados) => {
|
|
205
|
+
const comandos = String(dados).split('\n');
|
|
286
206
|
process.stdout.write('\n[Depurador] Dados da conexão vindos de ' +
|
|
287
207
|
enderecoRemoto +
|
|
288
208
|
': ' +
|
|
289
209
|
comandos +
|
|
290
210
|
'\ndelegua> ');
|
|
291
|
-
for (
|
|
292
|
-
|
|
293
|
-
var partesComando = comando.split(' ');
|
|
211
|
+
for (const comando of comandos) {
|
|
212
|
+
const partesComando = comando.split(' ');
|
|
294
213
|
switch (partesComando[0]) {
|
|
295
214
|
case 'adentrar-escopo':
|
|
296
|
-
|
|
215
|
+
this.comandoAdentrarEscopo(conexao);
|
|
297
216
|
break;
|
|
298
217
|
case 'adicionar-ponto-parada':
|
|
299
|
-
|
|
218
|
+
this.comandoAdicionarPontoParada(partesComando, conexao);
|
|
300
219
|
break;
|
|
301
220
|
case 'avaliar':
|
|
302
|
-
|
|
221
|
+
this.comandoAvaliar(partesComando, conexao);
|
|
303
222
|
break;
|
|
304
223
|
case 'continuar':
|
|
305
|
-
|
|
224
|
+
this.comandoContinuar(conexao);
|
|
306
225
|
break;
|
|
307
226
|
case 'pilha-execucao':
|
|
308
|
-
|
|
227
|
+
this.comandoPilhaExecucao(conexao);
|
|
309
228
|
break;
|
|
310
229
|
case 'pontos-parada':
|
|
311
|
-
|
|
230
|
+
this.comandoPontosParada(conexao);
|
|
312
231
|
break;
|
|
313
232
|
case 'proximo':
|
|
314
|
-
|
|
233
|
+
this.comandoProximo(conexao);
|
|
315
234
|
break;
|
|
316
235
|
case 'remover-ponto-parada':
|
|
317
|
-
|
|
236
|
+
this.comandoRemoverPontoParada(partesComando, conexao);
|
|
318
237
|
break;
|
|
319
238
|
case 'sair-escopo':
|
|
320
|
-
|
|
239
|
+
this.comandoSairEscopo(conexao);
|
|
321
240
|
break;
|
|
322
241
|
case 'tchau':
|
|
323
242
|
conexao.write("Recebido comando 'tchau'. Conexão será encerrada\n");
|
|
324
|
-
|
|
243
|
+
this.finalizarServidorDepuracao();
|
|
325
244
|
return;
|
|
326
245
|
case 'variaveis':
|
|
327
|
-
|
|
246
|
+
this.comandoVariaveis(conexao);
|
|
328
247
|
break;
|
|
329
248
|
}
|
|
330
249
|
}
|
|
331
250
|
};
|
|
332
|
-
|
|
251
|
+
const aoFecharConexao = () => {
|
|
333
252
|
process.stdout.write('\n[Depurador] Conexão de ' +
|
|
334
253
|
enderecoRemoto +
|
|
335
254
|
' fechada\ndelegua> ');
|
|
336
255
|
};
|
|
337
|
-
|
|
256
|
+
const aoObterErro = (erro) => {
|
|
338
257
|
process.stdout.write('\n[Depurador] Conexão ' +
|
|
339
258
|
enderecoRemoto +
|
|
340
259
|
' com erro: ' +
|
|
@@ -343,9 +262,9 @@ var ServidorDepuracao = /** @class */ (function () {
|
|
|
343
262
|
};
|
|
344
263
|
// `.bind()` é necessário aqui para que os eventos não usem net.Socket ou net.Server como o `this`,
|
|
345
264
|
// como acontece normalmente se o `.bind()` não é chamado.
|
|
346
|
-
conexao.on('data', aoReceberDados.bind(
|
|
347
|
-
conexao.once('close', aoFecharConexao.bind(
|
|
348
|
-
conexao.on('error', aoObterErro.bind(
|
|
265
|
+
conexao.on('data', aoReceberDados.bind(this));
|
|
266
|
+
conexao.once('close', aoFecharConexao.bind(this));
|
|
267
|
+
conexao.on('error', aoObterErro.bind(this));
|
|
349
268
|
};
|
|
350
269
|
this.instanciaDelegua = _instanciaDelegua;
|
|
351
270
|
this.instanciaDelegua.funcaoDeRetorno =
|
|
@@ -366,30 +285,27 @@ var ServidorDepuracao = /** @class */ (function () {
|
|
|
366
285
|
this.contadorConexoes = 0;
|
|
367
286
|
this.operarConexao.bind(this);
|
|
368
287
|
}
|
|
369
|
-
|
|
288
|
+
iniciarServidorDepuracao() {
|
|
370
289
|
// É necessário mudar o `this` aqui por `.bind()`, senão `this` será net.Server dentro dos métodos.
|
|
371
290
|
this.servidor.on('connection', this.operarConexao.bind(this));
|
|
372
291
|
this.servidor.listen(7777);
|
|
373
292
|
process.stdout.write('\n[Depurador] Servidor de depuração iniciado na porta 7777');
|
|
374
293
|
return this.servidor.address();
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
_this.conexoes[chave].write('Enviando mensagem de saída\n--- mensagem-saida ---\n' +
|
|
294
|
+
}
|
|
295
|
+
escreverSaidaParaTodosClientes(mensagem) {
|
|
296
|
+
Object.keys(this.conexoes).forEach((chave) => {
|
|
297
|
+
this.conexoes[chave].write('Enviando mensagem de saída\n--- mensagem-saida ---\n' +
|
|
380
298
|
mensagem +
|
|
381
299
|
'\n');
|
|
382
300
|
});
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
_this.conexoes[chave].end();
|
|
301
|
+
}
|
|
302
|
+
finalizarServidorDepuracao() {
|
|
303
|
+
Object.keys(this.conexoes).forEach((chave) => {
|
|
304
|
+
this.conexoes[chave].write('--- finalizando ---\n');
|
|
305
|
+
this.conexoes[chave].end();
|
|
389
306
|
});
|
|
390
307
|
this.servidor.close();
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
}());
|
|
308
|
+
}
|
|
309
|
+
}
|
|
394
310
|
exports.ServidorDepuracao = ServidorDepuracao;
|
|
395
311
|
//# sourceMappingURL=servidor-depuracao.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"servidor-depuracao.js","sourceRoot":"","sources":["../../../fontes/depuracao/servidor-depuracao.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"servidor-depuracao.js","sourceRoot":"","sources":["../../../fontes/depuracao/servidor-depuracao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAS3B,sDAA8B;AAG9B,MAAa,iBAAiB;IAO1B,YAAY,iBAAmC;QAsB/C,uBAAkB,GAAG,CACjB,cAAsB,EACtB,KAAa,EACb,OAAmB,EAChB,EAAE;YACL,MAAM,WAAW,GAAG,IAAA,gBAAM,EAAC,cAAc,CAAC,WAAW,EAAE,CAAC,CAAC;YACzD,IACI,CAAC,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,cAAc,CAAC,WAAW,CAAC,EACpE;gBACE,OAAO,CAAC,KAAK,CACT,sCAAsC,cAAc,oBAAoB,CAC3E,CAAC;gBACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;aAC7B;YAED,IACI,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,MAAM;gBACjE,KAAK,EACP;gBACE,OAAO,CAAC,KAAK,CACT,mCAAmC,KAAK,8BAA8B,cAAc,KAAK,CAC5F,CAAC;gBACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;aAC7B;YAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;QACjD,CAAC,CAAC;QAEF,0BAAqB,GAAG,KAAK,EAAE,OAAmB,EAAgB,EAAE;YAChE,IAAI,cAAc,GAAG,EAAE,CAAC;YACxB,cAAc,IAAI,sCAAsC,CAAC;YACzD,cAAc,IAAI,oCAAoC,CAAC;YAEvD,IAAI,CAAC,aAA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AgUD,wBAAwB;QACpB,mGAAmG;QACnG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAE9D,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAChB,4DAA4D,CAC/D,CAAC;QAEF,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAqB,CAAC;IACtD,CAAC;IAED,8BAA8B,CAAC,QAAgB;QAC3C,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACzC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CACtB,sDAAsD;gBAClD,QAAQ;gBACR,IAAI,CACX,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;IAED,0BAA0B;QACtB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACzC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;YACpD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;CACJ;AAzXD,8CAyXC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EspacoVariaveis = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
class EspacoVariaveis {
|
|
5
|
+
constructor() {
|
|
6
6
|
this.valores = {};
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
}());
|
|
8
|
+
}
|
|
10
9
|
exports.EspacoVariaveis = EspacoVariaveis;
|
|
11
10
|
//# sourceMappingURL=espaco-variaveis.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"espaco-variaveis.js","sourceRoot":"","sources":["../../fontes/espaco-variaveis.ts"],"names":[],"mappings":";;;AAEA;
|
|
1
|
+
{"version":3,"file":"espaco-variaveis.js","sourceRoot":"","sources":["../../fontes/espaco-variaveis.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAe;IAGxB;QACI,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACtB,CAAC;CACJ;AAND,0CAMC"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Chamavel = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
Chamavel.prototype.aridade = function () {
|
|
4
|
+
class Chamavel {
|
|
5
|
+
aridade() {
|
|
8
6
|
return this.valorAridade;
|
|
9
|
-
}
|
|
10
|
-
|
|
7
|
+
}
|
|
8
|
+
chamar(interpretador, argumentos, simbolo) {
|
|
11
9
|
throw new Error('Este método não deveria ser chamado.');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
}());
|
|
10
|
+
}
|
|
11
|
+
}
|
|
15
12
|
exports.Chamavel = Chamavel;
|
|
16
13
|
//# sourceMappingURL=chamavel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chamavel.js","sourceRoot":"","sources":["../../../fontes/estruturas/chamavel.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"chamavel.js","sourceRoot":"","sources":["../../../fontes/estruturas/chamavel.ts"],"names":[],"mappings":";;;AAAA,MAAa,QAAQ;IAGjB,OAAO;QACH,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,aAAmB,EAAE,UAAgB,EAAE,OAAa;QACvD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC5D,CAAC;CACJ;AAVD,4BAUC"}
|