@designliquido/delegua 0.13.2 → 0.14.1
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 +3 -54
- package/bin/package.json +2 -12
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-guarani.d.ts +20 -0
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-guarani.js +150 -0
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-guarani.js.map +1 -0
- package/fontes/avaliador-sintatico/dialetos/index.d.ts +4 -0
- package/fontes/avaliador-sintatico/dialetos/index.js +4 -0
- package/fontes/avaliador-sintatico/dialetos/index.js.map +1 -1
- package/fontes/depuracao/index.d.ts +0 -1
- package/fontes/depuracao/index.js +0 -1
- package/fontes/depuracao/index.js.map +1 -1
- package/fontes/interfaces/index.d.ts +0 -2
- package/fontes/interfaces/index.js +0 -2
- package/fontes/interfaces/index.js.map +1 -1
- package/fontes/interpretador/dialetos/egua-classico/interpretador-egua-classico.d.ts +2 -4
- package/fontes/interpretador/dialetos/egua-classico/interpretador-egua-classico.js +34 -43
- package/fontes/interpretador/dialetos/egua-classico/interpretador-egua-classico.js.map +1 -1
- package/fontes/interpretador/dialetos/visualg/interpretador-visualg-com-depuracao.d.ts +1 -2
- package/fontes/interpretador/dialetos/visualg/interpretador-visualg-com-depuracao.js +2 -2
- package/fontes/interpretador/dialetos/visualg/interpretador-visualg-com-depuracao.js.map +1 -1
- package/fontes/interpretador/dialetos/visualg/interpretador-visualg.d.ts +3 -4
- package/fontes/interpretador/dialetos/visualg/interpretador-visualg.js +3 -3
- package/fontes/interpretador/dialetos/visualg/interpretador-visualg.js.map +1 -1
- package/fontes/interpretador/index.d.ts +0 -1
- package/fontes/interpretador/index.js +0 -1
- package/fontes/interpretador/index.js.map +1 -1
- package/fontes/interpretador/interpretador-base.d.ts +2 -4
- package/fontes/interpretador/interpretador-base.js +1 -2
- package/fontes/interpretador/interpretador-base.js.map +1 -1
- package/fontes/interpretador/interpretador-com-depuracao.d.ts +4 -4
- package/fontes/interpretador/interpretador-com-depuracao.js +4 -4
- package/fontes/interpretador/interpretador-com-depuracao.js.map +1 -1
- package/fontes/lexador/dialetos/index.d.ts +5 -0
- package/fontes/lexador/dialetos/index.js +5 -0
- package/fontes/lexador/dialetos/index.js.map +1 -1
- package/fontes/lexador/dialetos/lexador-guarani.d.ts +9 -0
- package/fontes/lexador/dialetos/lexador-guarani.js +114 -0
- package/fontes/lexador/dialetos/lexador-guarani.js.map +1 -0
- package/fontes/lexador/dialetos/palavras-reservadas/guarani.d.ts +4 -0
- package/fontes/lexador/dialetos/palavras-reservadas/guarani.js +10 -0
- package/fontes/lexador/dialetos/palavras-reservadas/guarani.js.map +1 -0
- package/fontes/lexador/dialetos/palavras-reservadas/rantiaquin.d.ts +2 -0
- package/fontes/{importador/retorno-importador.js → lexador/dialetos/palavras-reservadas/rantiaquin.js} +2 -1
- package/fontes/lexador/dialetos/palavras-reservadas/rantiaquin.js.map +1 -0
- package/fontes/tipos-de-simbolos/guarani.d.ts +14 -0
- package/fontes/tipos-de-simbolos/guarani.js +16 -0
- package/fontes/tipos-de-simbolos/guarani.js.map +1 -0
- package/fontes/tipos-de-simbolos/rantiaquin.d.ts +2 -0
- package/fontes/{interfaces/delegua-interface.js → tipos-de-simbolos/rantiaquin.js} +2 -1
- package/fontes/tipos-de-simbolos/rantiaquin.js.map +1 -0
- package/index.d.ts +0 -2
- package/index.js +0 -2
- package/index.js.map +1 -1
- package/package.json +2 -12
- package/execucao.d.ts +0 -1
- package/execucao.js +0 -43
- package/execucao.js.map +0 -1
- package/fontes/bibliotecas/importar-biblioteca.d.ts +0 -2
- package/fontes/bibliotecas/importar-biblioteca.js +0 -132
- package/fontes/bibliotecas/importar-biblioteca.js.map +0 -1
- package/fontes/delegua.d.ts +0 -86
- package/fontes/delegua.js +0 -372
- package/fontes/delegua.js.map +0 -1
- package/fontes/depuracao/remota/servidor-depuracao.d.ts +0 -41
- package/fontes/depuracao/remota/servidor-depuracao.js +0 -301
- package/fontes/depuracao/remota/servidor-depuracao.js.map +0 -1
- package/fontes/importador/importador.d.ts +0 -27
- package/fontes/importador/importador.js +0 -91
- package/fontes/importador/importador.js.map +0 -1
- package/fontes/importador/index.d.ts +0 -2
- package/fontes/importador/index.js +0 -19
- package/fontes/importador/index.js.map +0 -1
- package/fontes/importador/retorno-importador.d.ts +0 -9
- package/fontes/importador/retorno-importador.js.map +0 -1
- package/fontes/interfaces/delegua-interface.d.ts +0 -23
- package/fontes/interfaces/delegua-interface.js.map +0 -1
- package/fontes/interfaces/importador-interface.d.ts +0 -8
- package/fontes/interfaces/importador-interface.js +0 -3
- package/fontes/interfaces/importador-interface.js.map +0 -1
- package/fontes/interpretador/interpretador.d.ts +0 -17
- package/fontes/interpretador/interpretador.js +0 -80
- package/fontes/interpretador/interpretador.js.map +0 -1
|
@@ -1,301 +0,0 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ServidorDepuracao = void 0;
|
|
30
|
-
const net = __importStar(require("net"));
|
|
31
|
-
const cyrb53_1 = __importDefault(require("../cyrb53"));
|
|
32
|
-
/**
|
|
33
|
-
* Esta foi a primeira implementacão do mecanismo de depuração, usando comunicação por _sockets_.
|
|
34
|
-
* Inicialmente uma integração foi implementada na extensão do VSCode, mas o protocolo de
|
|
35
|
-
* comunicação nunca foi exatamente maturado, em favor de uma implementação na extensão
|
|
36
|
-
* usando a linguagem diretamente.
|
|
37
|
-
*
|
|
38
|
-
* Mecanismo poderá ser maturado num futuro próximo. Para mais detalhes, ler `README.md`.
|
|
39
|
-
*/
|
|
40
|
-
class ServidorDepuracao {
|
|
41
|
-
constructor(_instanciaDelegua) {
|
|
42
|
-
this.validarPontoParada = (caminhoArquivo, linha, conexao) => {
|
|
43
|
-
const hashArquivo = (0, cyrb53_1.default)(caminhoArquivo.toLowerCase());
|
|
44
|
-
if (!this.instanciaDelegua.arquivosAbertos.hasOwnProperty(hashArquivo)) {
|
|
45
|
-
conexao.write(`[adicionar-ponto-parada]: Arquivo '${caminhoArquivo}' não encontrado\n`);
|
|
46
|
-
return { sucesso: false };
|
|
47
|
-
}
|
|
48
|
-
if (this.instanciaDelegua.conteudoArquivosAbertos[hashArquivo].length < linha) {
|
|
49
|
-
conexao.write(`[adicionar-ponto-parada]: Linha ${linha} não existente em arquivo '${caminhoArquivo}'\n`);
|
|
50
|
-
return { sucesso: false };
|
|
51
|
-
}
|
|
52
|
-
return { sucesso: true, hashArquivo, linha };
|
|
53
|
-
};
|
|
54
|
-
this.comandoAdentrarEscopo = async (conexao) => {
|
|
55
|
-
let linhasResposta = '';
|
|
56
|
-
linhasResposta += "Recebido comando 'adentrar-escopo'\n";
|
|
57
|
-
linhasResposta += '--- adentrar-escopo-resposta ---\n';
|
|
58
|
-
this.interpretador.comando = 'adentrarEscopo';
|
|
59
|
-
this.interpretador.pontoDeParadaAtivo = false;
|
|
60
|
-
await this.interpretador.instrucaoPasso();
|
|
61
|
-
conexao.write(linhasResposta);
|
|
62
|
-
};
|
|
63
|
-
this.comandoAdicionarPontoParada = (comando, conexao) => {
|
|
64
|
-
conexao.write("Recebido comando 'adicionar-ponto-parada'\n");
|
|
65
|
-
if (comando.length < 3) {
|
|
66
|
-
conexao.write(`[adicionar-ponto-parada]: Formato: adicionar-ponto-parada /caminho/do/arquivo.egua 1\n`);
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
const validacaoPontoParada = this.validarPontoParada(comando[1], parseInt(comando[2]), conexao);
|
|
70
|
-
if (validacaoPontoParada.sucesso) {
|
|
71
|
-
this.interpretador.pontosParada.push({
|
|
72
|
-
hashArquivo: validacaoPontoParada.hashArquivo,
|
|
73
|
-
linha: validacaoPontoParada.linha,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
this.comandoAvaliar = async (comando, conexao) => {
|
|
78
|
-
let linhasResposta = '';
|
|
79
|
-
comando.shift();
|
|
80
|
-
const expressaoAvaliar = comando.join(' ');
|
|
81
|
-
let retornoInterpretacao;
|
|
82
|
-
let resultadoInterpretacao;
|
|
83
|
-
try {
|
|
84
|
-
retornoInterpretacao = await this.instanciaDelegua.executarUmaLinha(expressaoAvaliar);
|
|
85
|
-
resultadoInterpretacao = retornoInterpretacao.resultado;
|
|
86
|
-
}
|
|
87
|
-
catch (erro) {
|
|
88
|
-
resultadoInterpretacao = [String(erro)];
|
|
89
|
-
}
|
|
90
|
-
linhasResposta += "Recebido comando 'avaliar'\n";
|
|
91
|
-
linhasResposta += '--- avaliar-resposta ---\n';
|
|
92
|
-
linhasResposta += JSON.stringify(resultadoInterpretacao[0]) + '\n';
|
|
93
|
-
linhasResposta += '--- fim-avaliar-resposta ---\n';
|
|
94
|
-
conexao.write(linhasResposta);
|
|
95
|
-
};
|
|
96
|
-
this.comandoAvaliarVariavel = async (comando, conexao) => {
|
|
97
|
-
let linhasResposta = '';
|
|
98
|
-
comando.shift();
|
|
99
|
-
const nomeVariavel = comando.join(' ');
|
|
100
|
-
linhasResposta += "Recebido comando 'avaliar-variavel'\n";
|
|
101
|
-
linhasResposta += '--- avaliar-variavel-resposta ---\n';
|
|
102
|
-
try {
|
|
103
|
-
linhasResposta += JSON.stringify(this.interpretador.obterVariavel(nomeVariavel)) + '\n';
|
|
104
|
-
}
|
|
105
|
-
catch (erro) {
|
|
106
|
-
linhasResposta += String(erro) + '\n';
|
|
107
|
-
}
|
|
108
|
-
linhasResposta += '--- fim-avaliar-variavel-resposta ---\n';
|
|
109
|
-
conexao.write(linhasResposta);
|
|
110
|
-
};
|
|
111
|
-
this.comandoContinuar = async (conexao) => {
|
|
112
|
-
let linhasResposta = '';
|
|
113
|
-
linhasResposta += "Recebido comando 'continuar'\n";
|
|
114
|
-
this.interpretador.pontoDeParadaAtivo = false;
|
|
115
|
-
await this.interpretador.instrucaoContinuarInterpretacao();
|
|
116
|
-
linhasResposta += '--- continuar-resposta ---\n';
|
|
117
|
-
conexao.write(linhasResposta);
|
|
118
|
-
};
|
|
119
|
-
this.comandoPilhaExecucao = (conexao) => {
|
|
120
|
-
let linhasResposta = '';
|
|
121
|
-
linhasResposta += "Recebido comando 'pilha-execucao'\n";
|
|
122
|
-
const pilhaEscoposExecucao = this.interpretador.pilhaEscoposExecucao;
|
|
123
|
-
linhasResposta += '--- pilha-execucao-resposta ---\n';
|
|
124
|
-
try {
|
|
125
|
-
for (let i = pilhaEscoposExecucao.pilha.length - 1; i > 0; i--) {
|
|
126
|
-
const elementoPilha = pilhaEscoposExecucao.pilha[i];
|
|
127
|
-
const posicaoDeclaracaoAtual = elementoPilha.declaracaoAtual >= elementoPilha.declaracoes.length
|
|
128
|
-
? elementoPilha.declaracoes.length - 1
|
|
129
|
-
: elementoPilha.declaracaoAtual;
|
|
130
|
-
const declaracaoAtual = elementoPilha.declaracoes[posicaoDeclaracaoAtual];
|
|
131
|
-
linhasResposta +=
|
|
132
|
-
this.instanciaDelegua.conteudoArquivosAbertos[declaracaoAtual.hashArquivo][declaracaoAtual.linha - 1].trim() +
|
|
133
|
-
' --- ' +
|
|
134
|
-
this.instanciaDelegua.arquivosAbertos[declaracaoAtual.hashArquivo] +
|
|
135
|
-
'::' +
|
|
136
|
-
declaracaoAtual.assinaturaMetodo +
|
|
137
|
-
'::' +
|
|
138
|
-
declaracaoAtual.linha +
|
|
139
|
-
'\n';
|
|
140
|
-
}
|
|
141
|
-
linhasResposta += '--- fim-pilha-execucao-resposta ---\n';
|
|
142
|
-
conexao.write(linhasResposta);
|
|
143
|
-
}
|
|
144
|
-
catch (erro) {
|
|
145
|
-
conexao.write(erro + '\n');
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
this.comandoPontosParada = (conexao) => {
|
|
149
|
-
let linhasResposta = '';
|
|
150
|
-
linhasResposta += "Recebido comando 'pontos-parada'\n";
|
|
151
|
-
for (const pontoParada of this.interpretador.pontosParada) {
|
|
152
|
-
linhasResposta +=
|
|
153
|
-
this.instanciaDelegua.arquivosAbertos[pontoParada.hashArquivo] + ': ' + pontoParada.linha + '\n';
|
|
154
|
-
}
|
|
155
|
-
conexao.write(linhasResposta);
|
|
156
|
-
};
|
|
157
|
-
this.comandoProximo = async (conexao) => {
|
|
158
|
-
let linhasResposta = '';
|
|
159
|
-
linhasResposta += "Recebido comando 'proximo'\n";
|
|
160
|
-
linhasResposta += '--- proximo-resposta ---\n';
|
|
161
|
-
this.interpretador.comando = 'proximo';
|
|
162
|
-
this.interpretador.pontoDeParadaAtivo = false;
|
|
163
|
-
try {
|
|
164
|
-
await this.interpretador.instrucaoPasso();
|
|
165
|
-
}
|
|
166
|
-
catch (erro) {
|
|
167
|
-
console.error(erro);
|
|
168
|
-
}
|
|
169
|
-
conexao.write(linhasResposta);
|
|
170
|
-
};
|
|
171
|
-
this.comandoRemoverPontoParada = (comando, conexao) => {
|
|
172
|
-
let linhasResposta = '';
|
|
173
|
-
linhasResposta += "Recebido comando 'remover-ponto-parada'\n";
|
|
174
|
-
if (comando.length < 3) {
|
|
175
|
-
linhasResposta += `[adicionar-ponto-parada]: Formato: adicionar-ponto-parada /caminho/do/arquivo.egua 1\n`;
|
|
176
|
-
conexao.write(linhasResposta);
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
const validacaoPontoParada = this.validarPontoParada(comando[1], parseInt(comando[2]), conexao);
|
|
180
|
-
if (validacaoPontoParada.sucesso) {
|
|
181
|
-
this.interpretador.pontosParada = this.interpretador.pontosParada.filter((p) => p.hashArquivo !== validacaoPontoParada.hashArquivo && p.linha !== validacaoPontoParada.linha);
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
this.comandoSairEscopo = async (conexao) => {
|
|
185
|
-
let linhasResposta = '';
|
|
186
|
-
linhasResposta += "Recebido comando 'sair-escopo'\n";
|
|
187
|
-
this.interpretador.pontoDeParadaAtivo = false;
|
|
188
|
-
await this.interpretador.instrucaoProximoESair();
|
|
189
|
-
linhasResposta += '--- sair-escopo-resposta ---\n';
|
|
190
|
-
conexao.write(linhasResposta);
|
|
191
|
-
};
|
|
192
|
-
this.comandoVariaveis = (conexao) => {
|
|
193
|
-
let linhasResposta = '';
|
|
194
|
-
linhasResposta += "Recebido comando 'variaveis'. Enviando variáveis do escopo atual\n";
|
|
195
|
-
const todasVariaveis = this.interpretador.pilhaEscoposExecucao.obterTodasVariaveis([]);
|
|
196
|
-
linhasResposta += '--- variaveis-resposta ---\n';
|
|
197
|
-
for (const variavel of todasVariaveis) {
|
|
198
|
-
linhasResposta += variavel.nome + ' :: ' + variavel.tipo + ' :: ' + variavel.valor + '\n';
|
|
199
|
-
}
|
|
200
|
-
linhasResposta += '--- fim-variaveis-resposta ---\n';
|
|
201
|
-
conexao.write(linhasResposta);
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
* Função que descreve como conexão com clientes de depuração deve ser operada.
|
|
205
|
-
* @param conexao Instância de conexão, tipo net.Socket.
|
|
206
|
-
*/
|
|
207
|
-
this.operarConexao = (conexao) => {
|
|
208
|
-
const enderecoRemoto = conexao.remoteAddress + ':' + conexao.remotePort;
|
|
209
|
-
process.stdout.write('\n[Depurador] Nova conexão de cliente de ' + enderecoRemoto + '\ndelegua> ');
|
|
210
|
-
conexao.setEncoding('utf8');
|
|
211
|
-
this.conexoes[this.contadorConexoes++] = conexao;
|
|
212
|
-
// Aqui, dados pode ter uma série de comandos, sendo um por linha.
|
|
213
|
-
const aoReceberDados = (dados) => {
|
|
214
|
-
const comandos = String(dados).split('\n');
|
|
215
|
-
process.stdout.write('\n[Depurador] Dados da conexão vindos de ' + enderecoRemoto + ': ' + comandos + '\ndelegua> ');
|
|
216
|
-
for (const comando of comandos) {
|
|
217
|
-
const partesComando = comando.split(' ');
|
|
218
|
-
switch (partesComando[0]) {
|
|
219
|
-
case 'adentrar-escopo':
|
|
220
|
-
this.comandoAdentrarEscopo(conexao);
|
|
221
|
-
break;
|
|
222
|
-
case 'adicionar-ponto-parada':
|
|
223
|
-
this.comandoAdicionarPontoParada(partesComando, conexao);
|
|
224
|
-
break;
|
|
225
|
-
case 'avaliar':
|
|
226
|
-
this.comandoAvaliar(partesComando, conexao);
|
|
227
|
-
break;
|
|
228
|
-
case 'avaliar-variavel':
|
|
229
|
-
this.comandoAvaliarVariavel(partesComando, conexao);
|
|
230
|
-
break;
|
|
231
|
-
case 'continuar':
|
|
232
|
-
this.comandoContinuar(conexao);
|
|
233
|
-
break;
|
|
234
|
-
case 'pilha-execucao':
|
|
235
|
-
this.comandoPilhaExecucao(conexao);
|
|
236
|
-
break;
|
|
237
|
-
case 'pontos-parada':
|
|
238
|
-
this.comandoPontosParada(conexao);
|
|
239
|
-
break;
|
|
240
|
-
case 'proximo':
|
|
241
|
-
this.comandoProximo(conexao);
|
|
242
|
-
break;
|
|
243
|
-
case 'remover-ponto-parada':
|
|
244
|
-
this.comandoRemoverPontoParada(partesComando, conexao);
|
|
245
|
-
break;
|
|
246
|
-
case 'sair-escopo':
|
|
247
|
-
this.comandoSairEscopo(conexao);
|
|
248
|
-
break;
|
|
249
|
-
case 'tchau':
|
|
250
|
-
conexao.write("Recebido comando 'tchau'. Conexão será encerrada\n");
|
|
251
|
-
this.finalizarServidorDepuracao();
|
|
252
|
-
return;
|
|
253
|
-
case 'variaveis':
|
|
254
|
-
this.comandoVariaveis(conexao);
|
|
255
|
-
break;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
const aoFecharConexao = () => {
|
|
260
|
-
process.stdout.write('\n[Depurador] Conexão de ' + enderecoRemoto + ' fechada\ndelegua> ');
|
|
261
|
-
};
|
|
262
|
-
const aoObterErro = (erro) => {
|
|
263
|
-
process.stdout.write('\n[Depurador] Conexão ' + enderecoRemoto + ' com erro: ' + erro.message + '\ndelegua> ');
|
|
264
|
-
};
|
|
265
|
-
// `.bind()` é necessário aqui para que os eventos não usem net.Socket ou net.Server como o `this`,
|
|
266
|
-
// como acontece normalmente se o `.bind()` não é chamado.
|
|
267
|
-
conexao.on('data', aoReceberDados.bind(this));
|
|
268
|
-
conexao.once('close', aoFecharConexao.bind(this));
|
|
269
|
-
conexao.on('error', aoObterErro.bind(this));
|
|
270
|
-
};
|
|
271
|
-
this.instanciaDelegua = _instanciaDelegua;
|
|
272
|
-
this.instanciaDelegua.funcaoDeRetorno = this.escreverSaidaParaTodosClientes.bind(this);
|
|
273
|
-
this.interpretador = this.instanciaDelegua.interpretador;
|
|
274
|
-
this.interpretador.funcaoDeRetorno = this.escreverSaidaParaTodosClientes.bind(this);
|
|
275
|
-
this.servidor = net.createServer();
|
|
276
|
-
this.conexoes = {};
|
|
277
|
-
this.contadorConexoes = 0;
|
|
278
|
-
this.operarConexao.bind(this);
|
|
279
|
-
}
|
|
280
|
-
iniciarServidorDepuracao() {
|
|
281
|
-
// É necessário mudar o `this` aqui por `.bind()`, senão `this` será net.Server dentro dos métodos.
|
|
282
|
-
this.servidor.on('connection', this.operarConexao.bind(this));
|
|
283
|
-
this.servidor.listen(7777);
|
|
284
|
-
process.stdout.write('\n[Depurador] Servidor de depuração iniciado na porta 7777');
|
|
285
|
-
return this.servidor.address();
|
|
286
|
-
}
|
|
287
|
-
escreverSaidaParaTodosClientes(mensagem) {
|
|
288
|
-
Object.keys(this.conexoes).forEach((chave) => {
|
|
289
|
-
this.conexoes[chave].write('Enviando mensagem de saída\n--- mensagem-saida ---\n' + mensagem + '\n');
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
finalizarServidorDepuracao() {
|
|
293
|
-
Object.keys(this.conexoes).forEach((chave) => {
|
|
294
|
-
this.conexoes[chave].write('--- finalizando ---\n');
|
|
295
|
-
this.conexoes[chave].end();
|
|
296
|
-
});
|
|
297
|
-
this.servidor.close();
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
exports.ServidorDepuracao = ServidorDepuracao;
|
|
301
|
-
//# sourceMappingURL=servidor-depuracao.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"servidor-depuracao.js","sourceRoot":"","sources":["../../../../fontes/depuracao/remota/servidor-depuracao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAK3B,uDAA+B;AAG/B;;;;;;;GAOG;AACH,MAAa,iBAAiB;IAO1B,YAAY,iBAAmC;QAY/C,uBAAkB,GAAG,CAAC,cAAsB,EAAE,KAAa,EAAE,OAAmB,EAAO,EAAE;YACrF,MAAM,WAAW,GAAG,IAAA,gBAAM,EAAC,cAAc,CAAC,WAAW,EAAE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ces/importador-interface';
|
|
3
|
-
import { RetornoImportador } from './retorno-importador';
|
|
4
|
-
/**
|
|
5
|
-
* O Importador é responsável por manusear arquivos. Coordena as fases de lexação, avaliação sintática,
|
|
6
|
-
* cataloga informações do arquivo no núcleo da linguagem (através das referências `arquivosAbertos` e
|
|
7
|
-
* `conteudoArquivosAbertos`) e aponta erros caso ocorram.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare class Importador implements ImportadorInterface {
|
|
11
|
-
diretorioBase: string;
|
|
12
|
-
lexador: LexadorInterface;
|
|
13
|
-
avaliadorSintatico: AvaliadorSintaticoInterface;
|
|
14
|
-
arquivosAbertos: {
|
|
15
|
-
[identificador: string]: string;
|
|
16
|
-
};
|
|
17
|
-
conteudoArquivosAbertos: {
|
|
18
|
-
[identificador: string]: string[];
|
|
19
|
-
};
|
|
20
|
-
depuracao: boolean;
|
|
21
|
-
constructor(lexador: LexadorInterface, avaliadorSintatico: AvaliadorSintaticoInterface, arquivosAbertos: {
|
|
22
|
-
[identificador: string]: string;
|
|
23
|
-
}, conteudoArquivosAbertos: {
|
|
24
|
-
[identificador: string]: string[];
|
|
25
|
-
}, depuracao: boolean);
|
|
26
|
-
importar(caminhoRelativoArquivo: string, importacaoInicial?: boolean, traduzirJavaScriptParaDelegua?: boolean): RetornoImportador;
|
|
27
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Importador = void 0;
|
|
30
|
-
const sistemaArquivos = __importStar(require("fs"));
|
|
31
|
-
const caminho = __importStar(require("path"));
|
|
32
|
-
const sistemaOperacional = __importStar(require("os"));
|
|
33
|
-
const cyrb53_1 = __importDefault(require("../depuracao/cyrb53"));
|
|
34
|
-
/**
|
|
35
|
-
* O Importador é responsável por manusear arquivos. Coordena as fases de lexação, avaliação sintática,
|
|
36
|
-
* cataloga informações do arquivo no núcleo da linguagem (através das referências `arquivosAbertos` e
|
|
37
|
-
* `conteudoArquivosAbertos`) e aponta erros caso ocorram.
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
|
-
class Importador {
|
|
41
|
-
constructor(lexador, avaliadorSintatico, arquivosAbertos, conteudoArquivosAbertos, depuracao) {
|
|
42
|
-
this.diretorioBase = process.cwd();
|
|
43
|
-
this.lexador = lexador;
|
|
44
|
-
this.avaliadorSintatico = avaliadorSintatico;
|
|
45
|
-
this.arquivosAbertos = arquivosAbertos;
|
|
46
|
-
this.conteudoArquivosAbertos = conteudoArquivosAbertos;
|
|
47
|
-
this.depuracao = depuracao;
|
|
48
|
-
}
|
|
49
|
-
importar(caminhoRelativoArquivo, importacaoInicial = false, traduzirJavaScriptParaDelegua = false) {
|
|
50
|
-
const nomeArquivo = caminho.basename(caminhoRelativoArquivo);
|
|
51
|
-
let caminhoAbsolutoArquivo = caminho.resolve(this.diretorioBase, caminhoRelativoArquivo);
|
|
52
|
-
if (importacaoInicial) {
|
|
53
|
-
caminhoAbsolutoArquivo = caminho.resolve(caminhoRelativoArquivo);
|
|
54
|
-
}
|
|
55
|
-
const hashArquivo = (0, cyrb53_1.default)(caminhoAbsolutoArquivo.toLowerCase());
|
|
56
|
-
if (!sistemaArquivos.existsSync(nomeArquivo)) {
|
|
57
|
-
// TODO: Terminar.
|
|
58
|
-
/* throw new ErroEmTempoDeExecucao(
|
|
59
|
-
declaracao.simboloFechamento,
|
|
60
|
-
'Não foi possível encontrar arquivo importado.',
|
|
61
|
-
declaracao.linha
|
|
62
|
-
); */
|
|
63
|
-
}
|
|
64
|
-
const dadosDoArquivo = sistemaArquivos.readFileSync(caminhoAbsolutoArquivo);
|
|
65
|
-
const conteudoDoArquivo = dadosDoArquivo.toString().replace(sistemaOperacional.EOL, '\n').split('\n');
|
|
66
|
-
if (traduzirJavaScriptParaDelegua) {
|
|
67
|
-
return {
|
|
68
|
-
conteudoArquivo: conteudoDoArquivo,
|
|
69
|
-
nomeArquivo,
|
|
70
|
-
hashArquivo,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
for (let linha = 0; linha < conteudoDoArquivo.length; linha++) {
|
|
74
|
-
conteudoDoArquivo[linha] += '\0';
|
|
75
|
-
}
|
|
76
|
-
const retornoLexador = this.lexador.mapear(conteudoDoArquivo, hashArquivo);
|
|
77
|
-
const retornoAvaliadorSintatico = this.avaliadorSintatico.analisar(retornoLexador, hashArquivo);
|
|
78
|
-
this.arquivosAbertos[hashArquivo] = caminho.resolve(caminhoRelativoArquivo);
|
|
79
|
-
if (this.depuracao) {
|
|
80
|
-
this.conteudoArquivosAbertos[hashArquivo] = conteudoDoArquivo;
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
nomeArquivo,
|
|
84
|
-
hashArquivo,
|
|
85
|
-
retornoLexador,
|
|
86
|
-
retornoAvaliadorSintatico,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
exports.Importador = Importador;
|
|
91
|
-
//# sourceMappingURL=importador.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"importador.js","sourceRoot":"","sources":["../../../fontes/importador/importador.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AACtC,8CAAgC;AAChC,uDAAyC;AAEzC,iEAAyC;AAOzC;;;;;GAKG;AACH,MAAa,UAAU;IAQnB,YACI,OAAyB,EACzB,kBAA+C,EAC/C,eAAoD,EACpD,uBAA8D,EAC9D,SAAkB;QAZtB,kBAAa,GAAW,OAAO,CAAC,GAAG,EAAE,CAAC;QAclC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,QAAQ,CACJ,sBAA8B,EAC9B,oBAA6B,KAAK,EAClC,gCAAyC,KAAK;QAE9C,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;QAC7D,IAAI,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,sBAAsB,CAAC,CAAC;QACzF,IAAI,iBAAiB,EAAE;YACnB,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;SACpE;QAED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.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("./importador"), exports);
|
|
18
|
-
__exportStar(require("./retorno-importador"), exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fontes/importador/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,uDAAqC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { RetornoAvaliadorSintatico } from '../interfaces/retornos/retorno-avaliador-sintatico';
|
|
2
|
-
import { RetornoLexador } from '../interfaces/retornos/retorno-lexador';
|
|
3
|
-
export interface RetornoImportador {
|
|
4
|
-
conteudoArquivo: string[];
|
|
5
|
-
nomeArquivo: string;
|
|
6
|
-
hashArquivo: number;
|
|
7
|
-
retornoLexador: RetornoLexador;
|
|
8
|
-
retornoAvaliadorSintatico: RetornoAvaliadorSintatico;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retorno-importador.js","sourceRoot":"","sources":["../../../fontes/importador/retorno-importador.ts"],"names":[],"mappings":""}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { RetornoImportador } from '../importador';
|
|
2
|
-
import { AvaliadorSintaticoInterface, ImportadorInterface, InterpretadorComDepuracaoInterface, InterpretadorInterface, LexadorInterface, RetornoExecucaoInterface, SimboloInterface } from '../interfaces';
|
|
3
|
-
export interface DeleguaInterface {
|
|
4
|
-
dialeto: string;
|
|
5
|
-
arquivosAbertos: {
|
|
6
|
-
[identificador: string]: string;
|
|
7
|
-
};
|
|
8
|
-
conteudoArquivosAbertos: {
|
|
9
|
-
[identificador: string]: string[];
|
|
10
|
-
};
|
|
11
|
-
funcaoDeRetorno: Function;
|
|
12
|
-
interpretador: InterpretadorInterface | InterpretadorComDepuracaoInterface;
|
|
13
|
-
lexador: LexadorInterface;
|
|
14
|
-
avaliadorSintatico: AvaliadorSintaticoInterface;
|
|
15
|
-
importador: ImportadorInterface;
|
|
16
|
-
versao(): string;
|
|
17
|
-
carregarArquivo(caminhoRelativoArquivo: string): void;
|
|
18
|
-
executar(retornoImportador: RetornoImportador): Promise<RetornoExecucaoInterface>;
|
|
19
|
-
executarUmaLinha(linha: string): Promise<RetornoExecucaoInterface>;
|
|
20
|
-
reportar(linha: number, onde: any, mensagem: string): void;
|
|
21
|
-
erro(simbolo: SimboloInterface, mensagemDeErro: string): void;
|
|
22
|
-
erroEmTempoDeExecucao(erro: any): void;
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delegua-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces/delegua-interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { RetornoImportador } from '../importador';
|
|
2
|
-
export interface ImportadorInterface {
|
|
3
|
-
diretorioBase: string;
|
|
4
|
-
conteudoArquivosAbertos: {
|
|
5
|
-
[identificador: string]: string[];
|
|
6
|
-
};
|
|
7
|
-
importar(caminhoRelativoArquivo: string, importacaoInicial: boolean, traduzirJavaScriptParaDelegua: boolean): RetornoImportador;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"importador-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces/importador-interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Importar } from '../declaracoes';
|
|
2
|
-
import { DeleguaModulo } from '../estruturas';
|
|
3
|
-
import { ImportadorInterface } from '../interfaces/importador-interface';
|
|
4
|
-
import { InterpretadorBase } from './interpretador-base';
|
|
5
|
-
/**
|
|
6
|
-
* O Interpretador visita todos os elementos complexos gerados pelo avaliador sintático (_parser_),
|
|
7
|
-
* e de fato executa a lógica de programação descrita no código.
|
|
8
|
-
*/
|
|
9
|
-
export declare class Interpretador extends InterpretadorBase {
|
|
10
|
-
constructor(importador: ImportadorInterface, diretorioBase: string, performance?: boolean, funcaoDeRetorno?: Function);
|
|
11
|
-
/**
|
|
12
|
-
* Importa um arquivo como módulo.
|
|
13
|
-
* @param declaracao A declaração de importação.
|
|
14
|
-
* @returns Ou um `DeleguaModulo`, ou um dicionário de funções.
|
|
15
|
-
*/
|
|
16
|
-
visitarDeclaracaoImportar(declaracao: Importar): Promise<DeleguaModulo>;
|
|
17
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Interpretador = void 0;
|
|
30
|
-
const caminho = __importStar(require("path"));
|
|
31
|
-
const estruturas_1 = require("../estruturas");
|
|
32
|
-
const interpretador_base_1 = require("./interpretador-base");
|
|
33
|
-
const importar_biblioteca_1 = __importDefault(require("../bibliotecas/importar-biblioteca"));
|
|
34
|
-
/**
|
|
35
|
-
* O Interpretador visita todos os elementos complexos gerados pelo avaliador sintático (_parser_),
|
|
36
|
-
* e de fato executa a lógica de programação descrita no código.
|
|
37
|
-
*/
|
|
38
|
-
class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
39
|
-
constructor(importador, diretorioBase, performance = false, funcaoDeRetorno = null) {
|
|
40
|
-
super(importador, diretorioBase, performance, funcaoDeRetorno);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Importa um arquivo como módulo.
|
|
44
|
-
* @param declaracao A declaração de importação.
|
|
45
|
-
* @returns Ou um `DeleguaModulo`, ou um dicionário de funções.
|
|
46
|
-
*/
|
|
47
|
-
async visitarDeclaracaoImportar(declaracao) {
|
|
48
|
-
const caminhoRelativo = await this.avaliar(declaracao.caminho);
|
|
49
|
-
const caminhoTotal = caminho.join(this.diretorioBase, caminhoRelativo);
|
|
50
|
-
const nomeArquivo = caminho.basename(caminhoTotal);
|
|
51
|
-
if (!caminhoTotal.endsWith('.delegua')) {
|
|
52
|
-
try {
|
|
53
|
-
return await (0, importar_biblioteca_1.default)(caminhoRelativo);
|
|
54
|
-
}
|
|
55
|
-
catch (erro) {
|
|
56
|
-
this.erros.push(erro);
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
const conteudoImportacao = this.importador.importar(caminhoRelativo, false, false);
|
|
61
|
-
const retornoInterpretador = await this.interpretar(conteudoImportacao.retornoAvaliadorSintatico.declaracoes, true);
|
|
62
|
-
const funcoesChamaveis = this.pilhaEscoposExecucao.obterTodasDeleguaFuncao();
|
|
63
|
-
const declaracoesClasse = this.pilhaEscoposExecucao.obterTodasDeclaracaoClasse();
|
|
64
|
-
if (declaracoesClasse.hasOwnProperty('super')) {
|
|
65
|
-
delete declaracoesClasse['super'];
|
|
66
|
-
}
|
|
67
|
-
const novoModulo = new estruturas_1.DeleguaModulo();
|
|
68
|
-
const chavesFuncoesChamaveis = Object.keys(funcoesChamaveis);
|
|
69
|
-
for (let i = 0; i < chavesFuncoesChamaveis.length; i++) {
|
|
70
|
-
novoModulo.componentes[chavesFuncoesChamaveis[i]] = funcoesChamaveis[chavesFuncoesChamaveis[i]];
|
|
71
|
-
}
|
|
72
|
-
const chavesDeclaracoesClasse = Object.keys(declaracoesClasse);
|
|
73
|
-
for (let i = 0; i < chavesDeclaracoesClasse.length; i++) {
|
|
74
|
-
novoModulo.componentes[chavesDeclaracoesClasse[i]] = declaracoesClasse[chavesDeclaracoesClasse[i]];
|
|
75
|
-
}
|
|
76
|
-
return novoModulo;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.Interpretador = Interpretador;
|
|
80
|
-
//# sourceMappingURL=interpretador.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"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