@designliquido/delegua 0.54.5 → 0.54.7
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/analisador-semantico/analisador-semantico-base.d.ts +2 -3
- package/analisador-semantico/analisador-semantico-base.d.ts.map +1 -1
- package/analisador-semantico/analisador-semantico-base.js +2 -5
- package/analisador-semantico/analisador-semantico-base.js.map +1 -1
- package/analisador-semantico/analisador-semantico.d.ts +1 -1
- package/analisador-semantico/analisador-semantico.d.ts.map +1 -1
- package/avaliador-sintatico/avaliador-sintatico.d.ts.map +1 -1
- package/avaliador-sintatico/avaliador-sintatico.js +1 -4
- package/avaliador-sintatico/avaliador-sintatico.js.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-guarani.d.ts.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-guarani.js.map +1 -1
- package/bibliotecas/dialetos/egua-classico/biblioteca-global.d.ts.map +1 -1
- package/bibliotecas/dialetos/egua-classico/biblioteca-global.js +139 -115
- package/bibliotecas/dialetos/egua-classico/biblioteca-global.js.map +1 -1
- package/bibliotecas/primitivas-texto.d.ts.map +1 -1
- package/bibliotecas/primitivas-texto.js +30 -0
- package/bibliotecas/primitivas-texto.js.map +1 -1
- package/bin/package.json +21 -1
- package/declaracoes/funcao.js +1 -1
- package/declaracoes/funcao.js.map +1 -1
- package/declaracoes/index.d.ts +0 -1
- package/declaracoes/index.d.ts.map +1 -1
- package/declaracoes/index.js +0 -1
- package/declaracoes/index.js.map +1 -1
- package/formatadores/formatador-delegua.d.ts +1 -2
- package/formatadores/formatador-delegua.d.ts.map +1 -1
- package/formatadores/formatador-delegua.js +0 -3
- package/formatadores/formatador-delegua.js.map +1 -1
- package/formatadores/formatador-pitugues.d.ts +1 -2
- package/formatadores/formatador-pitugues.d.ts.map +1 -1
- package/formatadores/formatador-pitugues.js +57 -3
- package/formatadores/formatador-pitugues.js.map +1 -1
- package/inferenciador.js +1 -1
- package/inferenciador.js.map +1 -1
- package/interfaces/visitante-comum-interface.d.ts +2 -3
- package/interfaces/visitante-comum-interface.d.ts.map +1 -1
- package/interpretador/dialetos/egua-classico/interpretador-egua-classico.d.ts +2 -2
- package/interpretador/dialetos/egua-classico/interpretador-egua-classico.d.ts.map +1 -1
- package/interpretador/dialetos/egua-classico/interpretador-egua-classico.js +15 -6
- package/interpretador/dialetos/egua-classico/interpretador-egua-classico.js.map +1 -1
- package/interpretador/dialetos/egua-classico/resolvedor/resolvedor.d.ts +2 -3
- package/interpretador/dialetos/egua-classico/resolvedor/resolvedor.d.ts.map +1 -1
- package/interpretador/dialetos/egua-classico/resolvedor/resolvedor.js +37 -4
- package/interpretador/dialetos/egua-classico/resolvedor/resolvedor.js.map +1 -1
- package/interpretador/dialetos/portugol-ipt/interpretador-portugol-ipt.d.ts +2 -3
- package/interpretador/dialetos/portugol-ipt/interpretador-portugol-ipt.d.ts.map +1 -1
- package/interpretador/dialetos/portugol-ipt/interpretador-portugol-ipt.js +49 -5
- package/interpretador/dialetos/portugol-ipt/interpretador-portugol-ipt.js.map +1 -1
- package/interpretador/interpretador-base.d.ts +10 -3
- package/interpretador/interpretador-base.d.ts.map +1 -1
- package/interpretador/interpretador-base.js +22 -6
- package/interpretador/interpretador-base.js.map +1 -1
- package/interpretador/interpretador-com-depuracao.d.ts +0 -1
- package/interpretador/interpretador-com-depuracao.d.ts.map +1 -1
- package/interpretador/interpretador-com-depuracao.js +0 -11
- package/interpretador/interpretador-com-depuracao.js.map +1 -1
- package/interpretador/interpretador.d.ts +1 -4
- package/interpretador/interpretador.d.ts.map +1 -1
- package/interpretador/interpretador.js +6 -2
- package/interpretador/interpretador.js.map +1 -1
- package/package.json +21 -1
- package/tradutores/tradutor-calango.d.ts +2 -2
- package/tradutores/tradutor-calango.d.ts.map +1 -1
- package/tradutores/tradutor-calango.js +7 -7
- package/tradutores/tradutor-calango.js.map +1 -1
- package/umd/delegua.js +437 -135
- package/declaracoes/aleatorio.d.ts +0 -17
- package/declaracoes/aleatorio.d.ts.map +0 -1
- package/declaracoes/aleatorio.js +0 -20
- package/declaracoes/aleatorio.js.map +0 -1
package/umd/delegua.js
CHANGED
|
@@ -238,7 +238,7 @@ class AvaliadorSintaticoBase {
|
|
|
238
238
|
}
|
|
239
239
|
exports.AvaliadorSintaticoBase = AvaliadorSintaticoBase;
|
|
240
240
|
|
|
241
|
-
},{"../construtos":
|
|
241
|
+
},{"../construtos":50,"../declaracoes":94,"../tipos-de-simbolos/comum":182,"./erro-avaliador-sintatico":11}],2:[function(require,module,exports){
|
|
242
242
|
"use strict";
|
|
243
243
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
244
244
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -1242,11 +1242,8 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
1242
1242
|
vetor.tipo = 'vetor';
|
|
1243
1243
|
}
|
|
1244
1244
|
}
|
|
1245
|
-
if (!vetor.hasOwnProperty('tipo')) {
|
|
1246
|
-
throw this.erro(simboloPara, `Variável ou constante em 'para cada' não parece possuir um tipo iterável.`);
|
|
1247
|
-
}
|
|
1248
1245
|
const tipoVetor = vetor.tipo;
|
|
1249
|
-
if (!tipoVetor.endsWith('[]') && !['dicionário', 'qualquer', 'vetor'].includes(tipoVetor)) {
|
|
1246
|
+
if (!tipoVetor.endsWith('[]') && !['dicionário', 'qualquer', 'texto', 'vetor'].includes(tipoVetor)) {
|
|
1250
1247
|
throw this.erro(simboloPara, `Variável ou constante em 'para cada' não é iterável. Tipo resolvido: ${tipoVetor}.`);
|
|
1251
1248
|
}
|
|
1252
1249
|
let tipoVariavelIteracao = 'qualquer';
|
|
@@ -2093,7 +2090,7 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
2093
2090
|
}
|
|
2094
2091
|
exports.AvaliadorSintatico = AvaliadorSintatico;
|
|
2095
2092
|
|
|
2096
|
-
},{"../bibliotecas/primitivas-dicionario":
|
|
2093
|
+
},{"../bibliotecas/primitivas-dicionario":21,"../bibliotecas/primitivas-numero":22,"../bibliotecas/primitivas-texto":23,"../bibliotecas/primitivas-vetor":24,"../construtos":50,"../construtos/tuplas":66,"../declaracoes":94,"../inferenciador":113,"../informacao-elemento-sintatico":114,"../tipos-de-dados/delegua":178,"../tipos-de-simbolos/delegua":183,"./avaliador-sintatico-base":1,"./comum":3,"./elemento-montao-tipos":10,"./erro-avaliador-sintatico":11,"./informacao-escopo":13,"./montao-tipos":16,"./pilha-escopos":17,"browser-process-hrtime":363}],3:[function(require,module,exports){
|
|
2097
2094
|
"use strict";
|
|
2098
2095
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2099
2096
|
exports.buscarRetornos = buscarRetornos;
|
|
@@ -2199,6 +2196,232 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
2199
2196
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2200
2197
|
};
|
|
2201
2198
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2199
|
+
exports.AvaliadorSintaticoCalango = void 0;
|
|
2200
|
+
const construtos_1 = require("../../construtos");
|
|
2201
|
+
const declaracoes_1 = require("../../declaracoes");
|
|
2202
|
+
const avaliador_sintatico_base_1 = require("../avaliador-sintatico-base");
|
|
2203
|
+
const pilha_escopos_1 = require("../pilha-escopos");
|
|
2204
|
+
const informacao_escopo_1 = require("../informacao-escopo");
|
|
2205
|
+
const informacao_elemento_sintatico_1 = require("../../informacao-elemento-sintatico");
|
|
2206
|
+
const calango_1 = __importDefault(require("../../tipos-de-simbolos/calango"));
|
|
2207
|
+
class AvaliadorSintaticoCalango extends avaliador_sintatico_base_1.AvaliadorSintaticoBase {
|
|
2208
|
+
constructor() {
|
|
2209
|
+
super();
|
|
2210
|
+
this.pilhaEscopos = new pilha_escopos_1.PilhaEscopos();
|
|
2211
|
+
}
|
|
2212
|
+
atribuir() {
|
|
2213
|
+
const expressao = this.ou();
|
|
2214
|
+
if (this.verificarSeSimboloAtualEIgualA(calango_1.default.IGUAL_ATRIBUICAO)) {
|
|
2215
|
+
const setaAtribuicao = this.simbolos[this.atual - 1];
|
|
2216
|
+
const valor = this.atribuir();
|
|
2217
|
+
this.verificarSeSimboloAtualEIgualA(calango_1.default.PONTO_E_VIRGULA);
|
|
2218
|
+
if (expressao instanceof construtos_1.Variavel) {
|
|
2219
|
+
return new construtos_1.Atribuir(this.hashArquivo, expressao, valor);
|
|
2220
|
+
}
|
|
2221
|
+
if (expressao instanceof construtos_1.AcessoIndiceVariavel) {
|
|
2222
|
+
return new construtos_1.AtribuicaoPorIndice(this.hashArquivo, expressao.linha, expressao.entidadeChamada, expressao.indice, valor);
|
|
2223
|
+
}
|
|
2224
|
+
throw this.erro(setaAtribuicao, 'Tarefa de atribuição inválida');
|
|
2225
|
+
}
|
|
2226
|
+
return expressao;
|
|
2227
|
+
}
|
|
2228
|
+
blocoEscopo() {
|
|
2229
|
+
throw new Error('Método não implementado.');
|
|
2230
|
+
}
|
|
2231
|
+
chamar() {
|
|
2232
|
+
return this.primario();
|
|
2233
|
+
}
|
|
2234
|
+
declaracaoEnquanto() {
|
|
2235
|
+
throw new Error('Método não implementado.');
|
|
2236
|
+
}
|
|
2237
|
+
declaracaoEscolha() {
|
|
2238
|
+
throw new Error('Método não implementado.');
|
|
2239
|
+
}
|
|
2240
|
+
// Em Calango, método "escreval"
|
|
2241
|
+
declaracaoEscreva() {
|
|
2242
|
+
const simboloAtual = this.avancarEDevolverAnterior();
|
|
2243
|
+
this.consumir(calango_1.default.PARENTESE_ESQUERDO, "Esperado '(' antes dos valores em escreva.");
|
|
2244
|
+
const argumentos = [];
|
|
2245
|
+
if (!this.verificarTipoSimboloAtual(calango_1.default.PARENTESE_DIREITO)) {
|
|
2246
|
+
do {
|
|
2247
|
+
const valor = this.resolverDeclaracaoForaDeBloco();
|
|
2248
|
+
argumentos.push(new construtos_1.FormatacaoEscrita(this.hashArquivo, Number(simboloAtual.linha), valor));
|
|
2249
|
+
} while (this.verificarSeSimboloAtualEIgualA(calango_1.default.VIRGULA));
|
|
2250
|
+
}
|
|
2251
|
+
this.consumir(calango_1.default.PARENTESE_DIREITO, "Esperado ')' após os valores em escreva.");
|
|
2252
|
+
this.verificarSeSimboloAtualEIgualA(calango_1.default.PONTO_E_VIRGULA);
|
|
2253
|
+
this.verificarSeSimboloAtualEIgualA(calango_1.default.QUEBRA_LINHA);
|
|
2254
|
+
return new declaracoes_1.Escreva(Number(simboloAtual.linha), this.hashArquivo, argumentos);
|
|
2255
|
+
}
|
|
2256
|
+
/**
|
|
2257
|
+
* Em Calango, este é o método `escreva()`.
|
|
2258
|
+
* @returns {EscrevaMesmaLinha} Uma declaracao de escrita na mesma linha.
|
|
2259
|
+
*/
|
|
2260
|
+
declaracaoEscrevaMesmaLinha() {
|
|
2261
|
+
const simboloAtual = this.avancarEDevolverAnterior();
|
|
2262
|
+
this.consumir(calango_1.default.PARENTESE_ESQUERDO, "Esperado '(' antes dos valores em escreva.");
|
|
2263
|
+
const argumentos = [];
|
|
2264
|
+
if (!this.verificarTipoSimboloAtual(calango_1.default.PARENTESE_DIREITO)) {
|
|
2265
|
+
do {
|
|
2266
|
+
const valor = this.resolverDeclaracaoForaDeBloco();
|
|
2267
|
+
argumentos.push(new construtos_1.FormatacaoEscrita(this.hashArquivo, Number(simboloAtual.linha), valor));
|
|
2268
|
+
} while (this.verificarSeSimboloAtualEIgualA(calango_1.default.VIRGULA));
|
|
2269
|
+
}
|
|
2270
|
+
this.consumir(calango_1.default.PARENTESE_DIREITO, "Esperado ')' após os valores em escreva.");
|
|
2271
|
+
this.verificarSeSimboloAtualEIgualA(calango_1.default.PONTO_E_VIRGULA);
|
|
2272
|
+
return new declaracoes_1.EscrevaMesmaLinha(Number(simboloAtual.linha), this.hashArquivo, argumentos);
|
|
2273
|
+
}
|
|
2274
|
+
declaracaoInteiros() {
|
|
2275
|
+
const simboloInteiro = this.consumir(calango_1.default.INTEIRO, '');
|
|
2276
|
+
const inicializacoes = [];
|
|
2277
|
+
do {
|
|
2278
|
+
const identificador = this.consumir(calango_1.default.IDENTIFICADOR, "Esperado identificador após palavra reservada 'inteiro'.");
|
|
2279
|
+
// Inicializações de variáveis podem ter valores definidos.
|
|
2280
|
+
let valorInicializacao = 0;
|
|
2281
|
+
inicializacoes.push(new declaracoes_1.Var(identificador, new construtos_1.Literal(this.hashArquivo, Number(simboloInteiro.linha), valorInicializacao, 'inteiro')));
|
|
2282
|
+
this.pilhaEscopos.definirInformacoesVariavel(identificador.lexema, new informacao_elemento_sintatico_1.InformacaoElementoSintatico(identificador.lexema, 'inteiro'));
|
|
2283
|
+
} while (this.verificarSeSimboloAtualEIgualA(calango_1.default.VIRGULA));
|
|
2284
|
+
this.consumir(calango_1.default.PONTO_E_VIRGULA, 'Esperado ponto e vírgula após declaração de variáveis.');
|
|
2285
|
+
return inicializacoes;
|
|
2286
|
+
}
|
|
2287
|
+
declaracaoFazer() {
|
|
2288
|
+
throw new Error('Método não implementado.');
|
|
2289
|
+
}
|
|
2290
|
+
declaracaoPara() {
|
|
2291
|
+
throw new Error('Método não implementado.');
|
|
2292
|
+
}
|
|
2293
|
+
resolverBloco(simbolosParada) {
|
|
2294
|
+
const declaracoes = [];
|
|
2295
|
+
this.pilhaEscopos.empilhar(new informacao_escopo_1.InformacaoEscopo());
|
|
2296
|
+
const primeiroSimbolo = this.simbolos[this.atual];
|
|
2297
|
+
while (!this.estaNoFinal() && !simbolosParada.includes(this.simbolos[this.atual].lexema)) {
|
|
2298
|
+
declaracoes.push(this.resolverDeclaracaoForaDeBloco());
|
|
2299
|
+
}
|
|
2300
|
+
this.pilhaEscopos.removerUltimo();
|
|
2301
|
+
return new declaracoes_1.Bloco(this.hashArquivo, primeiroSimbolo.linha, declaracoes.filter((d) => d));
|
|
2302
|
+
}
|
|
2303
|
+
declaracaoSe() {
|
|
2304
|
+
this.avancarEDevolverAnterior();
|
|
2305
|
+
this.consumir(calango_1.default.PARENTESE_ESQUERDO, "Esperado '(' após 'se'");
|
|
2306
|
+
const condicao = this.expressao();
|
|
2307
|
+
this.consumir(calango_1.default.PARENTESE_DIREITO, "Esperado ')' após condição do 'se'");
|
|
2308
|
+
this.consumir(calango_1.default.ENTAO, "Esperado 'entao' após condição");
|
|
2309
|
+
this.verificarSeSimboloAtualEIgualA(calango_1.default.QUEBRA_LINHA);
|
|
2310
|
+
const caminhoEntao = this.resolverBloco(['senao', 'fimSe']);
|
|
2311
|
+
while (this.verificarSeSimboloAtualEIgualA(calango_1.default.QUEBRA_LINHA))
|
|
2312
|
+
;
|
|
2313
|
+
let caminhoSenao = null;
|
|
2314
|
+
if (this.verificarSeSimboloAtualEIgualA(calango_1.default.SENAO)) {
|
|
2315
|
+
this.verificarSeSimboloAtualEIgualA(calango_1.default.QUEBRA_LINHA);
|
|
2316
|
+
caminhoSenao = this.resolverBloco(['senao', 'fimSe']);
|
|
2317
|
+
}
|
|
2318
|
+
this.verificarSeSimboloAtualEIgualA(calango_1.default.QUEBRA_LINHA);
|
|
2319
|
+
this.consumir(calango_1.default.FIM_SE, "Esperado 'fimSe' para finalização de uma instrução se.");
|
|
2320
|
+
return new declaracoes_1.Se(condicao, caminhoEntao, [], caminhoSenao);
|
|
2321
|
+
}
|
|
2322
|
+
expressaoLeia() {
|
|
2323
|
+
const simboloAtual = this.avancarEDevolverAnterior();
|
|
2324
|
+
this.consumir(calango_1.default.PARENTESE_ESQUERDO, "Esperado '(' depois da declaração 'leia'");
|
|
2325
|
+
const argumentos = [];
|
|
2326
|
+
do {
|
|
2327
|
+
argumentos.push(this.resolverDeclaracaoForaDeBloco());
|
|
2328
|
+
} while (this.verificarSeSimboloAtualEIgualA(calango_1.default.VIRGULA));
|
|
2329
|
+
this.consumir(calango_1.default.PARENTESE_DIREITO, "Esperado ')' após declaração 'leia'");
|
|
2330
|
+
this.consumir(calango_1.default.PONTO_E_VIRGULA, 'Esperado ponto e vírgula após declaração leia');
|
|
2331
|
+
return new construtos_1.Leia(simboloAtual, argumentos);
|
|
2332
|
+
}
|
|
2333
|
+
primario() {
|
|
2334
|
+
switch (this.simbolos[this.atual].tipo) {
|
|
2335
|
+
case calango_1.default.IDENTIFICADOR:
|
|
2336
|
+
const simboloIdentificador = this.avancarEDevolverAnterior();
|
|
2337
|
+
let tipoOperando;
|
|
2338
|
+
try {
|
|
2339
|
+
tipoOperando = this.pilhaEscopos.obterTipoVariavelPorNome(simboloIdentificador.lexema);
|
|
2340
|
+
}
|
|
2341
|
+
catch (erro) {
|
|
2342
|
+
throw this.erro(simboloIdentificador, erro.message);
|
|
2343
|
+
}
|
|
2344
|
+
return new construtos_1.Variavel(this.hashArquivo, simboloIdentificador, tipoOperando);
|
|
2345
|
+
case calango_1.default.INTEIRO:
|
|
2346
|
+
case calango_1.default.NUMERO: // Precisamos substituir 'NUMERO' por 'REAL' pois Calango não possui 'NUMERO'
|
|
2347
|
+
case calango_1.default.TEXTO:
|
|
2348
|
+
const simboloAnterior = this.avancarEDevolverAnterior();
|
|
2349
|
+
return new construtos_1.Literal(this.hashArquivo, Number(simboloAnterior.linha), simboloAnterior.literal, simboloAnterior.tipo == calango_1.default.TEXTO ? 'texto' : 'inteiro');
|
|
2350
|
+
case calango_1.default.PARENTESE_ESQUERDO:
|
|
2351
|
+
this.avancarEDevolverAnterior();
|
|
2352
|
+
const expressao = this.expressao();
|
|
2353
|
+
this.consumir(calango_1.default.PARENTESE_DIREITO, "Esperado ')' após a expressão.");
|
|
2354
|
+
return new construtos_1.Agrupamento(this.hashArquivo, this.simbolos[this.atual].linha, expressao);
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
resolverDeclaracaoForaDeBloco() {
|
|
2358
|
+
const simboloAtual = this.simbolos[this.atual];
|
|
2359
|
+
switch (simboloAtual.tipo) {
|
|
2360
|
+
case calango_1.default.ESCREVA:
|
|
2361
|
+
return this.declaracaoEscrevaMesmaLinha();
|
|
2362
|
+
case calango_1.default.ESCREVAL:
|
|
2363
|
+
return this.declaracaoEscreva();
|
|
2364
|
+
case calango_1.default.LEIA:
|
|
2365
|
+
return this.expressaoLeia();
|
|
2366
|
+
case calango_1.default.INTEIRO:
|
|
2367
|
+
return this.declaracaoInteiros();
|
|
2368
|
+
case calango_1.default.SE:
|
|
2369
|
+
return this.declaracaoSe();
|
|
2370
|
+
case calango_1.default.QUEBRA_LINHA:
|
|
2371
|
+
this.avancarEDevolverAnterior();
|
|
2372
|
+
return null;
|
|
2373
|
+
default:
|
|
2374
|
+
return this.expressao();
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
corpoDaFuncao(tipo) {
|
|
2378
|
+
throw new Error('Método não implementado.');
|
|
2379
|
+
}
|
|
2380
|
+
validarSegmentoAlgoritmo() {
|
|
2381
|
+
this.consumir(calango_1.default.ALGORITMO, `Expressão 'algoritmo' não declarada`);
|
|
2382
|
+
this.consumir(calango_1.default.IDENTIFICADOR, `Esperado identificador após 'algoritmo'.`);
|
|
2383
|
+
this.consumir(calango_1.default.PONTO_E_VIRGULA, `Esperado ponto e vírgula após identificador do algoritmo.`);
|
|
2384
|
+
}
|
|
2385
|
+
validarSegmentoPrincipal(algoritmoOuFuncao) {
|
|
2386
|
+
this.consumir(calango_1.default.PRINCIPAL, `Expressão 'principal' não declarada`);
|
|
2387
|
+
}
|
|
2388
|
+
analisar(retornoLexador, hashArquivo) {
|
|
2389
|
+
this.erros = [];
|
|
2390
|
+
((this.atual = 0), (this.blocos = 0));
|
|
2391
|
+
this.pilhaEscopos = new pilha_escopos_1.PilhaEscopos();
|
|
2392
|
+
this.pilhaEscopos.empilhar(new informacao_escopo_1.InformacaoEscopo());
|
|
2393
|
+
this.hashArquivo = hashArquivo || 0;
|
|
2394
|
+
this.simbolos = (retornoLexador === null || retornoLexador === void 0 ? void 0 : retornoLexador.simbolos) || [];
|
|
2395
|
+
while (this.verificarTipoSimboloAtual(calango_1.default.QUEBRA_LINHA)) {
|
|
2396
|
+
this.avancarEDevolverAnterior();
|
|
2397
|
+
}
|
|
2398
|
+
let declaracoes = [];
|
|
2399
|
+
this.validarSegmentoAlgoritmo();
|
|
2400
|
+
this.validarSegmentoPrincipal('principal');
|
|
2401
|
+
while (!this.estaNoFinal() &&
|
|
2402
|
+
this.simbolos[this.atual].tipo !== calango_1.default.FIM_PRINCIPAL) {
|
|
2403
|
+
const resolucaoDeclaracao = this.resolverDeclaracaoForaDeBloco();
|
|
2404
|
+
if (Array.isArray(resolucaoDeclaracao)) {
|
|
2405
|
+
declaracoes = declaracoes.concat(resolucaoDeclaracao);
|
|
2406
|
+
}
|
|
2407
|
+
else {
|
|
2408
|
+
declaracoes.push(resolucaoDeclaracao);
|
|
2409
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
return {
|
|
2412
|
+
declaracoes: declaracoes.filter((d) => d),
|
|
2413
|
+
erros: this.erros,
|
|
2414
|
+
};
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
exports.AvaliadorSintaticoCalango = AvaliadorSintaticoCalango;
|
|
2418
|
+
|
|
2419
|
+
},{"../../construtos":50,"../../declaracoes":94,"../../informacao-elemento-sintatico":114,"../../tipos-de-simbolos/calango":181,"../avaliador-sintatico-base":1,"../informacao-escopo":13,"../pilha-escopos":17}],5:[function(require,module,exports){
|
|
2420
|
+
"use strict";
|
|
2421
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
2422
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2423
|
+
};
|
|
2424
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2202
2425
|
exports.AvaliadorSintaticoEguaClassico = void 0;
|
|
2203
2426
|
const construtos_1 = require("../../construtos");
|
|
2204
2427
|
const erro_avaliador_sintatico_1 = require("../erro-avaliador-sintatico");
|
|
@@ -2848,7 +3071,7 @@ class AvaliadorSintaticoEguaClassico {
|
|
|
2848
3071
|
}
|
|
2849
3072
|
exports.AvaliadorSintaticoEguaClassico = AvaliadorSintaticoEguaClassico;
|
|
2850
3073
|
|
|
2851
|
-
},{"../../construtos":
|
|
3074
|
+
},{"../../construtos":50,"../../declaracoes":94,"../../tipos-de-simbolos/egua-classico":184,"../erro-avaliador-sintatico":11}],6:[function(require,module,exports){
|
|
2852
3075
|
"use strict";
|
|
2853
3076
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
2854
3077
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -3930,7 +4153,7 @@ class AvaliadorSintaticoPitugues {
|
|
|
3930
4153
|
}
|
|
3931
4154
|
exports.AvaliadorSintaticoPitugues = AvaliadorSintaticoPitugues;
|
|
3932
4155
|
|
|
3933
|
-
},{"../../bibliotecas/primitivas-dicionario":
|
|
4156
|
+
},{"../../bibliotecas/primitivas-dicionario":21,"../../bibliotecas/primitivas-numero":22,"../../bibliotecas/primitivas-texto":23,"../../bibliotecas/primitivas-vetor":24,"../../construtos":50,"../../construtos/lista-compreensao":53,"../../declaracoes":94,"../../inferenciador":113,"../../informacao-elemento-sintatico":114,"../../lexador":170,"../../tipos-de-dados/dialetos/pitugues":179,"../../tipos-de-simbolos/pitugues":187,"../comum":3,"../erro-avaliador-sintatico":11,"../informacao-escopo":13,"../pilha-escopos":17,"browser-process-hrtime":363}],7:[function(require,module,exports){
|
|
3934
4157
|
"use strict";
|
|
3935
4158
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3936
4159
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -4104,7 +4327,7 @@ class AvaliadorSintaticoPortugolIpt extends avaliador_sintatico_base_1.Avaliador
|
|
|
4104
4327
|
}
|
|
4105
4328
|
exports.AvaliadorSintaticoPortugolIpt = AvaliadorSintaticoPortugolIpt;
|
|
4106
4329
|
|
|
4107
|
-
},{"../../construtos":
|
|
4330
|
+
},{"../../construtos":50,"../../declaracoes":94,"../../tipos-de-simbolos/portugol-ipt":188,"../avaliador-sintatico-base":1}],8:[function(require,module,exports){
|
|
4108
4331
|
"use strict";
|
|
4109
4332
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4110
4333
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -5092,7 +5315,7 @@ class AvaliadorSintaticoTenda extends avaliador_sintatico_base_1.AvaliadorSintat
|
|
|
5092
5315
|
}
|
|
5093
5316
|
exports.AvaliadorSintaticoTenda = AvaliadorSintaticoTenda;
|
|
5094
5317
|
|
|
5095
|
-
},{"../../bibliotecas/primitivas-dicionario":
|
|
5318
|
+
},{"../../bibliotecas/primitivas-dicionario":21,"../../bibliotecas/primitivas-numero":22,"../../bibliotecas/primitivas-texto":23,"../../bibliotecas/primitivas-vetor":24,"../../construtos":50,"../../construtos/tuplas":66,"../../declaracoes":94,"../../inferenciador":113,"../../informacao-elemento-sintatico":114,"../../lexador/simbolo":176,"../../tipos-de-dados/delegua":178,"../../tipos-de-simbolos/tenda":189,"../avaliador-sintatico-base":1,"./../erro-avaliador-sintatico":11,"./../informacao-escopo":13,"./../pilha-escopos":17,"browser-process-hrtime":363}],9:[function(require,module,exports){
|
|
5096
5319
|
"use strict";
|
|
5097
5320
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5098
5321
|
if (k2 === undefined) k2 = k;
|
|
@@ -5114,7 +5337,7 @@ __exportStar(require("./avaliador-sintatico-pitugues"), exports);
|
|
|
5114
5337
|
__exportStar(require("./avaliador-sintatico-portugol-ipt"), exports);
|
|
5115
5338
|
__exportStar(require("./avaliador-sintatico-tenda"), exports);
|
|
5116
5339
|
|
|
5117
|
-
},{"./avaliador-sintatico-egua-classico":
|
|
5340
|
+
},{"./avaliador-sintatico-egua-classico":5,"./avaliador-sintatico-pitugues":6,"./avaliador-sintatico-portugol-ipt":7,"./avaliador-sintatico-tenda":8}],10:[function(require,module,exports){
|
|
5118
5341
|
"use strict";
|
|
5119
5342
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5120
5343
|
exports.ElementoMontaoTipos = void 0;
|
|
@@ -5126,7 +5349,7 @@ class ElementoMontaoTipos {
|
|
|
5126
5349
|
}
|
|
5127
5350
|
exports.ElementoMontaoTipos = ElementoMontaoTipos;
|
|
5128
5351
|
|
|
5129
|
-
},{}],
|
|
5352
|
+
},{}],11:[function(require,module,exports){
|
|
5130
5353
|
"use strict";
|
|
5131
5354
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5132
5355
|
exports.ErroAvaliadorSintatico = void 0;
|
|
@@ -5141,7 +5364,7 @@ class ErroAvaliadorSintatico extends Error {
|
|
|
5141
5364
|
}
|
|
5142
5365
|
exports.ErroAvaliadorSintatico = ErroAvaliadorSintatico;
|
|
5143
5366
|
|
|
5144
|
-
},{}],
|
|
5367
|
+
},{}],12:[function(require,module,exports){
|
|
5145
5368
|
"use strict";
|
|
5146
5369
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5147
5370
|
if (k2 === undefined) k2 = k;
|
|
@@ -5167,7 +5390,7 @@ __exportStar(require("./micro-avaliador-sintatico"), exports);
|
|
|
5167
5390
|
__exportStar(require("./pilha-escopos"), exports);
|
|
5168
5391
|
__exportStar(require("./retornos"), exports);
|
|
5169
5392
|
|
|
5170
|
-
},{"./avaliador-sintatico":2,"./avaliador-sintatico-base":1,"./dialetos":
|
|
5393
|
+
},{"./avaliador-sintatico":2,"./avaliador-sintatico-base":1,"./dialetos":9,"./erro-avaliador-sintatico":11,"./informacao-escopo":13,"./micro-avaliador-sintatico":15,"./pilha-escopos":17,"./retornos":18}],13:[function(require,module,exports){
|
|
5171
5394
|
"use strict";
|
|
5172
5395
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5173
5396
|
exports.InformacaoEscopo = void 0;
|
|
@@ -5179,7 +5402,7 @@ class InformacaoEscopo {
|
|
|
5179
5402
|
}
|
|
5180
5403
|
exports.InformacaoEscopo = InformacaoEscopo;
|
|
5181
5404
|
|
|
5182
|
-
},{}],
|
|
5405
|
+
},{}],14:[function(require,module,exports){
|
|
5183
5406
|
"use strict";
|
|
5184
5407
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5185
5408
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -5297,7 +5520,7 @@ class MicroAvaliadorSintaticoBase {
|
|
|
5297
5520
|
}
|
|
5298
5521
|
exports.MicroAvaliadorSintaticoBase = MicroAvaliadorSintaticoBase;
|
|
5299
5522
|
|
|
5300
|
-
},{"../construtos":
|
|
5523
|
+
},{"../construtos":50,"../tipos-de-simbolos/comum":182,"./erro-avaliador-sintatico":11}],15:[function(require,module,exports){
|
|
5301
5524
|
"use strict";
|
|
5302
5525
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5303
5526
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -5499,7 +5722,7 @@ class MicroAvaliadorSintatico extends micro_avaliador_sintatico_base_1.MicroAval
|
|
|
5499
5722
|
}
|
|
5500
5723
|
exports.MicroAvaliadorSintatico = MicroAvaliadorSintatico;
|
|
5501
5724
|
|
|
5502
|
-
},{"../construtos":
|
|
5725
|
+
},{"../construtos":50,"../tipos-de-simbolos/microgramaticas/delegua":186,"./micro-avaliador-sintatico-base":14}],16:[function(require,module,exports){
|
|
5503
5726
|
"use strict";
|
|
5504
5727
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5505
5728
|
exports.MontaoTipos = void 0;
|
|
@@ -5550,7 +5773,7 @@ class MontaoTipos {
|
|
|
5550
5773
|
}
|
|
5551
5774
|
exports.MontaoTipos = MontaoTipos;
|
|
5552
5775
|
|
|
5553
|
-
},{"../geracao-identificadores":111,"./erro-avaliador-sintatico":
|
|
5776
|
+
},{"../geracao-identificadores":111,"./erro-avaliador-sintatico":11}],17:[function(require,module,exports){
|
|
5554
5777
|
"use strict";
|
|
5555
5778
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5556
5779
|
exports.PilhaEscopos = void 0;
|
|
@@ -5620,7 +5843,7 @@ class PilhaEscopos {
|
|
|
5620
5843
|
}
|
|
5621
5844
|
exports.PilhaEscopos = PilhaEscopos;
|
|
5622
5845
|
|
|
5623
|
-
},{"./elemento-montao-tipos":
|
|
5846
|
+
},{"./elemento-montao-tipos":10}],18:[function(require,module,exports){
|
|
5624
5847
|
"use strict";
|
|
5625
5848
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5626
5849
|
if (k2 === undefined) k2 = k;
|
|
@@ -5639,11 +5862,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
5639
5862
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5640
5863
|
__exportStar(require("./retorno-primario"), exports);
|
|
5641
5864
|
|
|
5642
|
-
},{"./retorno-primario":
|
|
5865
|
+
},{"./retorno-primario":19}],19:[function(require,module,exports){
|
|
5643
5866
|
"use strict";
|
|
5644
5867
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5645
5868
|
|
|
5646
|
-
},{}],
|
|
5869
|
+
},{}],20:[function(require,module,exports){
|
|
5647
5870
|
"use strict";
|
|
5648
5871
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5649
5872
|
exports.aleatorio = aleatorio;
|
|
@@ -6330,7 +6553,7 @@ async function tupla(interpretador, vetor) {
|
|
|
6330
6553
|
}
|
|
6331
6554
|
}
|
|
6332
6555
|
|
|
6333
|
-
},{"../construtos":
|
|
6556
|
+
},{"../construtos":50,"../excecoes":107,"../interpretador/estruturas":146,"../interpretador/estruturas/descritor-tipo-classe":144,"../interpretador/estruturas/funcao-padrao":145,"../interpretador/estruturas/objeto-delegua-classe":149,"../quebras":177}],21:[function(require,module,exports){
|
|
6334
6557
|
"use strict";
|
|
6335
6558
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6336
6559
|
const informacao_elemento_sintatico_1 = require("../informacao-elemento-sintatico");
|
|
@@ -6387,7 +6610,7 @@ exports.default = {
|
|
|
6387
6610
|
},
|
|
6388
6611
|
};
|
|
6389
6612
|
|
|
6390
|
-
},{"../informacao-elemento-sintatico":114}],
|
|
6613
|
+
},{"../informacao-elemento-sintatico":114}],22:[function(require,module,exports){
|
|
6391
6614
|
"use strict";
|
|
6392
6615
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6393
6616
|
const informacao_elemento_sintatico_1 = require("../informacao-elemento-sintatico");
|
|
@@ -6472,7 +6695,7 @@ exports.default = {
|
|
|
6472
6695
|
},
|
|
6473
6696
|
};
|
|
6474
6697
|
|
|
6475
|
-
},{"../informacao-elemento-sintatico":114}],
|
|
6698
|
+
},{"../informacao-elemento-sintatico":114}],23:[function(require,module,exports){
|
|
6476
6699
|
"use strict";
|
|
6477
6700
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6478
6701
|
const informacao_elemento_sintatico_1 = require("../informacao-elemento-sintatico");
|
|
@@ -6672,9 +6895,39 @@ exports.default = {
|
|
|
6672
6895
|
'\n\n ### Formas de uso \n',
|
|
6673
6896
|
exemploCodigo: 'texto.tamanho()',
|
|
6674
6897
|
},
|
|
6898
|
+
tudoMaiusculo: {
|
|
6899
|
+
tipoRetorno: 'lógico',
|
|
6900
|
+
argumentos: [],
|
|
6901
|
+
implementacao: (interpretador, nomePrimitiva, texto) => Promise.resolve(texto === texto.toUpperCase()),
|
|
6902
|
+
assinaturaFormato: 'texto.tudoMaiusculo()',
|
|
6903
|
+
documentacao: '# `texto.tudoMaiusculo()` \n\n' +
|
|
6904
|
+
'Devolve verdadeiro se todos os caracteres alfabéticos do texto estão em maiúsculo, e falso em caso contrário.' +
|
|
6905
|
+
'\n\n ## Exemplo de Código\n' +
|
|
6906
|
+
'\n\n```delegua\nvar t1 = "TUDO EM MAIÚSCULO"\n' +
|
|
6907
|
+
'var t2 = "Tudo em Maiúsculo"\n' +
|
|
6908
|
+
't1.tudoMaiusculo() // verdadeiro\n' +
|
|
6909
|
+
't2.tudoMaiusculo() // falso\n```' +
|
|
6910
|
+
'\n\n ### Formas de uso \n',
|
|
6911
|
+
exemploCodigo: 'texto.tudoMaiusculo()',
|
|
6912
|
+
},
|
|
6913
|
+
tudoMinusculo: {
|
|
6914
|
+
tipoRetorno: 'lógico',
|
|
6915
|
+
argumentos: [],
|
|
6916
|
+
implementacao: (interpretador, nomePrimitiva, texto) => Promise.resolve(texto === texto.toLowerCase()),
|
|
6917
|
+
assinaturaFormato: 'texto.tudoMinusculo()',
|
|
6918
|
+
documentacao: '# `texto.tudoMinusculo()` \n\n' +
|
|
6919
|
+
'Devolve verdadeiro se todos os caracteres alfabéticos do texto estão em minúsculo, e falso em caso contrário.' +
|
|
6920
|
+
'\n\n ## Exemplo de Código\n' +
|
|
6921
|
+
'\n\n```delegua\nvar t1 = "tudo em minúsculo"\n' +
|
|
6922
|
+
'var t2 = "Tudo em Minúsculo"\n' +
|
|
6923
|
+
't1.tudoMinusculo() // verdadeiro\n' +
|
|
6924
|
+
't2.tudoMinusculo() // falso\n```' +
|
|
6925
|
+
'\n\n ### Formas de uso \n',
|
|
6926
|
+
exemploCodigo: 'texto.tudoMinusculo()',
|
|
6927
|
+
},
|
|
6675
6928
|
};
|
|
6676
6929
|
|
|
6677
|
-
},{"../informacao-elemento-sintatico":114}],
|
|
6930
|
+
},{"../informacao-elemento-sintatico":114}],24:[function(require,module,exports){
|
|
6678
6931
|
"use strict";
|
|
6679
6932
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6680
6933
|
const informacao_elemento_sintatico_1 = require("../informacao-elemento-sintatico");
|
|
@@ -7021,7 +7274,7 @@ exports.default = {
|
|
|
7021
7274
|
},
|
|
7022
7275
|
};
|
|
7023
7276
|
|
|
7024
|
-
},{"../informacao-elemento-sintatico":114}],
|
|
7277
|
+
},{"../informacao-elemento-sintatico":114}],25:[function(require,module,exports){
|
|
7025
7278
|
"use strict";
|
|
7026
7279
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7027
7280
|
exports.AcessoElementoMatriz = void 0;
|
|
@@ -7046,7 +7299,7 @@ class AcessoElementoMatriz {
|
|
|
7046
7299
|
}
|
|
7047
7300
|
exports.AcessoElementoMatriz = AcessoElementoMatriz;
|
|
7048
7301
|
|
|
7049
|
-
},{}],
|
|
7302
|
+
},{}],26:[function(require,module,exports){
|
|
7050
7303
|
"use strict";
|
|
7051
7304
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7052
7305
|
exports.AcessoIndiceVariavel = void 0;
|
|
@@ -7073,7 +7326,7 @@ class AcessoIndiceVariavel {
|
|
|
7073
7326
|
}
|
|
7074
7327
|
exports.AcessoIndiceVariavel = AcessoIndiceVariavel;
|
|
7075
7328
|
|
|
7076
|
-
},{}],
|
|
7329
|
+
},{}],27:[function(require,module,exports){
|
|
7077
7330
|
"use strict";
|
|
7078
7331
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7079
7332
|
exports.AcessoMetodoOuPropriedade = void 0;
|
|
@@ -7102,7 +7355,7 @@ class AcessoMetodoOuPropriedade {
|
|
|
7102
7355
|
}
|
|
7103
7356
|
exports.AcessoMetodoOuPropriedade = AcessoMetodoOuPropriedade;
|
|
7104
7357
|
|
|
7105
|
-
},{}],
|
|
7358
|
+
},{}],28:[function(require,module,exports){
|
|
7106
7359
|
"use strict";
|
|
7107
7360
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7108
7361
|
exports.AcessoMetodo = void 0;
|
|
@@ -7124,7 +7377,7 @@ class AcessoMetodo {
|
|
|
7124
7377
|
}
|
|
7125
7378
|
exports.AcessoMetodo = AcessoMetodo;
|
|
7126
7379
|
|
|
7127
|
-
},{}],
|
|
7380
|
+
},{}],29:[function(require,module,exports){
|
|
7128
7381
|
"use strict";
|
|
7129
7382
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7130
7383
|
exports.AcessoPropriedade = void 0;
|
|
@@ -7145,7 +7398,7 @@ class AcessoPropriedade {
|
|
|
7145
7398
|
}
|
|
7146
7399
|
exports.AcessoPropriedade = AcessoPropriedade;
|
|
7147
7400
|
|
|
7148
|
-
},{}],
|
|
7401
|
+
},{}],30:[function(require,module,exports){
|
|
7149
7402
|
"use strict";
|
|
7150
7403
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7151
7404
|
exports.Agrupamento = void 0;
|
|
@@ -7170,7 +7423,7 @@ class Agrupamento {
|
|
|
7170
7423
|
}
|
|
7171
7424
|
exports.Agrupamento = Agrupamento;
|
|
7172
7425
|
|
|
7173
|
-
},{}],
|
|
7426
|
+
},{}],31:[function(require,module,exports){
|
|
7174
7427
|
"use strict";
|
|
7175
7428
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7176
7429
|
exports.ArgumentoReferenciaFuncao = void 0;
|
|
@@ -7194,7 +7447,7 @@ class ArgumentoReferenciaFuncao {
|
|
|
7194
7447
|
}
|
|
7195
7448
|
exports.ArgumentoReferenciaFuncao = ArgumentoReferenciaFuncao;
|
|
7196
7449
|
|
|
7197
|
-
},{}],
|
|
7450
|
+
},{}],32:[function(require,module,exports){
|
|
7198
7451
|
"use strict";
|
|
7199
7452
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7200
7453
|
exports.AtribuicaoPorIndice = void 0;
|
|
@@ -7218,7 +7471,7 @@ class AtribuicaoPorIndice {
|
|
|
7218
7471
|
}
|
|
7219
7472
|
exports.AtribuicaoPorIndice = AtribuicaoPorIndice;
|
|
7220
7473
|
|
|
7221
|
-
},{}],
|
|
7474
|
+
},{}],33:[function(require,module,exports){
|
|
7222
7475
|
"use strict";
|
|
7223
7476
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7224
7477
|
exports.AtribuicaoPorIndicesMatriz = void 0;
|
|
@@ -7244,7 +7497,7 @@ class AtribuicaoPorIndicesMatriz {
|
|
|
7244
7497
|
}
|
|
7245
7498
|
exports.AtribuicaoPorIndicesMatriz = AtribuicaoPorIndicesMatriz;
|
|
7246
7499
|
|
|
7247
|
-
},{}],
|
|
7500
|
+
},{}],34:[function(require,module,exports){
|
|
7248
7501
|
"use strict";
|
|
7249
7502
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7250
7503
|
exports.Atribuir = void 0;
|
|
@@ -7280,7 +7533,7 @@ class Atribuir {
|
|
|
7280
7533
|
}
|
|
7281
7534
|
exports.Atribuir = Atribuir;
|
|
7282
7535
|
|
|
7283
|
-
},{}],
|
|
7536
|
+
},{}],35:[function(require,module,exports){
|
|
7284
7537
|
"use strict";
|
|
7285
7538
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7286
7539
|
exports.Binario = void 0;
|
|
@@ -7345,7 +7598,7 @@ class Binario {
|
|
|
7345
7598
|
}
|
|
7346
7599
|
exports.Binario = Binario;
|
|
7347
7600
|
|
|
7348
|
-
},{}],
|
|
7601
|
+
},{}],36:[function(require,module,exports){
|
|
7349
7602
|
"use strict";
|
|
7350
7603
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7351
7604
|
exports.Chamada = void 0;
|
|
@@ -7371,7 +7624,7 @@ class Chamada {
|
|
|
7371
7624
|
}
|
|
7372
7625
|
exports.Chamada = Chamada;
|
|
7373
7626
|
|
|
7374
|
-
},{"../geracao-identificadores":111}],
|
|
7627
|
+
},{"../geracao-identificadores":111}],37:[function(require,module,exports){
|
|
7375
7628
|
"use strict";
|
|
7376
7629
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7377
7630
|
exports.ComentarioComoConstruto = void 0;
|
|
@@ -7395,7 +7648,7 @@ class ComentarioComoConstruto {
|
|
|
7395
7648
|
}
|
|
7396
7649
|
exports.ComentarioComoConstruto = ComentarioComoConstruto;
|
|
7397
7650
|
|
|
7398
|
-
},{}],
|
|
7651
|
+
},{}],38:[function(require,module,exports){
|
|
7399
7652
|
"use strict";
|
|
7400
7653
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7401
7654
|
exports.ComponenteLinguagem = void 0;
|
|
@@ -7418,7 +7671,7 @@ class ComponenteLinguagem {
|
|
|
7418
7671
|
}
|
|
7419
7672
|
exports.ComponenteLinguagem = ComponenteLinguagem;
|
|
7420
7673
|
|
|
7421
|
-
},{}],
|
|
7674
|
+
},{}],39:[function(require,module,exports){
|
|
7422
7675
|
"use strict";
|
|
7423
7676
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7424
7677
|
exports.Constante = void 0;
|
|
@@ -7440,11 +7693,11 @@ class Constante {
|
|
|
7440
7693
|
}
|
|
7441
7694
|
exports.Constante = Constante;
|
|
7442
7695
|
|
|
7443
|
-
},{}],
|
|
7696
|
+
},{}],40:[function(require,module,exports){
|
|
7444
7697
|
"use strict";
|
|
7445
7698
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7446
7699
|
|
|
7447
|
-
},{}],
|
|
7700
|
+
},{}],41:[function(require,module,exports){
|
|
7448
7701
|
"use strict";
|
|
7449
7702
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7450
7703
|
exports.Decorador = void 0;
|
|
@@ -7469,7 +7722,7 @@ class Decorador {
|
|
|
7469
7722
|
}
|
|
7470
7723
|
exports.Decorador = Decorador;
|
|
7471
7724
|
|
|
7472
|
-
},{}],
|
|
7725
|
+
},{}],42:[function(require,module,exports){
|
|
7473
7726
|
"use strict";
|
|
7474
7727
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7475
7728
|
exports.DefinirValor = void 0;
|
|
@@ -7490,7 +7743,7 @@ class DefinirValor {
|
|
|
7490
7743
|
}
|
|
7491
7744
|
exports.DefinirValor = DefinirValor;
|
|
7492
7745
|
|
|
7493
|
-
},{}],
|
|
7746
|
+
},{}],43:[function(require,module,exports){
|
|
7494
7747
|
"use strict";
|
|
7495
7748
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7496
7749
|
exports.Dicionario = void 0;
|
|
@@ -7511,7 +7764,7 @@ class Dicionario {
|
|
|
7511
7764
|
}
|
|
7512
7765
|
exports.Dicionario = Dicionario;
|
|
7513
7766
|
|
|
7514
|
-
},{}],
|
|
7767
|
+
},{}],44:[function(require,module,exports){
|
|
7515
7768
|
"use strict";
|
|
7516
7769
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7517
7770
|
exports.EnquantoComoConstruto = void 0;
|
|
@@ -7531,7 +7784,7 @@ class EnquantoComoConstruto {
|
|
|
7531
7784
|
}
|
|
7532
7785
|
exports.EnquantoComoConstruto = EnquantoComoConstruto;
|
|
7533
7786
|
|
|
7534
|
-
},{}],
|
|
7787
|
+
},{}],45:[function(require,module,exports){
|
|
7535
7788
|
"use strict";
|
|
7536
7789
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7537
7790
|
exports.ExpressaoRegular = void 0;
|
|
@@ -7551,7 +7804,7 @@ class ExpressaoRegular {
|
|
|
7551
7804
|
}
|
|
7552
7805
|
exports.ExpressaoRegular = ExpressaoRegular;
|
|
7553
7806
|
|
|
7554
|
-
},{}],
|
|
7807
|
+
},{}],46:[function(require,module,exports){
|
|
7555
7808
|
"use strict";
|
|
7556
7809
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7557
7810
|
exports.FazerComoConstruto = void 0;
|
|
@@ -7571,7 +7824,7 @@ class FazerComoConstruto {
|
|
|
7571
7824
|
}
|
|
7572
7825
|
exports.FazerComoConstruto = FazerComoConstruto;
|
|
7573
7826
|
|
|
7574
|
-
},{}],
|
|
7827
|
+
},{}],47:[function(require,module,exports){
|
|
7575
7828
|
"use strict";
|
|
7576
7829
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7577
7830
|
exports.FimPara = void 0;
|
|
@@ -7601,7 +7854,7 @@ class FimPara {
|
|
|
7601
7854
|
}
|
|
7602
7855
|
exports.FimPara = FimPara;
|
|
7603
7856
|
|
|
7604
|
-
},{}],
|
|
7857
|
+
},{}],48:[function(require,module,exports){
|
|
7605
7858
|
"use strict";
|
|
7606
7859
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7607
7860
|
exports.FormatacaoEscrita = void 0;
|
|
@@ -7627,7 +7880,7 @@ class FormatacaoEscrita {
|
|
|
7627
7880
|
}
|
|
7628
7881
|
exports.FormatacaoEscrita = FormatacaoEscrita;
|
|
7629
7882
|
|
|
7630
|
-
},{}],
|
|
7883
|
+
},{}],49:[function(require,module,exports){
|
|
7631
7884
|
"use strict";
|
|
7632
7885
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7633
7886
|
exports.FuncaoConstruto = void 0;
|
|
@@ -7650,7 +7903,7 @@ class FuncaoConstruto {
|
|
|
7650
7903
|
}
|
|
7651
7904
|
exports.FuncaoConstruto = FuncaoConstruto;
|
|
7652
7905
|
|
|
7653
|
-
},{}],
|
|
7906
|
+
},{}],50:[function(require,module,exports){
|
|
7654
7907
|
"use strict";
|
|
7655
7908
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7656
7909
|
if (k2 === undefined) k2 = k;
|
|
@@ -7710,7 +7963,7 @@ __exportStar(require("./unario"), exports);
|
|
|
7710
7963
|
__exportStar(require("./variavel"), exports);
|
|
7711
7964
|
__exportStar(require("./vetor"), exports);
|
|
7712
7965
|
|
|
7713
|
-
},{"./acesso-elemento-matriz":
|
|
7966
|
+
},{"./acesso-elemento-matriz":25,"./acesso-indice-variavel":26,"./acesso-metodo":28,"./acesso-metodo-ou-propriedade":27,"./acesso-propriedade":29,"./agrupamento":30,"./argumento-referencia-funcao":31,"./atribuicao-por-indice":32,"./atribuicao-por-indices-matriz":33,"./atribuir":34,"./binario":35,"./chamada":36,"./comentario-como-construto":37,"./componente-linguagem":38,"./constante":39,"./construto":40,"./decorador":41,"./definir-valor":42,"./dicionario":43,"./enquanto-como-construto":44,"./expressao-regular":45,"./fazer-como-construto":46,"./fim-para":47,"./formatacao-escrita":48,"./funcao":49,"./isto":51,"./leia":52,"./lista-compreensao":53,"./literal":54,"./logico":55,"./para-cada-como-construto":56,"./para-como-construto":57,"./referencia-biblioteca-global":58,"./referencia-funcao":59,"./separador":60,"./super":61,"./tipo-de":62,"./tupla":63,"./tuplas":66,"./unario":74,"./variavel":75,"./vetor":76}],51:[function(require,module,exports){
|
|
7714
7967
|
"use strict";
|
|
7715
7968
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7716
7969
|
exports.Isto = void 0;
|
|
@@ -7729,7 +7982,7 @@ class Isto {
|
|
|
7729
7982
|
}
|
|
7730
7983
|
exports.Isto = Isto;
|
|
7731
7984
|
|
|
7732
|
-
},{}],
|
|
7985
|
+
},{}],52:[function(require,module,exports){
|
|
7733
7986
|
"use strict";
|
|
7734
7987
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7735
7988
|
exports.Leia = void 0;
|
|
@@ -7755,7 +8008,7 @@ class Leia {
|
|
|
7755
8008
|
}
|
|
7756
8009
|
exports.Leia = Leia;
|
|
7757
8010
|
|
|
7758
|
-
},{"../geracao-identificadores":111}],
|
|
8011
|
+
},{"../geracao-identificadores":111}],53:[function(require,module,exports){
|
|
7759
8012
|
"use strict";
|
|
7760
8013
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7761
8014
|
exports.ListaCompreensao = void 0;
|
|
@@ -7777,7 +8030,7 @@ class ListaCompreensao {
|
|
|
7777
8030
|
}
|
|
7778
8031
|
exports.ListaCompreensao = ListaCompreensao;
|
|
7779
8032
|
|
|
7780
|
-
},{}],
|
|
8033
|
+
},{}],54:[function(require,module,exports){
|
|
7781
8034
|
"use strict";
|
|
7782
8035
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7783
8036
|
exports.Literal = void 0;
|
|
@@ -7797,7 +8050,7 @@ class Literal {
|
|
|
7797
8050
|
}
|
|
7798
8051
|
exports.Literal = Literal;
|
|
7799
8052
|
|
|
7800
|
-
},{}],
|
|
8053
|
+
},{}],55:[function(require,module,exports){
|
|
7801
8054
|
"use strict";
|
|
7802
8055
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7803
8056
|
exports.Logico = void 0;
|
|
@@ -7820,7 +8073,7 @@ class Logico {
|
|
|
7820
8073
|
}
|
|
7821
8074
|
exports.Logico = Logico;
|
|
7822
8075
|
|
|
7823
|
-
},{}],
|
|
8076
|
+
},{}],56:[function(require,module,exports){
|
|
7824
8077
|
"use strict";
|
|
7825
8078
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7826
8079
|
exports.ParaCadaComoConstruto = void 0;
|
|
@@ -7842,7 +8095,7 @@ class ParaCadaComoConstruto {
|
|
|
7842
8095
|
}
|
|
7843
8096
|
exports.ParaCadaComoConstruto = ParaCadaComoConstruto;
|
|
7844
8097
|
|
|
7845
|
-
},{}],
|
|
8098
|
+
},{}],57:[function(require,module,exports){
|
|
7846
8099
|
"use strict";
|
|
7847
8100
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7848
8101
|
exports.ParaComoConstruto = void 0;
|
|
@@ -7867,7 +8120,7 @@ class ParaComoConstruto {
|
|
|
7867
8120
|
}
|
|
7868
8121
|
exports.ParaComoConstruto = ParaComoConstruto;
|
|
7869
8122
|
|
|
7870
|
-
},{}],
|
|
8123
|
+
},{}],58:[function(require,module,exports){
|
|
7871
8124
|
"use strict";
|
|
7872
8125
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7873
8126
|
exports.ReferenciaBibliotecaGlobal = void 0;
|
|
@@ -7890,7 +8143,7 @@ class ReferenciaBibliotecaGlobal {
|
|
|
7890
8143
|
}
|
|
7891
8144
|
exports.ReferenciaBibliotecaGlobal = ReferenciaBibliotecaGlobal;
|
|
7892
8145
|
|
|
7893
|
-
},{}],
|
|
8146
|
+
},{}],59:[function(require,module,exports){
|
|
7894
8147
|
"use strict";
|
|
7895
8148
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7896
8149
|
exports.ReferenciaFuncao = void 0;
|
|
@@ -7911,7 +8164,7 @@ class ReferenciaFuncao {
|
|
|
7911
8164
|
}
|
|
7912
8165
|
exports.ReferenciaFuncao = ReferenciaFuncao;
|
|
7913
8166
|
|
|
7914
|
-
},{}],
|
|
8167
|
+
},{}],60:[function(require,module,exports){
|
|
7915
8168
|
"use strict";
|
|
7916
8169
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7917
8170
|
exports.Separador = void 0;
|
|
@@ -7930,7 +8183,7 @@ class Separador {
|
|
|
7930
8183
|
}
|
|
7931
8184
|
exports.Separador = Separador;
|
|
7932
8185
|
|
|
7933
|
-
},{}],
|
|
8186
|
+
},{}],61:[function(require,module,exports){
|
|
7934
8187
|
"use strict";
|
|
7935
8188
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7936
8189
|
exports.Super = void 0;
|
|
@@ -7950,7 +8203,7 @@ class Super {
|
|
|
7950
8203
|
}
|
|
7951
8204
|
exports.Super = Super;
|
|
7952
8205
|
|
|
7953
|
-
},{}],
|
|
8206
|
+
},{}],62:[function(require,module,exports){
|
|
7954
8207
|
"use strict";
|
|
7955
8208
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7956
8209
|
exports.TipoDe = void 0;
|
|
@@ -7974,7 +8227,7 @@ class TipoDe {
|
|
|
7974
8227
|
}
|
|
7975
8228
|
exports.TipoDe = TipoDe;
|
|
7976
8229
|
|
|
7977
|
-
},{}],
|
|
8230
|
+
},{}],63:[function(require,module,exports){
|
|
7978
8231
|
"use strict";
|
|
7979
8232
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7980
8233
|
exports.Tupla = void 0;
|
|
@@ -7985,7 +8238,7 @@ class Tupla {
|
|
|
7985
8238
|
}
|
|
7986
8239
|
exports.Tupla = Tupla;
|
|
7987
8240
|
|
|
7988
|
-
},{}],
|
|
8241
|
+
},{}],64:[function(require,module,exports){
|
|
7989
8242
|
"use strict";
|
|
7990
8243
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7991
8244
|
exports.Deceto = void 0;
|
|
@@ -8033,7 +8286,7 @@ class Deceto extends tupla_1.Tupla {
|
|
|
8033
8286
|
}
|
|
8034
8287
|
exports.Deceto = Deceto;
|
|
8035
8288
|
|
|
8036
|
-
},{"../tupla":
|
|
8289
|
+
},{"../tupla":63}],65:[function(require,module,exports){
|
|
8037
8290
|
"use strict";
|
|
8038
8291
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8039
8292
|
exports.Dupla = void 0;
|
|
@@ -8052,7 +8305,7 @@ class Dupla extends tupla_1.Tupla {
|
|
|
8052
8305
|
}
|
|
8053
8306
|
exports.Dupla = Dupla;
|
|
8054
8307
|
|
|
8055
|
-
},{"../tupla":
|
|
8308
|
+
},{"../tupla":63}],66:[function(require,module,exports){
|
|
8056
8309
|
"use strict";
|
|
8057
8310
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8058
8311
|
if (k2 === undefined) k2 = k;
|
|
@@ -8120,7 +8373,7 @@ class SeletorTuplas {
|
|
|
8120
8373
|
}
|
|
8121
8374
|
exports.SeletorTuplas = SeletorTuplas;
|
|
8122
8375
|
|
|
8123
|
-
},{"./deceto":
|
|
8376
|
+
},{"./deceto":64,"./dupla":65,"./noneto":67,"./octeto":68,"./quarteto":69,"./quinteto":70,"./septeto":71,"./sexteto":72,"./trio":73}],67:[function(require,module,exports){
|
|
8124
8377
|
"use strict";
|
|
8125
8378
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8126
8379
|
exports.Noneto = void 0;
|
|
@@ -8159,7 +8412,7 @@ class Noneto extends tupla_1.Tupla {
|
|
|
8159
8412
|
}
|
|
8160
8413
|
exports.Noneto = Noneto;
|
|
8161
8414
|
|
|
8162
|
-
},{"../tupla":
|
|
8415
|
+
},{"../tupla":63}],68:[function(require,module,exports){
|
|
8163
8416
|
"use strict";
|
|
8164
8417
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8165
8418
|
exports.Octeto = void 0;
|
|
@@ -8196,7 +8449,7 @@ class Octeto extends tupla_1.Tupla {
|
|
|
8196
8449
|
}
|
|
8197
8450
|
exports.Octeto = Octeto;
|
|
8198
8451
|
|
|
8199
|
-
},{"../tupla":
|
|
8452
|
+
},{"../tupla":63}],69:[function(require,module,exports){
|
|
8200
8453
|
"use strict";
|
|
8201
8454
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8202
8455
|
exports.Quarteto = void 0;
|
|
@@ -8219,7 +8472,7 @@ class Quarteto extends tupla_1.Tupla {
|
|
|
8219
8472
|
}
|
|
8220
8473
|
exports.Quarteto = Quarteto;
|
|
8221
8474
|
|
|
8222
|
-
},{"../tupla":
|
|
8475
|
+
},{"../tupla":63}],70:[function(require,module,exports){
|
|
8223
8476
|
"use strict";
|
|
8224
8477
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8225
8478
|
exports.Quinteto = void 0;
|
|
@@ -8244,7 +8497,7 @@ class Quinteto extends tupla_1.Tupla {
|
|
|
8244
8497
|
}
|
|
8245
8498
|
exports.Quinteto = Quinteto;
|
|
8246
8499
|
|
|
8247
|
-
},{"../tupla":
|
|
8500
|
+
},{"../tupla":63}],71:[function(require,module,exports){
|
|
8248
8501
|
"use strict";
|
|
8249
8502
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8250
8503
|
exports.Septeto = void 0;
|
|
@@ -8279,7 +8532,7 @@ class Septeto extends tupla_1.Tupla {
|
|
|
8279
8532
|
}
|
|
8280
8533
|
exports.Septeto = Septeto;
|
|
8281
8534
|
|
|
8282
|
-
},{"../tupla":
|
|
8535
|
+
},{"../tupla":63}],72:[function(require,module,exports){
|
|
8283
8536
|
"use strict";
|
|
8284
8537
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8285
8538
|
exports.Sexteto = void 0;
|
|
@@ -8306,7 +8559,7 @@ class Sexteto extends tupla_1.Tupla {
|
|
|
8306
8559
|
}
|
|
8307
8560
|
exports.Sexteto = Sexteto;
|
|
8308
8561
|
|
|
8309
|
-
},{"../tupla":
|
|
8562
|
+
},{"../tupla":63}],73:[function(require,module,exports){
|
|
8310
8563
|
"use strict";
|
|
8311
8564
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8312
8565
|
exports.Trio = void 0;
|
|
@@ -8327,7 +8580,7 @@ class Trio extends tupla_1.Tupla {
|
|
|
8327
8580
|
}
|
|
8328
8581
|
exports.Trio = Trio;
|
|
8329
8582
|
|
|
8330
|
-
},{"../tupla":
|
|
8583
|
+
},{"../tupla":63}],74:[function(require,module,exports){
|
|
8331
8584
|
"use strict";
|
|
8332
8585
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8333
8586
|
exports.Unario = void 0;
|
|
@@ -8348,7 +8601,7 @@ class Unario {
|
|
|
8348
8601
|
}
|
|
8349
8602
|
exports.Unario = Unario;
|
|
8350
8603
|
|
|
8351
|
-
},{}],
|
|
8604
|
+
},{}],75:[function(require,module,exports){
|
|
8352
8605
|
"use strict";
|
|
8353
8606
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8354
8607
|
exports.Variavel = void 0;
|
|
@@ -8368,7 +8621,7 @@ class Variavel {
|
|
|
8368
8621
|
}
|
|
8369
8622
|
exports.Variavel = Variavel;
|
|
8370
8623
|
|
|
8371
|
-
},{}],
|
|
8624
|
+
},{}],76:[function(require,module,exports){
|
|
8372
8625
|
"use strict";
|
|
8373
8626
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8374
8627
|
exports.Vetor = void 0;
|
|
@@ -8394,28 +8647,7 @@ class Vetor {
|
|
|
8394
8647
|
}
|
|
8395
8648
|
exports.Vetor = Vetor;
|
|
8396
8649
|
|
|
8397
|
-
},{}],
|
|
8398
|
-
"use strict";
|
|
8399
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8400
|
-
exports.Aleatorio = void 0;
|
|
8401
|
-
const declaracao_1 = require("./declaracao");
|
|
8402
|
-
// TODO: Mover para VisuAlg e depreciar.
|
|
8403
|
-
class Aleatorio extends declaracao_1.Declaracao {
|
|
8404
|
-
constructor(linha, hashArquivo, corpo, argumentos) {
|
|
8405
|
-
super(linha, hashArquivo);
|
|
8406
|
-
this.corpo = corpo;
|
|
8407
|
-
this.argumentos = argumentos;
|
|
8408
|
-
}
|
|
8409
|
-
async aceitar(visitante) {
|
|
8410
|
-
return await visitante.visitarDeclaracaoAleatorio(this);
|
|
8411
|
-
}
|
|
8412
|
-
paraTexto() {
|
|
8413
|
-
return `<aleatório />`;
|
|
8414
|
-
}
|
|
8415
|
-
}
|
|
8416
|
-
exports.Aleatorio = Aleatorio;
|
|
8417
|
-
|
|
8418
|
-
},{"./declaracao":84}],77:[function(require,module,exports){
|
|
8650
|
+
},{}],77:[function(require,module,exports){
|
|
8419
8651
|
"use strict";
|
|
8420
8652
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8421
8653
|
exports.Bloco = void 0;
|
|
@@ -8782,7 +9014,7 @@ class FuncaoDeclaracao extends declaracao_1.Declaracao {
|
|
|
8782
9014
|
this.decoradores = decoradores;
|
|
8783
9015
|
}
|
|
8784
9016
|
async aceitar(visitante) {
|
|
8785
|
-
return
|
|
9017
|
+
return await visitante.visitarDeclaracaoDefinicaoFuncao(this);
|
|
8786
9018
|
}
|
|
8787
9019
|
paraTexto() {
|
|
8788
9020
|
// TODO: Corpo.
|
|
@@ -8832,7 +9064,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
8832
9064
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
8833
9065
|
};
|
|
8834
9066
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8835
|
-
__exportStar(require("./aleatorio"), exports);
|
|
8836
9067
|
__exportStar(require("./bloco"), exports);
|
|
8837
9068
|
__exportStar(require("./cabecalho-programa"), exports);
|
|
8838
9069
|
__exportStar(require("./classe"), exports);
|
|
@@ -8863,7 +9094,7 @@ __exportStar(require("./tente"), exports);
|
|
|
8863
9094
|
__exportStar(require("./var"), exports);
|
|
8864
9095
|
__exportStar(require("./var-multiplo"), exports);
|
|
8865
9096
|
|
|
8866
|
-
},{"./
|
|
9097
|
+
},{"./bloco":77,"./cabecalho-programa":78,"./classe":79,"./comentario":80,"./const":82,"./const-multiplo":81,"./continua":83,"./declaracao":84,"./enquanto":85,"./escolha":86,"./escreva":88,"./escreva-mesma-linha":87,"./expressao":89,"./falhar":90,"./fazer":91,"./funcao":92,"./importar":93,"./inicio-algoritmo":95,"./para":97,"./para-cada":96,"./propriedade-classe":98,"./retorna":99,"./se":100,"./sustar":101,"./tendo-como":102,"./tente":103,"./var":105,"./var-multiplo":104}],95:[function(require,module,exports){
|
|
8867
9098
|
"use strict";
|
|
8868
9099
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8869
9100
|
exports.InicioAlgoritmo = void 0;
|
|
@@ -9594,9 +9825,6 @@ class FormatadorDelegua {
|
|
|
9594
9825
|
}
|
|
9595
9826
|
this.codigoFormatado += ')';
|
|
9596
9827
|
}
|
|
9597
|
-
visitarDeclaracaoAleatorio(declaracao) {
|
|
9598
|
-
throw new Error('Método não implementado.');
|
|
9599
|
-
}
|
|
9600
9828
|
visitarExpressaoDefinirValor(expressao) {
|
|
9601
9829
|
this.formatarDeclaracaoOuConstruto(expressao.objeto);
|
|
9602
9830
|
this.codigoFormatado += `.${expressao.nome.lexema} = `;
|
|
@@ -9905,182 +10133,236 @@ class FormatadorDelegua {
|
|
|
9905
10133
|
}
|
|
9906
10134
|
exports.FormatadorDelegua = FormatadorDelegua;
|
|
9907
10135
|
|
|
9908
|
-
},{"../construtos":
|
|
10136
|
+
},{"../construtos":50,"../tipos-de-simbolos/delegua":183}],109:[function(require,module,exports){
|
|
9909
10137
|
"use strict";
|
|
9910
10138
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9911
10139
|
exports.FormatadorPitugues = void 0;
|
|
9912
10140
|
class FormatadorPitugues {
|
|
10141
|
+
/* istanbul ignore next */
|
|
9913
10142
|
visitarExpressaoSeparador(expressao) {
|
|
9914
10143
|
throw new Error('Método não implementado.');
|
|
9915
10144
|
}
|
|
10145
|
+
/* istanbul ignore next */
|
|
9916
10146
|
visitarExpressaoComentario(expressao) {
|
|
9917
10147
|
throw new Error('Método não implementado.');
|
|
9918
10148
|
}
|
|
10149
|
+
/* istanbul ignore next */
|
|
9919
10150
|
visitarExpressaoArgumentoReferenciaFuncao(expressao) {
|
|
9920
10151
|
throw new Error('Método não implementado.');
|
|
9921
10152
|
}
|
|
10153
|
+
/* istanbul ignore next */
|
|
9922
10154
|
visitarExpressaoReferenciaFuncao(expressao) {
|
|
9923
10155
|
throw new Error('Método não implementado.');
|
|
9924
10156
|
}
|
|
9925
|
-
|
|
9926
|
-
throw new Error('Método não implementado.');
|
|
9927
|
-
}
|
|
10157
|
+
/* istanbul ignore next */
|
|
9928
10158
|
visitarDeclaracaoCabecalhoPrograma(declaracao) {
|
|
9929
10159
|
throw new Error('Método não implementado.');
|
|
9930
10160
|
}
|
|
10161
|
+
/* istanbul ignore next */
|
|
9931
10162
|
visitarDeclaracaoClasse(declaracao) {
|
|
9932
10163
|
throw new Error('Método não implementado.');
|
|
9933
10164
|
}
|
|
10165
|
+
/* istanbul ignore next */
|
|
9934
10166
|
visitarDeclaracaoComentario(declaracao) {
|
|
9935
10167
|
throw new Error('Método não implementado.');
|
|
9936
10168
|
}
|
|
10169
|
+
/* istanbul ignore next */
|
|
9937
10170
|
visitarDeclaracaoConst(declaracao) {
|
|
9938
10171
|
throw new Error('Método não implementado.');
|
|
9939
10172
|
}
|
|
10173
|
+
/* istanbul ignore next */
|
|
9940
10174
|
visitarDeclaracaoConstMultiplo(declaracao) {
|
|
9941
10175
|
throw new Error('Método não implementado.');
|
|
9942
10176
|
}
|
|
10177
|
+
/* istanbul ignore next */
|
|
9943
10178
|
visitarDeclaracaoDeExpressao(declaracao) {
|
|
9944
10179
|
throw new Error('Método não implementado.');
|
|
9945
10180
|
}
|
|
10181
|
+
/* istanbul ignore next */
|
|
9946
10182
|
visitarDeclaracaoDefinicaoFuncao(declaracao) {
|
|
9947
10183
|
throw new Error('Método não implementado.');
|
|
9948
10184
|
}
|
|
10185
|
+
/* istanbul ignore next */
|
|
9949
10186
|
visitarDeclaracaoEnquanto(declaracao) {
|
|
9950
10187
|
throw new Error('Método não implementado.');
|
|
9951
10188
|
}
|
|
10189
|
+
/* istanbul ignore next */
|
|
9952
10190
|
visitarDeclaracaoEscolha(declaracao) {
|
|
9953
10191
|
throw new Error('Método não implementado.');
|
|
9954
10192
|
}
|
|
10193
|
+
/* istanbul ignore next */
|
|
9955
10194
|
visitarDeclaracaoEscreva(declaracao) {
|
|
9956
10195
|
throw new Error('Método não implementado.');
|
|
9957
10196
|
}
|
|
10197
|
+
/* istanbul ignore next */
|
|
9958
10198
|
visitarDeclaracaoEscrevaMesmaLinha(declaracao) {
|
|
9959
10199
|
throw new Error('Método não implementado.');
|
|
9960
10200
|
}
|
|
10201
|
+
/* istanbul ignore next */
|
|
9961
10202
|
visitarDeclaracaoFazer(declaracao) {
|
|
9962
10203
|
throw new Error('Método não implementado.');
|
|
9963
10204
|
}
|
|
10205
|
+
/* istanbul ignore next */
|
|
9964
10206
|
visitarDeclaracaoImportar(declaracao) {
|
|
9965
10207
|
throw new Error('Método não implementado.');
|
|
9966
10208
|
}
|
|
10209
|
+
/* istanbul ignore next */
|
|
9967
10210
|
visitarDeclaracaoInicioAlgoritmo(declaracao) {
|
|
9968
10211
|
throw new Error('Método não implementado.');
|
|
9969
10212
|
}
|
|
10213
|
+
/* istanbul ignore next */
|
|
9970
10214
|
visitarDeclaracaoPara(declaracao) {
|
|
9971
10215
|
throw new Error('Método não implementado.');
|
|
9972
10216
|
}
|
|
10217
|
+
/* istanbul ignore next */
|
|
9973
10218
|
visitarDeclaracaoParaCada(declaracao) {
|
|
9974
10219
|
throw new Error('Método não implementado.');
|
|
9975
10220
|
}
|
|
10221
|
+
/* istanbul ignore next */
|
|
9976
10222
|
visitarDeclaracaoSe(declaracao) {
|
|
9977
10223
|
throw new Error('Método não implementado.');
|
|
9978
10224
|
}
|
|
10225
|
+
/* istanbul ignore next */
|
|
9979
10226
|
visitarDeclaracaoTendoComo(declaracao) {
|
|
9980
10227
|
throw new Error('Método não implementado.');
|
|
9981
10228
|
}
|
|
10229
|
+
/* istanbul ignore next */
|
|
9982
10230
|
visitarDeclaracaoTente(declaracao) {
|
|
9983
10231
|
throw new Error('Método não implementado.');
|
|
9984
10232
|
}
|
|
10233
|
+
/* istanbul ignore next */
|
|
9985
10234
|
visitarDeclaracaoVar(declaracao) {
|
|
9986
10235
|
throw new Error('Método não implementado.');
|
|
9987
10236
|
}
|
|
10237
|
+
/* istanbul ignore next */
|
|
9988
10238
|
visitarDeclaracaoVarMultiplo(declaracao) {
|
|
9989
10239
|
throw new Error('Método não implementado.');
|
|
9990
10240
|
}
|
|
10241
|
+
/* istanbul ignore next */
|
|
9991
10242
|
visitarExpressaoDeAtribuicao(expressao) {
|
|
9992
10243
|
throw new Error('Método não implementado.');
|
|
9993
10244
|
}
|
|
10245
|
+
/* istanbul ignore next */
|
|
9994
10246
|
visitarExpressaoAcessoIndiceVariavel(expressao) {
|
|
9995
10247
|
throw new Error('Método não implementado.');
|
|
9996
10248
|
}
|
|
10249
|
+
/* istanbul ignore next */
|
|
9997
10250
|
visitarExpressaoAcessoElementoMatriz(expressao) {
|
|
9998
10251
|
throw new Error('Método não implementado.');
|
|
9999
10252
|
}
|
|
10253
|
+
/* istanbul ignore next */
|
|
10000
10254
|
visitarExpressaoAcessoMetodo(expressao) {
|
|
10001
10255
|
throw new Error('Método não implementado.');
|
|
10002
10256
|
}
|
|
10257
|
+
/* istanbul ignore next */
|
|
10003
10258
|
visitarExpressaoAcessoMetodoOuPropriedade(expressao) {
|
|
10004
10259
|
throw new Error('Método não implementado.');
|
|
10005
10260
|
}
|
|
10261
|
+
/* istanbul ignore next */
|
|
10006
10262
|
visitarExpressaoAcessoPropriedade(expressao) {
|
|
10007
10263
|
throw new Error('Método não implementado.');
|
|
10008
10264
|
}
|
|
10265
|
+
/* istanbul ignore next */
|
|
10009
10266
|
visitarExpressaoAgrupamento(expressao) {
|
|
10010
10267
|
throw new Error('Método não implementado.');
|
|
10011
10268
|
}
|
|
10269
|
+
/* istanbul ignore next */
|
|
10012
10270
|
visitarExpressaoAtribuicaoPorIndice(expressao) {
|
|
10013
10271
|
throw new Error('Método não implementado.');
|
|
10014
10272
|
}
|
|
10273
|
+
/* istanbul ignore next */
|
|
10015
10274
|
visitarExpressaoAtribuicaoPorIndicesMatriz(expressao) {
|
|
10016
10275
|
throw new Error('Método não implementado.');
|
|
10017
10276
|
}
|
|
10277
|
+
/* istanbul ignore next */
|
|
10018
10278
|
visitarExpressaoBinaria(expressao) {
|
|
10019
10279
|
throw new Error('Método não implementado.');
|
|
10020
10280
|
}
|
|
10281
|
+
/* istanbul ignore next */
|
|
10021
10282
|
visitarExpressaoBloco(declaracao) {
|
|
10022
10283
|
throw new Error('Método não implementado.');
|
|
10023
10284
|
}
|
|
10285
|
+
/* istanbul ignore next */
|
|
10024
10286
|
visitarExpressaoContinua(declaracao) {
|
|
10025
10287
|
throw new Error('Método não implementado.');
|
|
10026
10288
|
}
|
|
10289
|
+
/* istanbul ignore next */
|
|
10027
10290
|
visitarExpressaoDeChamada(expressao) {
|
|
10028
10291
|
throw new Error('Método não implementado.');
|
|
10029
10292
|
}
|
|
10293
|
+
/* istanbul ignore next */
|
|
10030
10294
|
visitarExpressaoDefinirValor(expressao) {
|
|
10031
10295
|
throw new Error('Método não implementado.');
|
|
10032
10296
|
}
|
|
10297
|
+
/* istanbul ignore next */
|
|
10033
10298
|
visitarExpressaoFuncaoConstruto(expressao) {
|
|
10034
10299
|
throw new Error('Método não implementado.');
|
|
10035
10300
|
}
|
|
10301
|
+
/* istanbul ignore next */
|
|
10036
10302
|
visitarExpressaoDeVariavel(expressao) {
|
|
10037
10303
|
throw new Error('Método não implementado.');
|
|
10038
10304
|
}
|
|
10305
|
+
/* istanbul ignore next */
|
|
10039
10306
|
visitarExpressaoDicionario(expressao) {
|
|
10040
10307
|
throw new Error('Método não implementado.');
|
|
10041
10308
|
}
|
|
10309
|
+
/* istanbul ignore next */
|
|
10042
10310
|
visitarExpressaoExpressaoRegular(expressao) {
|
|
10043
10311
|
throw new Error('Método não implementado.');
|
|
10044
10312
|
}
|
|
10313
|
+
/* istanbul ignore next */
|
|
10045
10314
|
visitarExpressaoFalhar(expressao) {
|
|
10046
10315
|
throw new Error('Método não implementado.');
|
|
10047
10316
|
}
|
|
10317
|
+
/* istanbul ignore next */
|
|
10048
10318
|
visitarExpressaoFimPara(declaracao) {
|
|
10049
10319
|
throw new Error('Método não implementado.');
|
|
10050
10320
|
}
|
|
10321
|
+
/* istanbul ignore next */
|
|
10051
10322
|
visitarExpressaoFormatacaoEscrita(declaracao) {
|
|
10052
10323
|
throw new Error('Método não implementado.');
|
|
10053
10324
|
}
|
|
10325
|
+
/* istanbul ignore next */
|
|
10054
10326
|
visitarExpressaoIsto(expressao) {
|
|
10055
10327
|
throw new Error('Método não implementado.');
|
|
10056
10328
|
}
|
|
10329
|
+
/* istanbul ignore next */
|
|
10057
10330
|
visitarExpressaoLeia(expressao) {
|
|
10058
10331
|
throw new Error('Método não implementado.');
|
|
10059
10332
|
}
|
|
10333
|
+
/* istanbul ignore next */
|
|
10060
10334
|
visitarExpressaoLiteral(expressao) {
|
|
10061
10335
|
throw new Error('Método não implementado.');
|
|
10062
10336
|
}
|
|
10337
|
+
/* istanbul ignore next */
|
|
10063
10338
|
visitarExpressaoLogica(expressao) {
|
|
10064
10339
|
throw new Error('Método não implementado.');
|
|
10065
10340
|
}
|
|
10341
|
+
/* istanbul ignore next */
|
|
10066
10342
|
visitarExpressaoRetornar(declaracao) {
|
|
10067
10343
|
throw new Error('Método não implementado.');
|
|
10068
10344
|
}
|
|
10345
|
+
/* istanbul ignore next */
|
|
10069
10346
|
visitarExpressaoSuper(expressao) {
|
|
10070
10347
|
throw new Error('Método não implementado.');
|
|
10071
10348
|
}
|
|
10349
|
+
/* istanbul ignore next */
|
|
10072
10350
|
visitarExpressaoSustar(declaracao) {
|
|
10073
10351
|
throw new Error('Método não implementado.');
|
|
10074
10352
|
}
|
|
10353
|
+
/* istanbul ignore next */
|
|
10075
10354
|
visitarExpressaoTupla(expressao) {
|
|
10076
10355
|
throw new Error('Método não implementado.');
|
|
10077
10356
|
}
|
|
10357
|
+
/* istanbul ignore next */
|
|
10078
10358
|
visitarExpressaoTipoDe(expressao) {
|
|
10079
10359
|
throw new Error('Método não implementado.');
|
|
10080
10360
|
}
|
|
10361
|
+
/* istanbul ignore next */
|
|
10081
10362
|
visitarExpressaoUnaria(expressao) {
|
|
10082
10363
|
throw new Error('Método não implementado.');
|
|
10083
10364
|
}
|
|
10365
|
+
/* istanbul ignore next */
|
|
10084
10366
|
visitarExpressaoVetor(expressao) {
|
|
10085
10367
|
throw new Error('Método não implementado.');
|
|
10086
10368
|
}
|
|
@@ -10178,7 +10460,7 @@ __exportStar(require("./interpretador"), exports);
|
|
|
10178
10460
|
__exportStar(require("./lexador"), exports);
|
|
10179
10461
|
__exportStar(require("./tradutores"), exports);
|
|
10180
10462
|
|
|
10181
|
-
},{"./avaliador-sintatico":
|
|
10463
|
+
},{"./avaliador-sintatico":12,"./construtos":50,"./declaracoes":94,"./formatadores":110,"./geracao-identificadores":111,"./interfaces":120,"./interpretador":152,"./lexador":170,"./tradutores":190}],113:[function(require,module,exports){
|
|
10182
10464
|
"use strict";
|
|
10183
10465
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10184
10466
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -10236,7 +10518,7 @@ function inferirTipoVariavel(variavel) {
|
|
|
10236
10518
|
if (variavel === null) {
|
|
10237
10519
|
return 'nulo';
|
|
10238
10520
|
}
|
|
10239
|
-
const tipo = variavel.constructor ? variavel.constructor.name : typeof variavel;
|
|
10521
|
+
const tipo = variavel && variavel.constructor ? variavel.constructor.name : typeof variavel;
|
|
10240
10522
|
switch (tipo) {
|
|
10241
10523
|
case 'String':
|
|
10242
10524
|
case 'string':
|
|
@@ -10559,7 +10841,7 @@ function carregarBibliotecasGlobais(pilhaEscoposExecucao) {
|
|
|
10559
10841
|
pilhaEscoposExecucao.definirVariavel('tupla', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.tupla));
|
|
10560
10842
|
}
|
|
10561
10843
|
|
|
10562
|
-
},{"../bibliotecas/biblioteca-global":
|
|
10844
|
+
},{"../bibliotecas/biblioteca-global":20,"./estruturas/funcao-padrao":145}],140:[function(require,module,exports){
|
|
10563
10845
|
"use strict";
|
|
10564
10846
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10565
10847
|
exports.EspacoMemoria = void 0;
|
|
@@ -11418,8 +11700,20 @@ class InterpretadorBase {
|
|
|
11418
11700
|
}
|
|
11419
11701
|
return expressao.valor;
|
|
11420
11702
|
}
|
|
11703
|
+
/**
|
|
11704
|
+
* Avaliação de agrupamento. Se resultado da avaliação é uma declaração de
|
|
11705
|
+
* função (por exemplo, funções anônimas), a declaração é retornada. Este
|
|
11706
|
+
* retorno é utilizado, entre outros lugares, por `visitarExpressaoDeChamada`.
|
|
11707
|
+
* @param {Agrupamento} expressao O construto de agrupamento.
|
|
11708
|
+
* @returns O resultado da avaliação.
|
|
11709
|
+
* @see this.visitarExpressaoDeChamada
|
|
11710
|
+
*/
|
|
11421
11711
|
async visitarExpressaoAgrupamento(expressao) {
|
|
11422
|
-
|
|
11712
|
+
const avaliacaoAgrupamento = await this.avaliar(expressao.expressao);
|
|
11713
|
+
if (avaliacaoAgrupamento.declaracao !== undefined) {
|
|
11714
|
+
return avaliacaoAgrupamento.declaracao;
|
|
11715
|
+
}
|
|
11716
|
+
return avaliacaoAgrupamento;
|
|
11423
11717
|
}
|
|
11424
11718
|
eVerdadeiro(objeto) {
|
|
11425
11719
|
if (objeto === null)
|
|
@@ -11696,7 +11990,11 @@ class InterpretadorBase {
|
|
|
11696
11990
|
if (variavelEntidadeChamada.hasOwnProperty('valorRetornado')) {
|
|
11697
11991
|
variavelEntidadeChamada = variavelEntidadeChamada.valorRetornado;
|
|
11698
11992
|
}
|
|
11699
|
-
|
|
11993
|
+
let entidadeChamada = this.resolverValor(variavelEntidadeChamada);
|
|
11994
|
+
// Funções anônimas
|
|
11995
|
+
if (entidadeChamada instanceof construtos_1.FuncaoConstruto) {
|
|
11996
|
+
entidadeChamada = new estruturas_1.DeleguaFuncao(null, entidadeChamada);
|
|
11997
|
+
}
|
|
11700
11998
|
if (entidadeChamada instanceof estruturas_1.DeleguaModulo) {
|
|
11701
11999
|
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(expressao.parentese, 'Entidade chamada é um módulo de Delégua. Provavelmente você quer chamar um de seus componentes?', expressao.linha));
|
|
11702
12000
|
}
|
|
@@ -11719,7 +12017,7 @@ class InterpretadorBase {
|
|
|
11719
12017
|
}
|
|
11720
12018
|
if (entidadeChamada instanceof estruturas_1.FuncaoPadrao) {
|
|
11721
12019
|
try {
|
|
11722
|
-
return entidadeChamada.chamar(this, argumentos.map((a) => a &&
|
|
12020
|
+
return entidadeChamada.chamar(this, argumentos.map((a) => a && this.resolverValor(a.valor)), expressao.entidadeChamada.simbolo);
|
|
11723
12021
|
}
|
|
11724
12022
|
catch (erro) {
|
|
11725
12023
|
this.erros.push({
|
|
@@ -12310,6 +12608,9 @@ class InterpretadorBase {
|
|
|
12310
12608
|
visitarDeclaracaoDefinicaoFuncao(declaracao) {
|
|
12311
12609
|
const funcao = new estruturas_1.DeleguaFuncao(declaracao.simbolo.lexema, declaracao.funcao);
|
|
12312
12610
|
this.pilhaEscoposExecucao.definirVariavel(declaracao.simbolo.lexema, funcao);
|
|
12611
|
+
return Promise.resolve({
|
|
12612
|
+
declaracao: funcao
|
|
12613
|
+
});
|
|
12313
12614
|
}
|
|
12314
12615
|
/**
|
|
12315
12616
|
* Executa uma declaração de classe.
|
|
@@ -12403,9 +12704,6 @@ class InterpretadorBase {
|
|
|
12403
12704
|
visitarExpressaoIsto(expressao) {
|
|
12404
12705
|
return this.procurarVariavel(expressao.palavraChave);
|
|
12405
12706
|
}
|
|
12406
|
-
visitarDeclaracaoAleatorio(declaracao) {
|
|
12407
|
-
return Promise.resolve();
|
|
12408
|
-
}
|
|
12409
12707
|
async visitarExpressaoDicionario(expressao) {
|
|
12410
12708
|
const dicionario = {};
|
|
12411
12709
|
for (let i = 0; i < expressao.chaves.length; i++) {
|
|
@@ -12663,7 +12961,7 @@ class InterpretadorBase {
|
|
|
12663
12961
|
exports.InterpretadorBase = InterpretadorBase;
|
|
12664
12962
|
|
|
12665
12963
|
}).call(this)}).call(this,require('_process'))
|
|
12666
|
-
},{"../avaliador-sintatico":
|
|
12964
|
+
},{"../avaliador-sintatico":12,"../bibliotecas/primitivas-dicionario":21,"../construtos":50,"../excecoes":107,"../inferenciador":113,"../lexador":170,"../quebras":177,"../tipos-de-dados/delegua":178,"../tipos-de-dados/primitivos":180,"../tipos-de-simbolos/delegua":183,"./comum":139,"./espaco-memoria":140,"./estruturas":146,"./estruturas/metodo-primitiva":147,"./pilha-escopos-execucao":156,"_process":417,"browser-process-hrtime":363}],154:[function(require,module,exports){
|
|
12667
12965
|
"use strict";
|
|
12668
12966
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12669
12967
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -12816,10 +13114,11 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
12816
13114
|
// TODO: Depreciar essa abordagem a favor do uso por referências?
|
|
12817
13115
|
this.pilhaEscoposExecucao.definirVariavel(declaracao.simbolo.lexema, funcao);
|
|
12818
13116
|
this.pilhaEscoposExecucao.registrarReferenciaFuncao(declaracao.id, funcao);
|
|
12819
|
-
return {
|
|
13117
|
+
return Promise.resolve({
|
|
12820
13118
|
tipo: `função<${funcao.declaracao.tipo || 'qualquer'}>`,
|
|
12821
13119
|
tipoExplicito: funcao.declaracao.tipoExplicito,
|
|
12822
|
-
|
|
13120
|
+
declaracao: funcao
|
|
13121
|
+
});
|
|
12823
13122
|
}
|
|
12824
13123
|
async logicaComumExecucaoEnquanto(enquanto, acumularRetornos) {
|
|
12825
13124
|
let retornoExecucao;
|
|
@@ -12964,6 +13263,9 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
12964
13263
|
if (paraCada.vetorOuDicionario.tipo === 'dicionário') {
|
|
12965
13264
|
valorVetorOuDicionarioResolvido = Object.entries(valorVetorOuDicionarioResolvido).map((v) => new construtos_1.Dupla(v[0], v[1]));
|
|
12966
13265
|
}
|
|
13266
|
+
if (paraCada.vetorOuDicionario.tipo === 'texto') {
|
|
13267
|
+
valorVetorOuDicionarioResolvido = valorVetorOuDicionarioResolvido.split('');
|
|
13268
|
+
}
|
|
12967
13269
|
if (!Array.isArray(valorVetorOuDicionarioResolvido)) {
|
|
12968
13270
|
return Promise.reject("Variável ou literal provida em instrução 'para cada' não é um vetor.");
|
|
12969
13271
|
}
|
|
@@ -13603,7 +13905,7 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
13603
13905
|
}
|
|
13604
13906
|
exports.Interpretador = Interpretador;
|
|
13605
13907
|
|
|
13606
|
-
},{"../bibliotecas/primitivas-dicionario":
|
|
13908
|
+
},{"../bibliotecas/primitivas-dicionario":21,"../bibliotecas/primitivas-numero":22,"../bibliotecas/primitivas-texto":23,"../bibliotecas/primitivas-vetor":24,"../construtos":50,"../declaracoes":94,"../excecoes":107,"../inferenciador":113,"../quebras":177,"../tipos-de-dados/delegua":178,"../tipos-de-dados/primitivos":180,"./estruturas":146,"./interpretador-base":153,"./montao":155}],155:[function(require,module,exports){
|
|
13607
13909
|
"use strict";
|
|
13608
13910
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13609
13911
|
exports.Montao = void 0;
|
|
@@ -30658,10 +30960,11 @@ class TradutorAssemblyScript {
|
|
|
30658
30960
|
}
|
|
30659
30961
|
exports.TradutorAssemblyScript = TradutorAssemblyScript;
|
|
30660
30962
|
|
|
30661
|
-
},{"../construtos":
|
|
30963
|
+
},{"../construtos":50,"../declaracoes":94,"../tipos-de-simbolos/delegua":183}],194:[function(require,module,exports){
|
|
30662
30964
|
"use strict";
|
|
30663
30965
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30664
30966
|
exports.TradutorCalango = void 0;
|
|
30967
|
+
const avaliador_sintatico_calango_1 = require("../avaliador-sintatico/dialetos/avaliador-sintatico-calango");
|
|
30665
30968
|
const dialetos_1 = require("../lexador/dialetos");
|
|
30666
30969
|
class TradutorCalango {
|
|
30667
30970
|
constructor() {
|
|
@@ -30708,19 +31011,18 @@ class TradutorCalango {
|
|
|
30708
31011
|
traduzir(codigo) {
|
|
30709
31012
|
let resultado = '';
|
|
30710
31013
|
this.lexador = new dialetos_1.LexadorCalango();
|
|
30711
|
-
|
|
30712
|
-
|
|
30713
|
-
|
|
30714
|
-
|
|
30715
|
-
|
|
30716
|
-
|
|
30717
|
-
// }
|
|
31014
|
+
this.avaliadorSintatico = new avaliador_sintatico_calango_1.AvaliadorSintaticoCalango();
|
|
31015
|
+
const retornoLexador = this.lexador.mapear(codigo.split('\n'), -1);
|
|
31016
|
+
const retornoAvaliadorSintatico = this.avaliadorSintatico.analisar(retornoLexador, -1);
|
|
31017
|
+
for (const declaracao of retornoAvaliadorSintatico.declaracoes) {
|
|
31018
|
+
resultado += `${this.dicionarioDeclaracoes[declaracao.constructor.name](declaracao)} \n`;
|
|
31019
|
+
}
|
|
30718
31020
|
return resultado;
|
|
30719
31021
|
}
|
|
30720
31022
|
}
|
|
30721
31023
|
exports.TradutorCalango = TradutorCalango;
|
|
30722
31024
|
|
|
30723
|
-
},{"../lexador/dialetos":157}],195:[function(require,module,exports){
|
|
31025
|
+
},{"../avaliador-sintatico/dialetos/avaliador-sintatico-calango":4,"../lexador/dialetos":157}],195:[function(require,module,exports){
|
|
30724
31026
|
"use strict";
|
|
30725
31027
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
30726
31028
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -31464,7 +31766,7 @@ class TradutorJavaScript {
|
|
|
31464
31766
|
}
|
|
31465
31767
|
exports.TradutorJavaScript = TradutorJavaScript;
|
|
31466
31768
|
|
|
31467
|
-
},{"../construtos":
|
|
31769
|
+
},{"../construtos":50,"../declaracoes":94,"../tipos-de-simbolos/delegua":183}],196:[function(require,module,exports){
|
|
31468
31770
|
"use strict";
|
|
31469
31771
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31470
31772
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -31980,7 +32282,7 @@ class TradutorPortugolIpt {
|
|
|
31980
32282
|
}
|
|
31981
32283
|
exports.TradutorPortugolIpt = TradutorPortugolIpt;
|
|
31982
32284
|
|
|
31983
|
-
},{"../avaliador-sintatico/dialetos":
|
|
32285
|
+
},{"../avaliador-sintatico/dialetos":9,"../lexador/dialetos":157}],198:[function(require,module,exports){
|
|
31984
32286
|
"use strict";
|
|
31985
32287
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31986
32288
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -32622,7 +32924,7 @@ class TradutorPython {
|
|
|
32622
32924
|
}
|
|
32623
32925
|
exports.TradutorPython = TradutorPython;
|
|
32624
32926
|
|
|
32625
|
-
},{"../construtos":
|
|
32927
|
+
},{"../construtos":50,"../declaracoes":94,"../tipos-de-simbolos/delegua":183}],199:[function(require,module,exports){
|
|
32626
32928
|
"use strict";
|
|
32627
32929
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32628
32930
|
exports.TradutorReversoJavaScript = void 0;
|
|
@@ -33686,7 +33988,7 @@ class TradutorReversoTenda {
|
|
|
33686
33988
|
}
|
|
33687
33989
|
exports.TradutorReversoTenda = TradutorReversoTenda;
|
|
33688
33990
|
|
|
33689
|
-
},{"../construtos":
|
|
33991
|
+
},{"../construtos":50,"../tipos-de-simbolos/tenda":189}],202:[function(require,module,exports){
|
|
33690
33992
|
"use strict";
|
|
33691
33993
|
/*!
|
|
33692
33994
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|