@designliquido/delegua 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analisador-semantico/dialetos/analisador-semantico-pitugues.d.ts.map +1 -1
- package/analisador-semantico/dialetos/analisador-semantico-pitugues.js +0 -3
- package/analisador-semantico/dialetos/analisador-semantico-pitugues.js.map +1 -1
- package/avaliador-sintatico/avaliador-sintatico-base.d.ts +5 -0
- package/avaliador-sintatico/avaliador-sintatico-base.d.ts.map +1 -1
- package/avaliador-sintatico/avaliador-sintatico-base.js +20 -0
- package/avaliador-sintatico/avaliador-sintatico-base.js.map +1 -1
- package/avaliador-sintatico/avaliador-sintatico.d.ts +11 -1
- package/avaliador-sintatico/avaliador-sintatico.d.ts.map +1 -1
- package/avaliador-sintatico/avaliador-sintatico.js +38 -6
- package/avaliador-sintatico/avaliador-sintatico.js.map +1 -1
- package/avaliador-sintatico/comum.d.ts.map +1 -1
- package/avaliador-sintatico/comum.js +4 -2
- package/avaliador-sintatico/comum.js.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.d.ts +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.d.ts.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.js +2 -2
- package/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.js.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.d.ts +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.d.ts.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.js +11 -2
- package/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.js.map +1 -1
- package/avaliador-sintatico/traducao/avaliador-sintatico-javascript.d.ts +0 -47
- package/avaliador-sintatico/traducao/avaliador-sintatico-javascript.d.ts.map +1 -1
- package/avaliador-sintatico/traducao/avaliador-sintatico-javascript.js +0 -135
- package/avaliador-sintatico/traducao/avaliador-sintatico-javascript.js.map +1 -1
- package/bibliotecas/biblioteca-global.d.ts +21 -0
- package/bibliotecas/biblioteca-global.d.ts.map +1 -1
- package/bibliotecas/biblioteca-global.js +147 -0
- package/bibliotecas/biblioteca-global.js.map +1 -1
- package/bibliotecas/dialetos/pitugues/biblioteca-global.d.ts +21 -0
- package/bibliotecas/dialetos/pitugues/biblioteca-global.d.ts.map +1 -1
- package/bibliotecas/dialetos/pitugues/biblioteca-global.js +147 -0
- package/bibliotecas/dialetos/pitugues/biblioteca-global.js.map +1 -1
- package/bibliotecas/dialetos/pitugues/primitivas-dicionario.d.ts.map +1 -1
- package/bibliotecas/dialetos/pitugues/primitivas-dicionario.js +5 -5
- package/bibliotecas/dialetos/pitugues/primitivas-dicionario.js.map +1 -1
- package/bibliotecas/dialetos/pitugues/primitivas-numero.d.ts.map +1 -1
- package/bibliotecas/dialetos/pitugues/primitivas-numero.js +4 -4
- package/bibliotecas/dialetos/pitugues/primitivas-numero.js.map +1 -1
- package/bibliotecas/dialetos/pitugues/primitivas-texto.d.ts.map +1 -1
- package/bibliotecas/dialetos/pitugues/primitivas-texto.js +18 -18
- package/bibliotecas/dialetos/pitugues/primitivas-texto.js.map +1 -1
- package/bibliotecas/dialetos/pitugues/primitivas-tupla.d.ts.map +1 -1
- package/bibliotecas/dialetos/pitugues/primitivas-tupla.js +2 -2
- package/bibliotecas/dialetos/pitugues/primitivas-tupla.js.map +1 -1
- package/bibliotecas/dialetos/pitugues/primitivas-vetor.d.ts.map +1 -1
- package/bibliotecas/dialetos/pitugues/primitivas-vetor.js +18 -38
- package/bibliotecas/dialetos/pitugues/primitivas-vetor.js.map +1 -1
- package/bibliotecas/primitivas-dicionario.d.ts.map +1 -1
- package/bibliotecas/primitivas-dicionario.js +5 -5
- package/bibliotecas/primitivas-dicionario.js.map +1 -1
- package/bibliotecas/primitivas-numero.d.ts.map +1 -1
- package/bibliotecas/primitivas-numero.js +4 -4
- package/bibliotecas/primitivas-numero.js.map +1 -1
- package/bibliotecas/primitivas-texto.d.ts +1 -1
- package/bibliotecas/primitivas-texto.d.ts.map +1 -1
- package/bibliotecas/primitivas-texto.js +21 -21
- package/bibliotecas/primitivas-texto.js.map +1 -1
- package/bibliotecas/primitivas-tupla.d.ts.map +1 -1
- package/bibliotecas/primitivas-tupla.js +2 -2
- package/bibliotecas/primitivas-tupla.js.map +1 -1
- package/bibliotecas/primitivas-vetor.d.ts.map +1 -1
- package/bibliotecas/primitivas-vetor.js +19 -39
- package/bibliotecas/primitivas-vetor.js.map +1 -1
- package/bin/package.json +1 -1
- package/declaracoes/ajuda.d.ts +2 -0
- package/declaracoes/ajuda.d.ts.map +1 -1
- package/declaracoes/ajuda.js +3 -0
- package/declaracoes/ajuda.js.map +1 -1
- package/formatadores/formatador-pitugues.d.ts +1 -0
- package/formatadores/formatador-pitugues.d.ts.map +1 -1
- package/formatadores/formatador-pitugues.js +3 -1
- package/formatadores/formatador-pitugues.js.map +1 -1
- package/interpretador/comum.d.ts +1 -0
- package/interpretador/comum.d.ts.map +1 -1
- package/interpretador/comum.js +21 -0
- package/interpretador/comum.js.map +1 -1
- package/interpretador/dialetos/pitugues/interpretador-pitugues.d.ts +1 -2
- package/interpretador/dialetos/pitugues/interpretador-pitugues.d.ts.map +1 -1
- package/interpretador/dialetos/pitugues/interpretador-pitugues.js +0 -38
- package/interpretador/dialetos/pitugues/interpretador-pitugues.js.map +1 -1
- package/interpretador/estruturas/metodo-primitiva.d.ts +2 -2
- package/interpretador/estruturas/metodo-primitiva.js +4 -4
- package/interpretador/estruturas/metodo-primitiva.js.map +1 -1
- package/interpretador/interpretador-base.d.ts +15 -0
- package/interpretador/interpretador-base.d.ts.map +1 -1
- package/interpretador/interpretador-base.js +190 -7
- package/interpretador/interpretador-base.js.map +1 -1
- package/interpretador/interpretador.d.ts +5 -2
- package/interpretador/interpretador.d.ts.map +1 -1
- package/interpretador/interpretador.js +67 -33
- package/interpretador/interpretador.js.map +1 -1
- package/lexador/dialetos/lexador-pitugues.d.ts.map +1 -1
- package/lexador/dialetos/lexador-pitugues.js +36 -1
- package/lexador/dialetos/lexador-pitugues.js.map +1 -1
- package/package.json +1 -1
- package/tradutores/index.d.ts +1 -0
- package/tradutores/index.d.ts.map +1 -1
- package/tradutores/index.js +1 -0
- package/tradutores/index.js.map +1 -1
- package/tradutores/mermaid/index.d.ts +1 -1
- package/tradutores/mermaid/index.js +1 -1
- package/tradutores/mermaid/subgrafo-classe.d.ts +7 -5
- package/tradutores/mermaid/subgrafo-classe.d.ts.map +1 -1
- package/tradutores/mermaid/subgrafo-classe.js +18 -18
- package/tradutores/mermaid/subgrafo-classe.js.map +1 -1
- package/tradutores/mermaid/subgrafo-metodo.d.ts +13 -0
- package/tradutores/mermaid/subgrafo-metodo.d.ts.map +1 -0
- package/tradutores/mermaid/subgrafo-metodo.js +16 -0
- package/tradutores/mermaid/subgrafo-metodo.js.map +1 -0
- package/tradutores/tradutor-mermaidjs.d.ts +15 -6
- package/tradutores/tradutor-mermaidjs.d.ts.map +1 -1
- package/tradutores/tradutor-mermaidjs.js +145 -52
- package/tradutores/tradutor-mermaidjs.js.map +1 -1
- package/tradutores/tradutor-python.d.ts +11 -0
- package/tradutores/tradutor-python.d.ts.map +1 -1
- package/tradutores/tradutor-python.js +32 -2
- package/tradutores/tradutor-python.js.map +1 -1
- package/tradutores/tradutor-reverso-javascript.d.ts.map +1 -1
- package/tradutores/tradutor-reverso-javascript.js +0 -2
- package/tradutores/tradutor-reverso-javascript.js.map +1 -1
- package/tradutores/tradutor-ruby.d.ts +101 -0
- package/tradutores/tradutor-ruby.d.ts.map +1 -0
- package/tradutores/tradutor-ruby.js +687 -0
- package/tradutores/tradutor-ruby.js.map +1 -0
- package/umd/delegua.js +1738 -477
- package/tradutores/mermaid/diagrama-classe.d.ts +0 -16
- package/tradutores/mermaid/diagrama-classe.d.ts.map +0 -1
- package/tradutores/mermaid/diagrama-classe.js +0 -33
- package/tradutores/mermaid/diagrama-classe.js.map +0 -1
package/umd/delegua.js
CHANGED
|
@@ -1551,6 +1551,26 @@ class AvaliadorSintaticoBase {
|
|
|
1551
1551
|
}
|
|
1552
1552
|
return expressao;
|
|
1553
1553
|
}
|
|
1554
|
+
/**
|
|
1555
|
+
* Processa tuplas, que são expressões separadas por vírgula entre parênteses.
|
|
1556
|
+
* Se não houver vírgula, retorna apenas a expressão simples.
|
|
1557
|
+
*/
|
|
1558
|
+
async tupla() {
|
|
1559
|
+
let expressao = await this.ou();
|
|
1560
|
+
// Se não há vírgula, retorna a expressão simples
|
|
1561
|
+
if (!this.verificarSeSimboloAtualEIgualA(comum_1.default.VIRGULA)) {
|
|
1562
|
+
return expressao;
|
|
1563
|
+
}
|
|
1564
|
+
// Se há vírgula, então é uma tupla
|
|
1565
|
+
const elementos = [expressao];
|
|
1566
|
+
do {
|
|
1567
|
+
if (this.verificarTipoSimboloAtual(comum_1.default.PARENTESE_DIREITO)) {
|
|
1568
|
+
break;
|
|
1569
|
+
}
|
|
1570
|
+
elementos.push(await this.ou());
|
|
1571
|
+
} while (this.verificarSeSimboloAtualEIgualA(comum_1.default.VIRGULA));
|
|
1572
|
+
return new construtos_1.TuplaN(this.hashArquivo, expressao.linha, elementos);
|
|
1573
|
+
}
|
|
1554
1574
|
async expressao() {
|
|
1555
1575
|
return await this.atribuir();
|
|
1556
1576
|
}
|
|
@@ -1909,7 +1929,7 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
1909
1929
|
if (this.verificarSeSimboloAtualEIgualA(delegua_2.default.PARENTESE_ESQUERDO)) {
|
|
1910
1930
|
return this.construtoTupla();
|
|
1911
1931
|
}
|
|
1912
|
-
// Ao resolver a expressão aqui, identificadores dentro da expressão de compreensão
|
|
1932
|
+
// Ao resolver a expressão aqui, identificadores dentro da expressão de compreensão
|
|
1913
1933
|
// de lista serão tratados como 'qualquer', para evitar erros de tipo.
|
|
1914
1934
|
this.intuirTipoQualquerParaIdentificadores = true;
|
|
1915
1935
|
const retornoExpressaoOuPrimeiroValor = await this.seTernario();
|
|
@@ -1989,7 +2009,7 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
1989
2009
|
const simboloIdentificador = this.avancarEDevolverAnterior();
|
|
1990
2010
|
let tipoOperando;
|
|
1991
2011
|
if (this.intuirTipoQualquerParaIdentificadores) {
|
|
1992
|
-
// Esta indicação é utilizada para compreensões de lista, onde o
|
|
2012
|
+
// Esta indicação é utilizada para compreensões de lista, onde o
|
|
1993
2013
|
// tipo do identificador de iteração é 'qualquer' por definição.
|
|
1994
2014
|
tipoOperando = 'qualquer';
|
|
1995
2015
|
this.pilhaEscopos.definirInformacoesVariavel(simboloIdentificador.lexema, new informacao_elemento_sintatico_1.InformacaoElementoSintatico(simboloIdentificador.lexema, 'qualquer') // TODO: Talvez um dia inferir o tipo aqui.
|
|
@@ -2038,7 +2058,14 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
2038
2058
|
return await this.paraComoConstruto(simboloPara);
|
|
2039
2059
|
case delegua_2.default.PARENTESE_ESQUERDO:
|
|
2040
2060
|
this.avancarEDevolverAnterior();
|
|
2041
|
-
|
|
2061
|
+
if (this.verificarSeSimboloAtualEIgualA(delegua_2.default.PARENTESE_DIREITO)) {
|
|
2062
|
+
return new construtos_1.TuplaN(this.hashArquivo, Number(simboloAtual.linha), []);
|
|
2063
|
+
}
|
|
2064
|
+
const expressao = await this.tupla();
|
|
2065
|
+
if (expressao instanceof construtos_1.TuplaN) {
|
|
2066
|
+
this.consumir(delegua_2.default.PARENTESE_DIREITO, "Esperado ')' após itens da tupla.");
|
|
2067
|
+
return expressao;
|
|
2068
|
+
}
|
|
2042
2069
|
this.consumir(delegua_2.default.PARENTESE_DIREITO, "Esperado ')' após a expressão.");
|
|
2043
2070
|
return new construtos_1.Agrupamento(this.hashArquivo, Number(simboloAtual.linha), expressao);
|
|
2044
2071
|
case delegua_2.default.SUPER:
|
|
@@ -2115,7 +2142,7 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
2115
2142
|
}
|
|
2116
2143
|
return new construtos_1.TipoDe(this.hashArquivo, simboloAtual, construto);
|
|
2117
2144
|
}
|
|
2118
|
-
// TODO: O correto seria emitir algum aviso aqui que este avaliador sintático não consegue
|
|
2145
|
+
// TODO: O correto seria emitir algum aviso aqui que este avaliador sintático não consegue
|
|
2119
2146
|
// lidar com tópicos de ajuda neste ponto.
|
|
2120
2147
|
if (this.emAjuda) {
|
|
2121
2148
|
console.log(this.simbolos[this.atual]);
|
|
@@ -2545,6 +2572,31 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
2545
2572
|
}
|
|
2546
2573
|
return expressaoOuCondicao;
|
|
2547
2574
|
}
|
|
2575
|
+
/**
|
|
2576
|
+
* Método que resolve atribuições.
|
|
2577
|
+
* @returns Um construto do tipo `Atribuir`, `Conjunto` ou `AtribuicaoPorIndice`.
|
|
2578
|
+
*/
|
|
2579
|
+
/**
|
|
2580
|
+
* Processa tuplas, que são expressões separadas por vírgula entre parênteses.
|
|
2581
|
+
* Se não houver vírgula, retorna apenas a expressão simples.
|
|
2582
|
+
* Sobrescreve o método da base para usar seTernario() em vez de ou().
|
|
2583
|
+
*/
|
|
2584
|
+
async tupla() {
|
|
2585
|
+
let expressao = await this.seTernario();
|
|
2586
|
+
// Se não há vírgula, retorna a expressão simples
|
|
2587
|
+
if (!this.verificarSeSimboloAtualEIgualA(delegua_2.default.VIRGULA)) {
|
|
2588
|
+
return expressao;
|
|
2589
|
+
}
|
|
2590
|
+
// Se há vírgula, então é uma tupla
|
|
2591
|
+
const elementos = [expressao];
|
|
2592
|
+
do {
|
|
2593
|
+
if (this.verificarTipoSimboloAtual(delegua_2.default.PARENTESE_DIREITO)) {
|
|
2594
|
+
break;
|
|
2595
|
+
}
|
|
2596
|
+
elementos.push(await this.seTernario());
|
|
2597
|
+
} while (this.verificarSeSimboloAtualEIgualA(delegua_2.default.VIRGULA));
|
|
2598
|
+
return new construtos_1.TuplaN(this.hashArquivo, expressao.linha, elementos);
|
|
2599
|
+
}
|
|
2548
2600
|
/**
|
|
2549
2601
|
* Método que resolve atribuições.
|
|
2550
2602
|
* @returns Um construto do tipo `Atribuir`, `Conjunto` ou `AtribuicaoPorIndice`.
|
|
@@ -2815,7 +2867,7 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
2815
2867
|
else {
|
|
2816
2868
|
importar.elementosImportacao = elementosImportacao;
|
|
2817
2869
|
}
|
|
2818
|
-
return importar;
|
|
2870
|
+
return Promise.resolve(importar);
|
|
2819
2871
|
}
|
|
2820
2872
|
async declaracaoPara() {
|
|
2821
2873
|
try {
|
|
@@ -3600,7 +3652,7 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
3600
3652
|
return await this.declaracaoFazer(simboloFazer);
|
|
3601
3653
|
case delegua_2.default.IMPORTAR:
|
|
3602
3654
|
this.avancarEDevolverAnterior();
|
|
3603
|
-
return this.declaracaoImportar();
|
|
3655
|
+
return await this.declaracaoImportar();
|
|
3604
3656
|
case delegua_2.default.LINHA_COMENTARIO:
|
|
3605
3657
|
return this.declaracaoComentarioMultilinha();
|
|
3606
3658
|
case delegua_2.default.PARA:
|
|
@@ -3790,7 +3842,7 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
3790
3842
|
}
|
|
3791
3843
|
exports.AvaliadorSintatico = AvaliadorSintatico;
|
|
3792
3844
|
|
|
3793
|
-
},{"../bibliotecas/primitivas-dicionario":29,"../bibliotecas/primitivas-numero":30,"../bibliotecas/primitivas-texto":31,"../bibliotecas/primitivas-vetor":32,"../construtos":62,"../construtos/tuplas":80,"../declaracoes":109,"../inferenciador":135,"../informacao-elemento-sintatico":136,"../tipos-de-dados/delegua":207,"../tipos-de-simbolos/delegua":212,"./avaliador-sintatico-base":9,"./comum":11,"./elemento-montao-tipos":19,"./erro-avaliador-sintatico":20,"./informacao-escopo":22,"./montao-tipos":25,"./pilha-escopos":26,"browser-process-hrtime":
|
|
3845
|
+
},{"../bibliotecas/primitivas-dicionario":29,"../bibliotecas/primitivas-numero":30,"../bibliotecas/primitivas-texto":31,"../bibliotecas/primitivas-vetor":32,"../construtos":62,"../construtos/tuplas":80,"../declaracoes":109,"../inferenciador":135,"../informacao-elemento-sintatico":136,"../tipos-de-dados/delegua":207,"../tipos-de-simbolos/delegua":212,"./avaliador-sintatico-base":9,"./comum":11,"./elemento-montao-tipos":19,"./erro-avaliador-sintatico":20,"./informacao-escopo":22,"./montao-tipos":25,"./pilha-escopos":26,"browser-process-hrtime":402}],11:[function(require,module,exports){
|
|
3794
3846
|
"use strict";
|
|
3795
3847
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3796
3848
|
exports.buscarRetornos = buscarRetornos;
|
|
@@ -3862,6 +3914,8 @@ function logicaDescobertaRetornoFuncao(avaliadorSintatico, declaracoesDaFuncao,
|
|
|
3862
3914
|
}
|
|
3863
3915
|
const tiposRetornos = new Set(expressoesRetorna.filter((e) => e.tipo !== 'qualquer').map((e) => e.tipo));
|
|
3864
3916
|
let retornaChamadoExplicitamente = tiposRetornos.size > 0;
|
|
3917
|
+
// Verifica se há retornos com valores (incluindo retornos 'qualquer')
|
|
3918
|
+
let temRetornosComValor = expressoesRetorna.some((e) => e.valor !== null && e.valor !== undefined);
|
|
3865
3919
|
if (tiposRetornos.size > 1 && tipoRetorno !== 'qualquer') {
|
|
3866
3920
|
let tiposEncontrados = Array.from(tiposRetornos).reduce((acumulador, valor) => (acumulador += valor + ', '), '');
|
|
3867
3921
|
tiposEncontrados = tiposEncontrados.slice(0, -2);
|
|
@@ -3876,8 +3930,8 @@ function logicaDescobertaRetornoFuncao(avaliadorSintatico, declaracoesDaFuncao,
|
|
|
3876
3930
|
const tipoRetornoDeduzido = tiposRetornos.values().next().value;
|
|
3877
3931
|
tipoRetorno = tipoRetornoDeduzido;
|
|
3878
3932
|
}
|
|
3879
|
-
else if (!
|
|
3880
|
-
// Ou, se
|
|
3933
|
+
else if (!temRetornosComValor && !definicaoExplicitaDeTipo) {
|
|
3934
|
+
// Ou, se não há retornos com valores, e não foi definido um tipo
|
|
3881
3935
|
// explícito com 'qualquer', o tipo inferido é 'vazio'.
|
|
3882
3936
|
tipoRetorno = 'vazio';
|
|
3883
3937
|
}
|
|
@@ -4052,7 +4106,7 @@ class AvaliadorSintaticoEguaClassico {
|
|
|
4052
4106
|
return new construtos_1.Agrupamento(this.hashArquivo, 0, expressao);
|
|
4053
4107
|
}
|
|
4054
4108
|
if (this.verificarSeSimboloAtualEIgualA(egua_classico_1.default.IMPORTAR))
|
|
4055
|
-
return this.
|
|
4109
|
+
return this.construtoImportar();
|
|
4056
4110
|
throw this.erro(this.simboloAtual(), 'Esperado expressão.');
|
|
4057
4111
|
}
|
|
4058
4112
|
finalizarChamada(entidadeChamada) {
|
|
@@ -4389,7 +4443,7 @@ class AvaliadorSintaticoEguaClassico {
|
|
|
4389
4443
|
this.blocos -= 1;
|
|
4390
4444
|
}
|
|
4391
4445
|
}
|
|
4392
|
-
|
|
4446
|
+
construtoImportar() {
|
|
4393
4447
|
this.consumir(egua_classico_1.default.PARENTESE_ESQUERDO, "Esperado '(' após declaração.");
|
|
4394
4448
|
const caminho = this.expressao();
|
|
4395
4449
|
this.consumir(egua_classico_1.default.PARENTESE_DIREITO, "Esperado ')' após declaração.");
|
|
@@ -5008,7 +5062,7 @@ class AvaliadorSintaticoPitugues {
|
|
|
5008
5062
|
this.pilhaEscopos.definirInformacoesVariavel(simboloFuncao.lexema, new informacao_elemento_sintatico_1.InformacaoElementoSintatico(simboloFuncao.lexema, 'função'));
|
|
5009
5063
|
return corpoDaFuncao;
|
|
5010
5064
|
case pitugues_2.default.IMPORTAR:
|
|
5011
|
-
return this.
|
|
5065
|
+
return await this.construtoImportar();
|
|
5012
5066
|
case pitugues_2.default.NULO:
|
|
5013
5067
|
this.avancarEDevolverAnterior();
|
|
5014
5068
|
return new construtos_1.Literal(this.hashArquivo, simboloAtual.linha, null);
|
|
@@ -5547,7 +5601,7 @@ class AvaliadorSintaticoPitugues {
|
|
|
5547
5601
|
}
|
|
5548
5602
|
return new declaracoes_1.Retorna(palavraChave, valor);
|
|
5549
5603
|
}
|
|
5550
|
-
async
|
|
5604
|
+
async construtoImportar() {
|
|
5551
5605
|
this.avancarEDevolverAnterior();
|
|
5552
5606
|
this.consumir(pitugues_2.default.PARENTESE_ESQUERDO, "Esperado '(' após declaração.");
|
|
5553
5607
|
const caminho = await this.expressao();
|
|
@@ -6006,6 +6060,15 @@ class AvaliadorSintaticoPitugues {
|
|
|
6006
6060
|
this.pilhaEscopos.definirInformacoesVariavel('tupla', new informacao_elemento_sintatico_1.InformacaoElementoSintatico('tupla', 'tupla', true, [
|
|
6007
6061
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('vetor', 'qualquer[]'),
|
|
6008
6062
|
]));
|
|
6063
|
+
this.pilhaEscopos.definirInformacoesVariavel('maximo', new informacao_elemento_sintatico_1.InformacaoElementoSintatico('maximo', 'número', true, [
|
|
6064
|
+
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('vetor', 'qualquer[]'),
|
|
6065
|
+
]));
|
|
6066
|
+
this.pilhaEscopos.definirInformacoesVariavel('minimo', new informacao_elemento_sintatico_1.InformacaoElementoSintatico('minimo', 'número', true, [
|
|
6067
|
+
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('vetor', 'qualquer[]'),
|
|
6068
|
+
]));
|
|
6069
|
+
this.pilhaEscopos.definirInformacoesVariavel('somar', new informacao_elemento_sintatico_1.InformacaoElementoSintatico('somar', 'número', true, [
|
|
6070
|
+
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('vetor', 'qualquer[]'),
|
|
6071
|
+
]));
|
|
6009
6072
|
}
|
|
6010
6073
|
async analisar(retornoLexador, hashArquivo) {
|
|
6011
6074
|
const inicioAnalise = (0, browser_process_hrtime_1.default)();
|
|
@@ -6055,7 +6118,7 @@ class AvaliadorSintaticoPitugues {
|
|
|
6055
6118
|
}
|
|
6056
6119
|
exports.AvaliadorSintaticoPitugues = AvaliadorSintaticoPitugues;
|
|
6057
6120
|
|
|
6058
|
-
},{"../../bibliotecas/dialetos/pitugues/primitivas-tupla":28,"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../declaracoes":109,"../../inferenciador":135,"../../informacao-elemento-sintatico":136,"../../lexador":197,"../../lexador/micro-lexador-pitugues":202,"../../tipos-de-dados/dialetos/pitugues":208,"../../tipos-de-simbolos/pitugues":216,"../comum":11,"../erro-avaliador-sintatico":20,"../informacao-escopo":22,"../pilha-escopos":26,"./micro-avaliador-sintatico-pitugues":18,"browser-process-hrtime":
|
|
6121
|
+
},{"../../bibliotecas/dialetos/pitugues/primitivas-tupla":28,"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../declaracoes":109,"../../inferenciador":135,"../../informacao-elemento-sintatico":136,"../../lexador":197,"../../lexador/micro-lexador-pitugues":202,"../../tipos-de-dados/dialetos/pitugues":208,"../../tipos-de-simbolos/pitugues":216,"../comum":11,"../erro-avaliador-sintatico":20,"../informacao-escopo":22,"../pilha-escopos":26,"./micro-avaliador-sintatico-pitugues":18,"browser-process-hrtime":402}],14:[function(require,module,exports){
|
|
6059
6122
|
"use strict";
|
|
6060
6123
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6061
6124
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -6979,7 +7042,7 @@ class AvaliadorSintaticoPrisma extends avaliador_sintatico_base_1.AvaliadorSinta
|
|
|
6979
7042
|
}
|
|
6980
7043
|
exports.AvaliadorSintaticoPrisma = AvaliadorSintaticoPrisma;
|
|
6981
7044
|
|
|
6982
|
-
},{"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../declaracoes":109,"../../inferenciador":135,"../../informacao-elemento-sintatico":136,"../../lexador":197,"../../tipos-de-simbolos/prisma":218,"../avaliador-sintatico-base":9,"../comum":11,"../informacao-escopo":22,"../pilha-escopos":26,"browser-process-hrtime":
|
|
7045
|
+
},{"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../declaracoes":109,"../../inferenciador":135,"../../informacao-elemento-sintatico":136,"../../lexador":197,"../../tipos-de-simbolos/prisma":218,"../avaliador-sintatico-base":9,"../comum":11,"../informacao-escopo":22,"../pilha-escopos":26,"browser-process-hrtime":402}],16:[function(require,module,exports){
|
|
6983
7046
|
"use strict";
|
|
6984
7047
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6985
7048
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -7962,7 +8025,7 @@ class AvaliadorSintaticoTenda extends avaliador_sintatico_base_1.AvaliadorSintat
|
|
|
7962
8025
|
}
|
|
7963
8026
|
exports.AvaliadorSintaticoTenda = AvaliadorSintaticoTenda;
|
|
7964
8027
|
|
|
7965
|
-
},{"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../construtos/tuplas":80,"../../declaracoes":109,"../../inferenciador":135,"../../informacao-elemento-sintatico":136,"../../lexador/simbolo":205,"../../tipos-de-dados/delegua":207,"../../tipos-de-simbolos/tenda":219,"../avaliador-sintatico-base":9,"./../erro-avaliador-sintatico":20,"./../informacao-escopo":22,"./../pilha-escopos":26,"browser-process-hrtime":
|
|
8028
|
+
},{"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../construtos/tuplas":80,"../../declaracoes":109,"../../inferenciador":135,"../../informacao-elemento-sintatico":136,"../../lexador/simbolo":205,"../../tipos-de-dados/delegua":207,"../../tipos-de-simbolos/tenda":219,"../avaliador-sintatico-base":9,"./../erro-avaliador-sintatico":20,"./../informacao-escopo":22,"./../pilha-escopos":26,"browser-process-hrtime":402}],17:[function(require,module,exports){
|
|
7966
8029
|
"use strict";
|
|
7967
8030
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7968
8031
|
if (k2 === undefined) k2 = k;
|
|
@@ -8776,12 +8839,15 @@ exports.incluido = incluido;
|
|
|
8776
8839
|
exports.inteiro = inteiro;
|
|
8777
8840
|
exports.intervalo = intervalo;
|
|
8778
8841
|
exports.mapear = mapear;
|
|
8842
|
+
exports.maximo = maximo;
|
|
8843
|
+
exports.minimo = minimo;
|
|
8779
8844
|
exports.numero = numero;
|
|
8780
8845
|
exports.ordenar = ordenar;
|
|
8781
8846
|
exports.paraCada = paraCada;
|
|
8782
8847
|
exports.primeiroEmCondicao = primeiroEmCondicao;
|
|
8783
8848
|
exports.real = real;
|
|
8784
8849
|
exports.reduzir = reduzir;
|
|
8850
|
+
exports.somar = somar;
|
|
8785
8851
|
exports.tamanho = tamanho;
|
|
8786
8852
|
exports.texto = texto;
|
|
8787
8853
|
exports.todosEmCondicao = todosEmCondicao;
|
|
@@ -8828,6 +8894,30 @@ const mapaPropriedadesTuplas = {
|
|
|
8828
8894
|
'Noneto': ['primeiro', 'segundo', 'terceiro', 'quarto', 'quinto', 'sexto', 'setimo', 'oitavo', 'nono'],
|
|
8829
8895
|
'Deceto': ['primeiro', 'segundo', 'terceiro', 'quarto', 'quinto', 'sexto', 'setimo', 'oitavo', 'nono', 'decimo'],
|
|
8830
8896
|
};
|
|
8897
|
+
/**
|
|
8898
|
+
* Compara dois valores (números ou vetores).
|
|
8899
|
+
* Retorna:
|
|
8900
|
+
* > 0 se a > b
|
|
8901
|
+
* < 0 se a < b
|
|
8902
|
+
* 0 se a == b
|
|
8903
|
+
* Lança erro se os tipos forem incompatíveis.
|
|
8904
|
+
*/
|
|
8905
|
+
function compararElementosRecursivamente(a, b) {
|
|
8906
|
+
if (typeof a === 'number' && typeof b === 'number') {
|
|
8907
|
+
return a - b;
|
|
8908
|
+
}
|
|
8909
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
8910
|
+
const tamanho = Math.min(a.length, b.length);
|
|
8911
|
+
for (let i = 0; i < tamanho; i++) {
|
|
8912
|
+
const comparacao = compararElementosRecursivamente(a[i], b[i]);
|
|
8913
|
+
if (comparacao !== 0)
|
|
8914
|
+
return comparacao;
|
|
8915
|
+
}
|
|
8916
|
+
return a.length - b.length;
|
|
8917
|
+
}
|
|
8918
|
+
// Tipos incompatíveis (ex: comparar número com vetor)
|
|
8919
|
+
throw new Error('Tipos incompatíveis para comparação.');
|
|
8920
|
+
}
|
|
8831
8921
|
/**
|
|
8832
8922
|
* Retorna um número aleatório entre 0 e 1.
|
|
8833
8923
|
* @returns {Promise<number>} Número real.
|
|
@@ -9308,6 +9398,92 @@ async function mapear(interpretador, vetor, funcaoMapeamento) {
|
|
|
9308
9398
|
}
|
|
9309
9399
|
return resultados;
|
|
9310
9400
|
}
|
|
9401
|
+
/**
|
|
9402
|
+
* Encontra o maior número dentro de um vetor.
|
|
9403
|
+
* @param {InterpretadorInterface} interpretador A instância do interpretador.
|
|
9404
|
+
* @param {VariavelInterface | any} vetor Uma variável de Delégua ou um vetor nativo de JavaScript contendo números.
|
|
9405
|
+
* @returns {Promise<number>} O maior número encontrado no vetor.
|
|
9406
|
+
*/
|
|
9407
|
+
async function maximo(interpretador, vetor) {
|
|
9408
|
+
if (vetor === null || vetor === undefined) {
|
|
9409
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
9410
|
+
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
9411
|
+
linha: interpretador.linhaDeclaracaoAtual,
|
|
9412
|
+
}, 'Parâmetro inválido. O parâmetro da função maximo() não pode ser nulo.'));
|
|
9413
|
+
}
|
|
9414
|
+
const valorVetor = interpretador.resolverValor(vetor);
|
|
9415
|
+
if (!Array.isArray(valorVetor)) {
|
|
9416
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
9417
|
+
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
9418
|
+
linha: interpretador.linhaDeclaracaoAtual,
|
|
9419
|
+
}, 'Parâmetro inválido. O parâmetro da função maximo() deve ser um vetor.'));
|
|
9420
|
+
}
|
|
9421
|
+
if (vetor.length == 0) {
|
|
9422
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
9423
|
+
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
9424
|
+
linha: interpretador.linhaDeclaracaoAtual,
|
|
9425
|
+
}, 'Parâmetro inválido. O vetor não pode estar vazio.'));
|
|
9426
|
+
}
|
|
9427
|
+
let maiorValor = valorVetor[0];
|
|
9428
|
+
try {
|
|
9429
|
+
for (let i = 1; i < valorVetor.length; i++) {
|
|
9430
|
+
const elementoAtual = valorVetor[i];
|
|
9431
|
+
if (compararElementosRecursivamente(elementoAtual, maiorValor) > 0) {
|
|
9432
|
+
maiorValor = elementoAtual;
|
|
9433
|
+
}
|
|
9434
|
+
}
|
|
9435
|
+
}
|
|
9436
|
+
catch (erro) {
|
|
9437
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
9438
|
+
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
9439
|
+
linha: interpretador.linhaDeclaracaoAtual,
|
|
9440
|
+
}, 'Não é possível comparar elementos de tipos diferentes dentro do vetor (ex: números com vetores).'));
|
|
9441
|
+
}
|
|
9442
|
+
return Promise.resolve(maiorValor);
|
|
9443
|
+
}
|
|
9444
|
+
/**
|
|
9445
|
+
* Encontra o menor número dentro de um vetor.
|
|
9446
|
+
* @param {InterpretadorInterface} interpretador A instância do interpretador.
|
|
9447
|
+
* @param {VariavelInterface | any} vetor Uma variável de Delégua ou um vetor nativo de JavaScript contendo números.
|
|
9448
|
+
* @returns {Promise<number>} O menor número encontrado no vetor.
|
|
9449
|
+
*/
|
|
9450
|
+
async function minimo(interpretador, vetor) {
|
|
9451
|
+
if (vetor === null || vetor === undefined) {
|
|
9452
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
9453
|
+
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
9454
|
+
linha: interpretador.linhaDeclaracaoAtual,
|
|
9455
|
+
}, 'Parâmetro inválido. O parâmetro da função minimo() não pode ser nulo.'));
|
|
9456
|
+
}
|
|
9457
|
+
const valorVetor = interpretador.resolverValor(vetor);
|
|
9458
|
+
if (!Array.isArray(valorVetor)) {
|
|
9459
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
9460
|
+
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
9461
|
+
linha: interpretador.linhaDeclaracaoAtual,
|
|
9462
|
+
}, 'Parâmetro inválido. O parâmetro da função minimo() deve ser um vetor.'));
|
|
9463
|
+
}
|
|
9464
|
+
if (valorVetor.length == 0) {
|
|
9465
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
9466
|
+
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
9467
|
+
linha: interpretador.linhaDeclaracaoAtual,
|
|
9468
|
+
}, 'Parâmetro inválido. O vetor não pode estar vazio.'));
|
|
9469
|
+
}
|
|
9470
|
+
let menorValor = valorVetor[0];
|
|
9471
|
+
try {
|
|
9472
|
+
for (let i = 1; i < valorVetor.length; i++) {
|
|
9473
|
+
const elementoAtual = valorVetor[i];
|
|
9474
|
+
if (compararElementosRecursivamente(elementoAtual, menorValor) < 0) {
|
|
9475
|
+
menorValor = elementoAtual;
|
|
9476
|
+
}
|
|
9477
|
+
}
|
|
9478
|
+
}
|
|
9479
|
+
catch (erro) {
|
|
9480
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
9481
|
+
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
9482
|
+
linha: interpretador.linhaDeclaracaoAtual,
|
|
9483
|
+
}, 'Não é possível comparar elementos de tipos diferentes dentro do vetor (ex: números com vetores).'));
|
|
9484
|
+
}
|
|
9485
|
+
return Promise.resolve(menorValor);
|
|
9486
|
+
}
|
|
9311
9487
|
/**
|
|
9312
9488
|
* Converte um valor em um número, com parte decimal ou não.
|
|
9313
9489
|
* @param {InterpretadorInterface} interpretador A instância do interpretador.
|
|
@@ -9483,6 +9659,40 @@ async function reduzir(interpretador, vetor, funcaoReducao, valorInicial = null)
|
|
|
9483
9659
|
}
|
|
9484
9660
|
return resultado;
|
|
9485
9661
|
}
|
|
9662
|
+
/**
|
|
9663
|
+
* Realiza a soma de todos os números dentro de um vetor.
|
|
9664
|
+
* @param {InterpretadorInterface} interpretador A instância do interpretador.
|
|
9665
|
+
* @param {VariavelInterface | any} vetor Uma variável de Pituguês ou um vetor nativo de JavaScript contendo números.
|
|
9666
|
+
* @returns {Promise<number>} A soma de todos os elementos do vetor.
|
|
9667
|
+
*/
|
|
9668
|
+
async function somar(interpretador, vetor) {
|
|
9669
|
+
if (vetor === null || vetor === undefined) {
|
|
9670
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
9671
|
+
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
9672
|
+
linha: interpretador.linhaDeclaracaoAtual,
|
|
9673
|
+
}, 'Parâmetro inválido. O parâmetro da função somar() não pode ser nulo.'));
|
|
9674
|
+
}
|
|
9675
|
+
const valorVetor = interpretador.resolverValor(vetor);
|
|
9676
|
+
if (!Array.isArray(valorVetor)) {
|
|
9677
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
9678
|
+
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
9679
|
+
linha: interpretador.linhaDeclaracaoAtual,
|
|
9680
|
+
}, 'Parâmetro inválido. O parâmetro da função somar() deve ser um vetor.'));
|
|
9681
|
+
}
|
|
9682
|
+
if (valorVetor.length === 0)
|
|
9683
|
+
return Promise.resolve(0);
|
|
9684
|
+
let somaDosElementos = 0;
|
|
9685
|
+
for (let elemento of valorVetor) {
|
|
9686
|
+
if (typeof elemento !== 'number' || isNaN(elemento)) {
|
|
9687
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
9688
|
+
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
9689
|
+
linha: interpretador.linhaDeclaracaoAtual,
|
|
9690
|
+
}, 'A função somar() aceita apenas vetores contendo números.'));
|
|
9691
|
+
}
|
|
9692
|
+
somaDosElementos += elemento;
|
|
9693
|
+
}
|
|
9694
|
+
return Promise.resolve(somaDosElementos);
|
|
9695
|
+
}
|
|
9486
9696
|
/**
|
|
9487
9697
|
*
|
|
9488
9698
|
* @param objeto
|
|
@@ -9635,10 +9845,10 @@ exports.default = {
|
|
|
9635
9845
|
paraVetor: {
|
|
9636
9846
|
tipoRetorno: 'vetor',
|
|
9637
9847
|
argumentos: [],
|
|
9638
|
-
implementacao: (interpretador,
|
|
9848
|
+
implementacao: (interpretador, tupla) => {
|
|
9639
9849
|
const objetoTupla = interpretador.resolverValor(tupla);
|
|
9640
9850
|
if (!(objetoTupla instanceof construtos_1.TuplaN)) {
|
|
9641
|
-
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(null, `A função "
|
|
9851
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(null, `A função "paraVetor" só pode ser chamada em tuplas.`, interpretador.linhaDeclaracaoAtual));
|
|
9642
9852
|
}
|
|
9643
9853
|
const valoresPuros = objetoTupla.elementos.map(elemento => interpretador.resolverValor(elemento));
|
|
9644
9854
|
return Promise.resolve(valoresPuros);
|
|
@@ -9661,7 +9871,7 @@ const contemComum = (nome) => {
|
|
|
9661
9871
|
argumentos: [
|
|
9662
9872
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('chave', 'qualquer', true, [], 'O elemento como chave do dicionário.'),
|
|
9663
9873
|
],
|
|
9664
|
-
implementacao: (interpretador,
|
|
9874
|
+
implementacao: (interpretador, valor, chave) => Promise.resolve(chave in valor),
|
|
9665
9875
|
assinaturaFormato: `dicionário.${nome}(chave: qualquer)`,
|
|
9666
9876
|
documentacao: `# \`dicionário.${nome}(chave)\`\n\n` +
|
|
9667
9877
|
'Retorna verdadeiro se o elemento passado como parâmetro existe como chave do dicionário. Devolve falso em caso contrário.\n' +
|
|
@@ -9678,7 +9888,7 @@ exports.default = {
|
|
|
9678
9888
|
chaves: {
|
|
9679
9889
|
tipoRetorno: 'texto[]',
|
|
9680
9890
|
argumentos: [],
|
|
9681
|
-
implementacao: (interpretador,
|
|
9891
|
+
implementacao: (interpretador, valor) => {
|
|
9682
9892
|
return Promise.resolve(Object.keys(valor));
|
|
9683
9893
|
},
|
|
9684
9894
|
assinaturaFormato: 'dicionário.chaves()',
|
|
@@ -9696,7 +9906,7 @@ exports.default = {
|
|
|
9696
9906
|
itens: {
|
|
9697
9907
|
tipoRetorno: 'Dupla[]',
|
|
9698
9908
|
argumentos: [],
|
|
9699
|
-
implementacao: (interpretador,
|
|
9909
|
+
implementacao: (interpretador, valor) => {
|
|
9700
9910
|
const hashArquivo = interpretador.hashArquivoDeclaracaoAtual;
|
|
9701
9911
|
const linha = interpretador.linhaDeclaracaoAtual;
|
|
9702
9912
|
const pares = Object.entries(valor).map(([chave, valor]) => {
|
|
@@ -9720,13 +9930,13 @@ exports.default = {
|
|
|
9720
9930
|
remover: {
|
|
9721
9931
|
tipoRetorno: 'lógico',
|
|
9722
9932
|
argumentos: [new informacao_elemento_sintatico_1.InformacaoElementoSintatico('chave', 'texto')],
|
|
9723
|
-
implementacao: (interpretador,
|
|
9933
|
+
implementacao: (interpretador, valor, chave) => Promise.resolve(delete valor[chave]),
|
|
9724
9934
|
assinaturaFormato: `dicionário.remover(chave: qualquer)`,
|
|
9725
9935
|
},
|
|
9726
9936
|
valores: {
|
|
9727
9937
|
tipoRetorno: '<T>[]',
|
|
9728
9938
|
argumentos: [],
|
|
9729
|
-
implementacao: (interpretador,
|
|
9939
|
+
implementacao: (interpretador, valor) => {
|
|
9730
9940
|
return Promise.resolve(Object.values(valor));
|
|
9731
9941
|
},
|
|
9732
9942
|
}
|
|
@@ -9740,7 +9950,7 @@ exports.default = {
|
|
|
9740
9950
|
absoluto: {
|
|
9741
9951
|
tipoRetorno: 'número',
|
|
9742
9952
|
argumentos: [],
|
|
9743
|
-
implementacao: (interpretador,
|
|
9953
|
+
implementacao: (interpretador, valor) => {
|
|
9744
9954
|
return Promise.resolve(Math.abs(valor));
|
|
9745
9955
|
},
|
|
9746
9956
|
assinaturaFormato: 'número.absoluto()',
|
|
@@ -9756,7 +9966,7 @@ exports.default = {
|
|
|
9756
9966
|
arredondarParaBaixo: {
|
|
9757
9967
|
tipoRetorno: 'número',
|
|
9758
9968
|
argumentos: [],
|
|
9759
|
-
implementacao: (interpretador,
|
|
9969
|
+
implementacao: (interpretador, valor) => {
|
|
9760
9970
|
return Promise.resolve(Math.floor(valor));
|
|
9761
9971
|
},
|
|
9762
9972
|
assinaturaFormato: 'número.arredondarParaBaixo()',
|
|
@@ -9772,7 +9982,7 @@ exports.default = {
|
|
|
9772
9982
|
arredondarParaCima: {
|
|
9773
9983
|
tipoRetorno: 'número',
|
|
9774
9984
|
argumentos: [],
|
|
9775
|
-
implementacao: (interpretador,
|
|
9985
|
+
implementacao: (interpretador, valor) => {
|
|
9776
9986
|
return Promise.resolve(Math.ceil(valor));
|
|
9777
9987
|
},
|
|
9778
9988
|
assinaturaFormato: 'número.arredondarParaCima()',
|
|
@@ -9790,7 +10000,7 @@ exports.default = {
|
|
|
9790
10000
|
argumentos: [
|
|
9791
10001
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('opcoesFormatacao', 'dicionário', false, [], 'Dicionário com opções de formatação, como número de casas decimais.'),
|
|
9792
10002
|
],
|
|
9793
|
-
implementacao: (interpretador,
|
|
10003
|
+
implementacao: (interpretador, valor, opcoes) => {
|
|
9794
10004
|
let minimoCasasDecimais = 2;
|
|
9795
10005
|
if (opcoes && opcoes.casasDecimais !== undefined) {
|
|
9796
10006
|
minimoCasasDecimais = opcoes.casasDecimais;
|
|
@@ -9824,15 +10034,15 @@ exports.implementacaoParticao = void 0;
|
|
|
9824
10034
|
const informacao_elemento_sintatico_1 = require("../informacao-elemento-sintatico");
|
|
9825
10035
|
const construtos_1 = require("../construtos");
|
|
9826
10036
|
const excecoes_1 = require("../excecoes");
|
|
9827
|
-
const implementacaoParticao = (interpretador,
|
|
10037
|
+
const implementacaoParticao = (interpretador, texto, separador, ...args) => {
|
|
9828
10038
|
if (args.length > 0) {
|
|
9829
|
-
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(null, `A função "
|
|
10039
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(null, `A função "partição" aceita apenas um argumento.`, interpretador.linhaDeclaracaoAtual));
|
|
9830
10040
|
}
|
|
9831
10041
|
if (typeof texto !== 'string') {
|
|
9832
|
-
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(null, `A função "
|
|
10042
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(null, `A função "partição" só pode ser chamada em textos.`, interpretador.linhaDeclaracaoAtual));
|
|
9833
10043
|
}
|
|
9834
10044
|
if (separador === undefined) {
|
|
9835
|
-
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(null, `A função "
|
|
10045
|
+
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(null, `A função "partição" requer um argumento separador.`, interpretador.linhaDeclaracaoAtual));
|
|
9836
10046
|
}
|
|
9837
10047
|
if (typeof separador !== 'string') {
|
|
9838
10048
|
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(null, 'O separador deve ser do tipo texto.', interpretador.linhaDeclaracaoAtual));
|
|
@@ -9859,7 +10069,7 @@ exports.default = {
|
|
|
9859
10069
|
aparar: {
|
|
9860
10070
|
tipoRetorno: 'texto',
|
|
9861
10071
|
argumentos: [],
|
|
9862
|
-
implementacao: (interpretador,
|
|
10072
|
+
implementacao: (interpretador, texto) => Promise.resolve(texto.trim()),
|
|
9863
10073
|
assinaturaFormato: 'texto.aparar()',
|
|
9864
10074
|
documentacao: '# `texto.aparar()` \n \n' +
|
|
9865
10075
|
'Remove espaços em branco no início e no fim de um texto.' +
|
|
@@ -9872,7 +10082,7 @@ exports.default = {
|
|
|
9872
10082
|
apararFim: {
|
|
9873
10083
|
tipoRetorno: 'texto',
|
|
9874
10084
|
argumentos: [],
|
|
9875
|
-
implementacao: (interpretador,
|
|
10085
|
+
implementacao: (interpretador, texto) => Promise.resolve(texto.trimEnd()),
|
|
9876
10086
|
assinaturaFormato: 'texto.apararFim()',
|
|
9877
10087
|
documentacao: '# `texto.apararFim()` \n \n' +
|
|
9878
10088
|
'Remove espaços em branco no no fim de um texto.' +
|
|
@@ -9885,7 +10095,7 @@ exports.default = {
|
|
|
9885
10095
|
apararInicio: {
|
|
9886
10096
|
tipoRetorno: 'texto',
|
|
9887
10097
|
argumentos: [],
|
|
9888
|
-
implementacao: (interpretador,
|
|
10098
|
+
implementacao: (interpretador, texto) => Promise.resolve(texto.trimStart()),
|
|
9889
10099
|
assinaturaFormato: 'texto.apararInicio()',
|
|
9890
10100
|
documentacao: '# `texto.apararInicio()` \n \n' +
|
|
9891
10101
|
'Remover espaços em branco no início e no fim de um texto.' +
|
|
@@ -9900,7 +10110,7 @@ exports.default = {
|
|
|
9900
10110
|
argumentos: [
|
|
9901
10111
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('outroTexto', 'texto', true, [], 'O texto a ser concatenado.'),
|
|
9902
10112
|
],
|
|
9903
|
-
implementacao: (interpretador,
|
|
10113
|
+
implementacao: (interpretador, ...textos) => Promise.resolve(''.concat(...textos)),
|
|
9904
10114
|
assinaturaFormato: 'texto.concatenar(...outroTexto: texto)',
|
|
9905
10115
|
documentacao: '# `texto.concatenar(outroTexto)` \n \n' +
|
|
9906
10116
|
'Realiza a junção de palavras/textos.' +
|
|
@@ -9917,7 +10127,7 @@ exports.default = {
|
|
|
9917
10127
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('delimitador', 'texto', true, [], 'O delimitador usado para dividir o texto.'),
|
|
9918
10128
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('limite', 'número', false, [], '(Opcional) Número limite de elementos a serem retornados.'),
|
|
9919
10129
|
],
|
|
9920
|
-
implementacao: (interpretador,
|
|
10130
|
+
implementacao: (interpretador, texto, divisor, limite) => {
|
|
9921
10131
|
if (limite) {
|
|
9922
10132
|
return Promise.resolve(texto.split(divisor, limite));
|
|
9923
10133
|
}
|
|
@@ -9938,7 +10148,7 @@ exports.default = {
|
|
|
9938
10148
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('subtexto', 'texto', true, [], 'O texto que deve ser buscado.'),
|
|
9939
10149
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('indiceInicio', 'número', false, [], '(Opcional) O índice opcional para iniciar a busca.'),
|
|
9940
10150
|
],
|
|
9941
|
-
implementacao: (interpretador,
|
|
10151
|
+
implementacao: (interpretador, texto, subtexto, indiceInicio) => {
|
|
9942
10152
|
if (indiceInicio !== undefined) {
|
|
9943
10153
|
return Promise.resolve(texto.indexOf(subtexto, indiceInicio));
|
|
9944
10154
|
}
|
|
@@ -9961,7 +10171,7 @@ exports.default = {
|
|
|
9961
10171
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('inicio', 'número', true, [], 'A posição inicial da fatia.'),
|
|
9962
10172
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('fim', 'número', false, [], '(Opcional) A posição final da fatia. Se não fornecido, seleciona até o final do texto.'),
|
|
9963
10173
|
],
|
|
9964
|
-
implementacao: (interpretador,
|
|
10174
|
+
implementacao: (interpretador, texto, inicio, fim) => Promise.resolve(texto.slice(inicio, fim)),
|
|
9965
10175
|
assinaturaFormato: 'texto.fatiar(inicio: número, fim?: número)',
|
|
9966
10176
|
documentacao: '# `texto.fatiar(inicio)` \n \n' +
|
|
9967
10177
|
'Extrai uma fatia do texto, dadas posições de início e fim.' +
|
|
@@ -9979,7 +10189,7 @@ exports.default = {
|
|
|
9979
10189
|
argumentos: [
|
|
9980
10190
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('elemento', 'texto', true, [], 'O elemento a ser verificado se está contido no texto.'),
|
|
9981
10191
|
],
|
|
9982
|
-
implementacao: (interpretador,
|
|
10192
|
+
implementacao: (interpretador, texto, elemento) => Promise.resolve(texto.includes(elemento)),
|
|
9983
10193
|
assinaturaFormato: 'inclui(elemento: texto)',
|
|
9984
10194
|
documentacao: '# `texto.inclui(elemento)` \n \n' +
|
|
9985
10195
|
'Devolve verdadeiro se elemento passado por parâmetro está contido no texto, e falso em caso contrário.' +
|
|
@@ -9993,7 +10203,7 @@ exports.default = {
|
|
|
9993
10203
|
inverter: {
|
|
9994
10204
|
tipoRetorno: 'texto',
|
|
9995
10205
|
argumentos: [],
|
|
9996
|
-
implementacao: (interpretador,
|
|
10206
|
+
implementacao: (interpretador, texto) => Promise.resolve(texto.split('').reduce((texto, caracter) => (texto = caracter + texto), '')),
|
|
9997
10207
|
assinaturaFormato: 'texto.inverter()',
|
|
9998
10208
|
documentacao: '# `texto.inverter()` \n \n' +
|
|
9999
10209
|
'Inverte as letras de um texto.' +
|
|
@@ -10006,7 +10216,7 @@ exports.default = {
|
|
|
10006
10216
|
maiusculo: {
|
|
10007
10217
|
tipoRetorno: 'texto',
|
|
10008
10218
|
argumentos: [],
|
|
10009
|
-
implementacao: (interpretador,
|
|
10219
|
+
implementacao: (interpretador, texto) => Promise.resolve(texto.toUpperCase()),
|
|
10010
10220
|
assinaturaFormato: 'texto.maiusculo()',
|
|
10011
10221
|
documentacao: '# `texto.maiusculo()` \n \n' +
|
|
10012
10222
|
'Converte todos os caracteres alfabéticos para suas respectivas formas em maiúsculo.' +
|
|
@@ -10019,7 +10229,7 @@ exports.default = {
|
|
|
10019
10229
|
minusculo: {
|
|
10020
10230
|
tipoRetorno: 'texto',
|
|
10021
10231
|
argumentos: [],
|
|
10022
|
-
implementacao: (interpretador,
|
|
10232
|
+
implementacao: (interpretador, texto) => Promise.resolve(texto.toLowerCase()),
|
|
10023
10233
|
assinaturaFormato: 'texto.minusculo()',
|
|
10024
10234
|
documentacao: '# `texto.minusculo()` \n \n' +
|
|
10025
10235
|
'Converte todos os caracteres alfabéticos para suas respectivas formas em minúsculo.' +
|
|
@@ -10059,7 +10269,7 @@ exports.default = {
|
|
|
10059
10269
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('textoASerSubstituido', 'texto', true, [], 'Texto a ser substituído.'),
|
|
10060
10270
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('substituto', 'texto', true, [], 'A substituição'),
|
|
10061
10271
|
],
|
|
10062
|
-
implementacao: (interpretador,
|
|
10272
|
+
implementacao: (interpretador, texto, elemento, substituto) => Promise.resolve(texto.replace(elemento, substituto)),
|
|
10063
10273
|
assinaturaFormato: 'texto.substituir(textoASerSubstituido: texto, substituto: texto)',
|
|
10064
10274
|
documentacao: '# `texto.substituir(textoASerSubstituido, substituto)` \n \n' +
|
|
10065
10275
|
'Substitui a primeira ocorrência no texto do primeiro parâmetro pelo segundo parâmetro.' +
|
|
@@ -10075,7 +10285,7 @@ exports.default = {
|
|
|
10075
10285
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('inicio', 'inteiro', true, [], 'A posição de início do texto a ser extraído.'),
|
|
10076
10286
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('fim', 'inteiro', true, [], 'A posição de fim do texto a ser extraído.'),
|
|
10077
10287
|
],
|
|
10078
|
-
implementacao: (interpretador,
|
|
10288
|
+
implementacao: (interpretador, texto, inicio, fim) => Promise.resolve(texto.slice(inicio, fim)),
|
|
10079
10289
|
assinaturaFormato: 'texto.subtexto(inicio: inteiro, fim: inteiro)',
|
|
10080
10290
|
documentacao: '# `texto.subtexto(inicio, fim)` \n\n' +
|
|
10081
10291
|
'Extrai uma fatia do texto, dadas posições de início e fim.' +
|
|
@@ -10088,7 +10298,7 @@ exports.default = {
|
|
|
10088
10298
|
tamanho: {
|
|
10089
10299
|
tipoRetorno: 'inteiro',
|
|
10090
10300
|
argumentos: [],
|
|
10091
|
-
implementacao: (interpretador,
|
|
10301
|
+
implementacao: (interpretador, texto) => Promise.resolve(texto.length),
|
|
10092
10302
|
assinaturaFormato: 'texto.tamanho()',
|
|
10093
10303
|
documentacao: '# `texto.tamanho()` \n\n' +
|
|
10094
10304
|
'Devolve um número inteiro com o número de caracteres do texto.' +
|
|
@@ -10103,7 +10313,7 @@ exports.default = {
|
|
|
10103
10313
|
argumentos: [
|
|
10104
10314
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('sufixo', 'texto', true, [], 'O sufixo a ser verificado no final do texto.'),
|
|
10105
10315
|
],
|
|
10106
|
-
implementacao: (interpretador,
|
|
10316
|
+
implementacao: (interpretador, texto, sufixo) => Promise.resolve(texto.endsWith(sufixo)),
|
|
10107
10317
|
assinaturaFormato: 'texto.terminaCom(sufixo: texto)',
|
|
10108
10318
|
documentacao: '# `texto.terminaCom(sufixo)` \n \n' +
|
|
10109
10319
|
'Verifica se um texto termina com o sufixo especificado e retorna um valor lógico (verdadeiro ou falso).' +
|
|
@@ -10118,7 +10328,7 @@ exports.default = {
|
|
|
10118
10328
|
tudoMaiusculo: {
|
|
10119
10329
|
tipoRetorno: 'lógico',
|
|
10120
10330
|
argumentos: [],
|
|
10121
|
-
implementacao: (interpretador,
|
|
10331
|
+
implementacao: (interpretador, texto) => Promise.resolve(texto === texto.toUpperCase()),
|
|
10122
10332
|
assinaturaFormato: 'texto.tudoMaiusculo()',
|
|
10123
10333
|
documentacao: '# `texto.tudoMaiusculo()` \n\n' +
|
|
10124
10334
|
'Devolve verdadeiro se todos os caracteres alfabéticos do texto estão em maiúsculo, e falso em caso contrário.' +
|
|
@@ -10133,7 +10343,7 @@ exports.default = {
|
|
|
10133
10343
|
tudoMinusculo: {
|
|
10134
10344
|
tipoRetorno: 'lógico',
|
|
10135
10345
|
argumentos: [],
|
|
10136
|
-
implementacao: (interpretador,
|
|
10346
|
+
implementacao: (interpretador, texto) => Promise.resolve(texto === texto.toLowerCase()),
|
|
10137
10347
|
assinaturaFormato: 'texto.tudoMinusculo()',
|
|
10138
10348
|
documentacao: '# `texto.tudoMinusculo()` \n\n' +
|
|
10139
10349
|
'Devolve verdadeiro se todos os caracteres alfabéticos do texto estão em minúsculo, e falso em caso contrário.' +
|
|
@@ -10171,12 +10381,8 @@ exports.default = {
|
|
|
10171
10381
|
argumentos: [
|
|
10172
10382
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('elemento', 'qualquer', true, [], 'Os elementos a serem adicionados ao vetor.'),
|
|
10173
10383
|
],
|
|
10174
|
-
implementacao: (interpretador,
|
|
10384
|
+
implementacao: (interpretador, vetor, elemento) => {
|
|
10175
10385
|
vetor.push(elemento);
|
|
10176
|
-
// TODO: Será que apenas isso é suficiente aqui?
|
|
10177
|
-
if (nomePrimitiva !== '') {
|
|
10178
|
-
interpretador.pilhaEscoposExecucao.atribuirVariavel({ lexema: nomePrimitiva }, vetor);
|
|
10179
|
-
}
|
|
10180
10386
|
return Promise.resolve(vetor);
|
|
10181
10387
|
},
|
|
10182
10388
|
assinaturaFormato: 'vetor.adicionar(...elemento: qualquer)',
|
|
@@ -10195,7 +10401,7 @@ exports.default = {
|
|
|
10195
10401
|
argumentos: [
|
|
10196
10402
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('outroVetor', 'qualquer[]', true, [], 'O outro vetorm ou outros vetores, a serem concatenados a este vetor.'),
|
|
10197
10403
|
],
|
|
10198
|
-
implementacao: (interpretador,
|
|
10404
|
+
implementacao: (interpretador, vetor, outroVetor) => {
|
|
10199
10405
|
return Promise.resolve(vetor.concat(outroVetor));
|
|
10200
10406
|
},
|
|
10201
10407
|
assinaturaFormato: 'vetor.concatenar(...outroVetor: qualquer[])',
|
|
@@ -10210,7 +10416,7 @@ exports.default = {
|
|
|
10210
10416
|
empilhar: {
|
|
10211
10417
|
tipoRetorno: 'qualquer[]',
|
|
10212
10418
|
argumentos: [new informacao_elemento_sintatico_1.InformacaoElementoSintatico('elemento', 'qualquer', true, [], '')],
|
|
10213
|
-
implementacao: (interpretador,
|
|
10419
|
+
implementacao: (interpretador, vetor, elemento) => {
|
|
10214
10420
|
vetor.push(elemento);
|
|
10215
10421
|
return Promise.resolve(vetor);
|
|
10216
10422
|
},
|
|
@@ -10233,25 +10439,19 @@ exports.default = {
|
|
|
10233
10439
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('excluirQuantidade', 'número'),
|
|
10234
10440
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('itens', 'qualquer[]'),
|
|
10235
10441
|
],
|
|
10236
|
-
implementacao: (interpretador,
|
|
10442
|
+
implementacao: (interpretador, vetor, posicaoInicial, quantidadeExclusao, ...itens) => {
|
|
10237
10443
|
let elementos = [];
|
|
10238
10444
|
if (quantidadeExclusao || quantidadeExclusao === 0) {
|
|
10239
10445
|
elementos = !itens.length
|
|
10240
10446
|
? vetor.splice(posicaoInicial, quantidadeExclusao)
|
|
10241
10447
|
: vetor.splice(posicaoInicial, quantidadeExclusao, ...itens);
|
|
10242
|
-
if (nomePrimitiva !== '') {
|
|
10243
|
-
interpretador.pilhaEscoposExecucao.atribuirVariavel({ lexema: nomePrimitiva }, vetor);
|
|
10244
|
-
}
|
|
10245
10448
|
return Promise.resolve(elementos);
|
|
10246
10449
|
}
|
|
10247
10450
|
else {
|
|
10248
10451
|
elementos = !itens.length
|
|
10249
10452
|
? vetor.splice(posicaoInicial)
|
|
10250
10453
|
: vetor.splice(posicaoInicial, ...itens);
|
|
10251
|
-
|
|
10252
|
-
interpretador.pilhaEscoposExecucao.atribuirVariavel({ lexema: nomePrimitiva }, elementos);
|
|
10253
|
-
}
|
|
10254
|
-
return Promise.resolve(vetor);
|
|
10454
|
+
return Promise.resolve(elementos);
|
|
10255
10455
|
}
|
|
10256
10456
|
},
|
|
10257
10457
|
assinaturaFormato: 'vetor.encaixar(posicaoInicial?: número, quantidadeExclusao?: número, itens?: qualquer[])',
|
|
@@ -10281,7 +10481,7 @@ exports.default = {
|
|
|
10281
10481
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('inicio', 'número', false, [], 'A posição de início do vetor a ser fatiado. Se não fornecido, retorna o vetor inteiro.'),
|
|
10282
10482
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('fim', 'número', false, [], 'A posição de fim do vetor a ser fatiado.'),
|
|
10283
10483
|
],
|
|
10284
|
-
implementacao: (interpretador,
|
|
10484
|
+
implementacao: (interpretador, vetor, inicio, fim) => Promise.resolve(vetor.slice(inicio, fim)),
|
|
10285
10485
|
assinaturaFormato: 'vetor.fatiar(inicio?: número, fim?: número)',
|
|
10286
10486
|
documentacao: '# `vetor.fatiar(inicio, fim)` \n \n' +
|
|
10287
10487
|
'Extrai uma fatia do vetor, dadas posições de início e fim. \n' +
|
|
@@ -10300,7 +10500,7 @@ exports.default = {
|
|
|
10300
10500
|
argumentos: [
|
|
10301
10501
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('funcao', 'função', true, [], 'A função de filtragem.'),
|
|
10302
10502
|
],
|
|
10303
|
-
implementacao: async (interpretador,
|
|
10503
|
+
implementacao: async (interpretador, vetor, funcao) => {
|
|
10304
10504
|
if (funcao === undefined || funcao === null) {
|
|
10305
10505
|
return Promise.reject("É necessário passar uma função para o método 'filtrarPor'");
|
|
10306
10506
|
}
|
|
@@ -10329,7 +10529,7 @@ exports.default = {
|
|
|
10329
10529
|
argumentos: [
|
|
10330
10530
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('elemento', 'qualquer', true, [], 'O elemento a ser verificado se está presente no vetor.'),
|
|
10331
10531
|
],
|
|
10332
|
-
implementacao: (interpretador,
|
|
10532
|
+
implementacao: (interpretador, vetor, elemento) => Promise.resolve(vetor.includes(elemento)),
|
|
10333
10533
|
assinaturaFormato: 'vetor.inclui(elemento: qualquer)',
|
|
10334
10534
|
documentacao: '# `vetor.inclui(elemento)` \n \n' +
|
|
10335
10535
|
'Verifica se o elemento existe no vetor. Devolve `verdadeiro` se existe, e `falso` em caso contrário.\n' +
|
|
@@ -10343,7 +10543,7 @@ exports.default = {
|
|
|
10343
10543
|
inverter: {
|
|
10344
10544
|
tipoRetorno: 'qualquer[]',
|
|
10345
10545
|
argumentos: [],
|
|
10346
|
-
implementacao: (interpretador,
|
|
10546
|
+
implementacao: (interpretador, vetor) => Promise.resolve(vetor.reverse()),
|
|
10347
10547
|
assinaturaFormato: 'vetor.inverter()',
|
|
10348
10548
|
documentacao: '# `vetor.inverter()` \n \n' +
|
|
10349
10549
|
'Inverte a ordem dos elementos de um vetor.\n' +
|
|
@@ -10358,7 +10558,7 @@ exports.default = {
|
|
|
10358
10558
|
argumentos: [
|
|
10359
10559
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('separador', 'texto', true, [], 'O separador entre elementos do vetor para o texto.'),
|
|
10360
10560
|
],
|
|
10361
|
-
implementacao: (interpretador,
|
|
10561
|
+
implementacao: (interpretador, vetor, separador) => Promise.resolve(vetor.join(separador)),
|
|
10362
10562
|
assinaturaFormato: 'vetor.juntar(separador: texto)',
|
|
10363
10563
|
documentacao: '# `vetor.juntar(separador = ",")` \n \n' +
|
|
10364
10564
|
'Junta todos os elementos de um vetor em um texto, separando cada elemento pelo separador passado como parâmetro.\n' +
|
|
@@ -10373,14 +10573,14 @@ exports.default = {
|
|
|
10373
10573
|
argumentos: [
|
|
10374
10574
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('funcao', 'função', true, [], 'A função que transforma cada elemento de um vetor em outro elemento a ser retornado em um novo vetor.'),
|
|
10375
10575
|
],
|
|
10376
|
-
implementacao: async (interpretador,
|
|
10576
|
+
implementacao: async (interpretador, vetor, funcao) => {
|
|
10377
10577
|
if (funcao === undefined || funcao === null) {
|
|
10378
10578
|
return Promise.reject("É necessário passar uma função para o método 'mapear'");
|
|
10379
10579
|
}
|
|
10380
10580
|
const retorno = [];
|
|
10381
10581
|
for (let elemento of vetor) {
|
|
10382
10582
|
let resultado = await funcao.chamar(interpretador, [elemento]);
|
|
10383
|
-
retorno.push(resultado);
|
|
10583
|
+
retorno.push(interpretador.resolverValor(resultado));
|
|
10384
10584
|
}
|
|
10385
10585
|
return retorno;
|
|
10386
10586
|
},
|
|
@@ -10400,7 +10600,7 @@ exports.default = {
|
|
|
10400
10600
|
argumentos: [
|
|
10401
10601
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('funcaoOrdenacao', 'função', false, [], '(Opcional) Função para guiar a ordenação.'),
|
|
10402
10602
|
],
|
|
10403
|
-
implementacao: async (interpretador,
|
|
10603
|
+
implementacao: async (interpretador, vetor, funcaoOrdenacao) => {
|
|
10404
10604
|
if (funcaoOrdenacao !== undefined && funcaoOrdenacao !== null) {
|
|
10405
10605
|
for (let i = 0; i < vetor.length - 1; i++) {
|
|
10406
10606
|
for (let j = 1; j < vetor.length; j++) {
|
|
@@ -10416,11 +10616,6 @@ exports.default = {
|
|
|
10416
10616
|
}
|
|
10417
10617
|
}
|
|
10418
10618
|
}
|
|
10419
|
-
if (nomePrimitiva !== '') {
|
|
10420
|
-
interpretador.pilhaEscoposExecucao.atribuirVariavel({
|
|
10421
|
-
lexema: nomePrimitiva,
|
|
10422
|
-
}, vetor);
|
|
10423
|
-
}
|
|
10424
10619
|
return vetor;
|
|
10425
10620
|
}
|
|
10426
10621
|
if (!vetor.every((v) => typeof v === 'number')) {
|
|
@@ -10429,11 +10624,6 @@ exports.default = {
|
|
|
10429
10624
|
else {
|
|
10430
10625
|
vetor.sort((a, b) => a - b);
|
|
10431
10626
|
}
|
|
10432
|
-
if (nomePrimitiva !== '') {
|
|
10433
|
-
interpretador.pilhaEscoposExecucao.atribuirVariavel({
|
|
10434
|
-
lexema: nomePrimitiva,
|
|
10435
|
-
}, vetor);
|
|
10436
|
-
}
|
|
10437
10627
|
return vetor;
|
|
10438
10628
|
},
|
|
10439
10629
|
assinaturaFormato: 'vetor.ordenar()',
|
|
@@ -10452,7 +10642,7 @@ exports.default = {
|
|
|
10452
10642
|
paraTupla: {
|
|
10453
10643
|
tipoRetorno: 'tupla',
|
|
10454
10644
|
argumentos: [],
|
|
10455
|
-
implementacao: (interpretador,
|
|
10645
|
+
implementacao: (interpretador, vetor) => {
|
|
10456
10646
|
if (vetor.length < 2) {
|
|
10457
10647
|
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
10458
10648
|
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
@@ -10478,7 +10668,7 @@ exports.default = {
|
|
|
10478
10668
|
argumentos: [
|
|
10479
10669
|
new informacao_elemento_sintatico_1.InformacaoElementoSintatico('elemento', 'qualquer', true, [], 'O elemento a ser removido do vetor.'),
|
|
10480
10670
|
],
|
|
10481
|
-
implementacao: (interpretador,
|
|
10671
|
+
implementacao: (interpretador, vetor, elemento) => {
|
|
10482
10672
|
const index = vetor.indexOf(elemento);
|
|
10483
10673
|
if (index !== -1)
|
|
10484
10674
|
vetor.splice(index, 1);
|
|
@@ -10497,7 +10687,7 @@ exports.default = {
|
|
|
10497
10687
|
removerPrimeiro: {
|
|
10498
10688
|
tipoRetorno: 'qualquer',
|
|
10499
10689
|
argumentos: [],
|
|
10500
|
-
implementacao: (interpretador,
|
|
10690
|
+
implementacao: (interpretador, vetor) => {
|
|
10501
10691
|
let elemento = vetor.shift();
|
|
10502
10692
|
return Promise.resolve(elemento);
|
|
10503
10693
|
},
|
|
@@ -10515,7 +10705,7 @@ exports.default = {
|
|
|
10515
10705
|
removerUltimo: {
|
|
10516
10706
|
tipoRetorno: 'qualquer',
|
|
10517
10707
|
argumentos: [],
|
|
10518
|
-
implementacao: (interpretador,
|
|
10708
|
+
implementacao: (interpretador, vetor) => {
|
|
10519
10709
|
let elemento = vetor.pop();
|
|
10520
10710
|
return Promise.resolve(elemento);
|
|
10521
10711
|
},
|
|
@@ -10533,7 +10723,7 @@ exports.default = {
|
|
|
10533
10723
|
somar: {
|
|
10534
10724
|
tipoRetorno: 'qualquer',
|
|
10535
10725
|
argumentos: [],
|
|
10536
|
-
implementacao: (interpretador,
|
|
10726
|
+
implementacao: (interpretador, vetor) => {
|
|
10537
10727
|
return Promise.resolve(vetor.reduce((acc, item) => acc + (typeof item === 'number' ? item : item.valor), 0));
|
|
10538
10728
|
},
|
|
10539
10729
|
assinaturaFormato: 'vetor.somar()',
|
|
@@ -10548,7 +10738,7 @@ exports.default = {
|
|
|
10548
10738
|
tamanho: {
|
|
10549
10739
|
tipoRetorno: 'número',
|
|
10550
10740
|
argumentos: [],
|
|
10551
|
-
implementacao: (interpretador,
|
|
10741
|
+
implementacao: (interpretador, vetor) => Promise.resolve(vetor.length),
|
|
10552
10742
|
assinaturaFormato: 'vetor.tamanho()',
|
|
10553
10743
|
documentacao: '# `vetor.tamanho()` \n \n' +
|
|
10554
10744
|
'Retorna o número de elementos que compõem o vetor.\n' +
|
|
@@ -12290,6 +12480,9 @@ class Ajuda extends declaracao_1.Declaracao {
|
|
|
12290
12480
|
this.elemento = elemento;
|
|
12291
12481
|
this.funcao = funcao;
|
|
12292
12482
|
}
|
|
12483
|
+
async aceitar(visitante) {
|
|
12484
|
+
return await visitante.visitarDeclaracaoAjuda(this);
|
|
12485
|
+
}
|
|
12293
12486
|
paraTexto() {
|
|
12294
12487
|
let retorno = `<ajuda `;
|
|
12295
12488
|
if (this.elemento) {
|
|
@@ -14457,11 +14650,13 @@ const construtos_1 = require("../construtos");
|
|
|
14457
14650
|
const declaracoes_1 = require("../declaracoes");
|
|
14458
14651
|
const pitugues_1 = __importDefault(require("../tipos-de-simbolos/pitugues"));
|
|
14459
14652
|
class FormatadorPitugues {
|
|
14460
|
-
constructor() {
|
|
14653
|
+
constructor(quebraLinha, tamanhoIndentacao = 4) {
|
|
14461
14654
|
this.nívelIndentação = 0;
|
|
14462
14655
|
this.tamanhoIndentação = 4;
|
|
14463
14656
|
this.códigoFormatado = '';
|
|
14464
14657
|
this.quebraLinha = '\n';
|
|
14658
|
+
this.quebraLinha = quebraLinha;
|
|
14659
|
+
this.tamanhoIndentação = tamanhoIndentacao;
|
|
14465
14660
|
}
|
|
14466
14661
|
indentar() {
|
|
14467
14662
|
return ' '.repeat(this.nívelIndentação);
|
|
@@ -15320,6 +15515,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
15320
15515
|
})();
|
|
15321
15516
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15322
15517
|
exports.carregarBibliotecasGlobais = carregarBibliotecasGlobais;
|
|
15518
|
+
exports.pontoEntradaAjuda = pontoEntradaAjuda;
|
|
15323
15519
|
exports.obterTopicoAjuda = obterTopicoAjuda;
|
|
15324
15520
|
const funcao_padrao_1 = require("./estruturas/funcao-padrao");
|
|
15325
15521
|
const bibliotecaGlobal = __importStar(require("../bibliotecas/biblioteca-global"));
|
|
@@ -15338,6 +15534,8 @@ function carregarBibliotecasGlobais(pilhaEscoposExecucao) {
|
|
|
15338
15534
|
pilhaEscoposExecucao.definirVariavel('inteiro', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.inteiro));
|
|
15339
15535
|
pilhaEscoposExecucao.definirVariavel('intervalo', new funcao_padrao_1.FuncaoPadrao(2, bibliotecaGlobal.intervalo));
|
|
15340
15536
|
pilhaEscoposExecucao.definirVariavel('mapear', new funcao_padrao_1.FuncaoPadrao(2, bibliotecaGlobal.mapear));
|
|
15537
|
+
pilhaEscoposExecucao.definirVariavel('maximo', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.maximo));
|
|
15538
|
+
pilhaEscoposExecucao.definirVariavel('minimo', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.minimo));
|
|
15341
15539
|
pilhaEscoposExecucao.definirVariavel('numero', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.numero));
|
|
15342
15540
|
pilhaEscoposExecucao.definirVariavel('número', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.numero));
|
|
15343
15541
|
pilhaEscoposExecucao.definirVariavel('ordenar', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.ordenar));
|
|
@@ -15345,12 +15543,24 @@ function carregarBibliotecasGlobais(pilhaEscoposExecucao) {
|
|
|
15345
15543
|
pilhaEscoposExecucao.definirVariavel('primeiroEmCondicao', new funcao_padrao_1.FuncaoPadrao(2, bibliotecaGlobal.primeiroEmCondicao));
|
|
15346
15544
|
pilhaEscoposExecucao.definirVariavel('real', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.real));
|
|
15347
15545
|
pilhaEscoposExecucao.definirVariavel('reduzir', new funcao_padrao_1.FuncaoPadrao(3, bibliotecaGlobal.reduzir));
|
|
15546
|
+
pilhaEscoposExecucao.definirVariavel('somar', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.somar));
|
|
15348
15547
|
pilhaEscoposExecucao.definirVariavel('tamanho', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.tamanho));
|
|
15349
15548
|
pilhaEscoposExecucao.definirVariavel('texto', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.texto));
|
|
15350
15549
|
pilhaEscoposExecucao.definirVariavel('todos', new funcao_padrao_1.FuncaoPadrao(2, bibliotecaGlobal.todosEmCondicao));
|
|
15351
15550
|
pilhaEscoposExecucao.definirVariavel('todosEmCondicao', new funcao_padrao_1.FuncaoPadrao(2, bibliotecaGlobal.todosEmCondicao));
|
|
15352
15551
|
pilhaEscoposExecucao.definirVariavel('tupla', new funcao_padrao_1.FuncaoPadrao(1, bibliotecaGlobal.tupla));
|
|
15353
15552
|
}
|
|
15553
|
+
function pontoEntradaAjuda(funcao, topico) {
|
|
15554
|
+
if (!funcao) {
|
|
15555
|
+
return "Para usar a ajuda, use como uma função: ajuda(objeto).";
|
|
15556
|
+
}
|
|
15557
|
+
if (!topico) {
|
|
15558
|
+
return "Te damos as boas-vindas ao utilitário de ajuda de Delégua!\n\n" +
|
|
15559
|
+
"Use ajuda(objeto) para obter informações sobre um objeto, função, classe ou módulo.\n" +
|
|
15560
|
+
"Use ajuda('tópico') para obter informações sobre um tópico específico.\n\n";
|
|
15561
|
+
}
|
|
15562
|
+
return obterTopicoAjuda(topico);
|
|
15563
|
+
}
|
|
15354
15564
|
function obterTopicoAjuda(topico) {
|
|
15355
15565
|
switch (topico.constructor) {
|
|
15356
15566
|
case construtos_1.Leia:
|
|
@@ -15528,6 +15738,10 @@ function obterAjudaFuncaoPadrao(funcaoPadrao) {
|
|
|
15528
15738
|
`\tvar numeros = [1, 2, 3, 4]\n` +
|
|
15529
15739
|
`\tvar quadrados = mapear(numeros, funcao(n) { retorna n * n })\n` +
|
|
15530
15740
|
`\tescreva(quadrados) // [1, 4, 9, 16]\n`;
|
|
15741
|
+
case 'maximo':
|
|
15742
|
+
return `# maximo(vetor)\n\nRetorna o maior valor encontrado em um vetor de números.`;
|
|
15743
|
+
case 'minimo':
|
|
15744
|
+
return `# minimo(vetor)\n\nRetorna o menor valor encontrado em um vetor de números.`;
|
|
15531
15745
|
case 'numero':
|
|
15532
15746
|
return `# numero(valor)\n\n` +
|
|
15533
15747
|
`Converte um valor em um número (pode ter parte decimal).\n\n` +
|
|
@@ -15598,6 +15812,8 @@ function obterAjudaFuncaoPadrao(funcaoPadrao) {
|
|
|
15598
15812
|
`\tvar numeros = [1, 2, 3, 4]\n` +
|
|
15599
15813
|
`\tvar soma = reduzir(numeros, funcao(acc, n) { retorna acc + n }, 0)\n` +
|
|
15600
15814
|
`\tescreva(soma) // 10\n`;
|
|
15815
|
+
case 'somar':
|
|
15816
|
+
return `# somar(vetor)\n\nRetorna a soma de todos os elementos de um vetor numérico.`;
|
|
15601
15817
|
case 'tamanho':
|
|
15602
15818
|
return `# tamanho(objeto)\n\n` +
|
|
15603
15819
|
`Retorna o tamanho de um objeto (vetor, texto, função, etc.).\n\n` +
|
|
@@ -16055,8 +16271,8 @@ const chamavel_1 = require("./chamavel");
|
|
|
16055
16271
|
* - `v.inclui(1)` (`v` é um vetor)
|
|
16056
16272
|
* - `t.minusculo()` (`t` é um texto)
|
|
16057
16273
|
*
|
|
16058
|
-
* A aridade é sempre a quantidade de argumentos do método menos
|
|
16059
|
-
*
|
|
16274
|
+
* A aridade é sempre a quantidade de argumentos do método menos dois porque os
|
|
16275
|
+
* dois primeiros parâmetros são sempre o interpretador e a referência para a primitiva.
|
|
16060
16276
|
*/
|
|
16061
16277
|
class MetodoPrimitiva extends chamavel_1.Chamavel {
|
|
16062
16278
|
constructor(nome, primitiva, metodo, nomeMetodo, tipo = 'qualquer') {
|
|
@@ -16067,10 +16283,10 @@ class MetodoPrimitiva extends chamavel_1.Chamavel {
|
|
|
16067
16283
|
this.metodo = metodo;
|
|
16068
16284
|
this.nomeMetodo = nomeMetodo;
|
|
16069
16285
|
this.tipo = tipo;
|
|
16070
|
-
this.valorAridade = metodo.length -
|
|
16286
|
+
this.valorAridade = metodo.length - 2;
|
|
16071
16287
|
}
|
|
16072
16288
|
async chamar(interpretador, argumentos = []) {
|
|
16073
|
-
return await this.metodo(interpretador, this.
|
|
16289
|
+
return await this.metodo(interpretador, this.primitiva, ...argumentos);
|
|
16074
16290
|
}
|
|
16075
16291
|
/**
|
|
16076
16292
|
* Método utilizado por Delégua para inspecionar este método em depuração.
|
|
@@ -16389,6 +16605,39 @@ class InterpretadorBase {
|
|
|
16389
16605
|
}
|
|
16390
16606
|
return objeto;
|
|
16391
16607
|
}
|
|
16608
|
+
/**
|
|
16609
|
+
* Resolve valores recursivamente, incluindo valores aninhados em arrays e dicionários.
|
|
16610
|
+
* Remove metadados que não devem ser serializados.
|
|
16611
|
+
* @param objeto O objeto a ser resolvido
|
|
16612
|
+
* @returns O valor resolvido sem metadados
|
|
16613
|
+
*/
|
|
16614
|
+
resolverValorRecursivo(objeto) {
|
|
16615
|
+
// Null, undefined, ou tipos primitivos
|
|
16616
|
+
if (objeto === null || objeto === undefined || typeof objeto !== 'object') {
|
|
16617
|
+
return objeto;
|
|
16618
|
+
}
|
|
16619
|
+
// Resolve metadados primeiro (valorRetornado ou valor)
|
|
16620
|
+
if (objeto.hasOwnProperty && objeto.hasOwnProperty('valorRetornado')) {
|
|
16621
|
+
return this.resolverValorRecursivo(objeto.valorRetornado);
|
|
16622
|
+
}
|
|
16623
|
+
if (objeto.hasOwnProperty && objeto.hasOwnProperty('valor')) {
|
|
16624
|
+
return this.resolverValorRecursivo(objeto.valor);
|
|
16625
|
+
}
|
|
16626
|
+
// Se é array, resolve recursivamente todos os elementos
|
|
16627
|
+
if (Array.isArray(objeto)) {
|
|
16628
|
+
return objeto.map(elemento => this.resolverValorRecursivo(elemento));
|
|
16629
|
+
}
|
|
16630
|
+
// Se é objeto plano, resolve recursivamente todas as propriedades
|
|
16631
|
+
if (objeto && objeto.constructor && objeto.constructor === Object) {
|
|
16632
|
+
const objetoResolvido = {};
|
|
16633
|
+
for (const chave in objeto) {
|
|
16634
|
+
objetoResolvido[chave] = this.resolverValorRecursivo(objeto[chave]);
|
|
16635
|
+
}
|
|
16636
|
+
return objetoResolvido;
|
|
16637
|
+
}
|
|
16638
|
+
// Outros tipos de objetos (Date, classes customizadas, etc.)
|
|
16639
|
+
return objeto;
|
|
16640
|
+
}
|
|
16392
16641
|
visitarExpressaoArgumentoReferenciaFuncao(expressao) {
|
|
16393
16642
|
throw new Error('Método não implementado.');
|
|
16394
16643
|
}
|
|
@@ -16430,11 +16679,17 @@ class InterpretadorBase {
|
|
|
16430
16679
|
throw new Error('Método não implementado.');
|
|
16431
16680
|
}
|
|
16432
16681
|
async visitarExpressaoTupla(expressao) {
|
|
16433
|
-
|
|
16682
|
+
// Lista de propriedades válidas para tuplas (ignorar propriedades de controle)
|
|
16683
|
+
const propriedadesValidas = [
|
|
16684
|
+
'primeiro', 'segundo', 'terceiro', 'quarto', 'quinto',
|
|
16685
|
+
'sexto', 'sétimo', 'setimo', 'oitavo', 'nono', 'décimo', 'decimo'
|
|
16686
|
+
];
|
|
16434
16687
|
const valores = [];
|
|
16435
|
-
for (let
|
|
16436
|
-
|
|
16437
|
-
|
|
16688
|
+
for (let propriedade of propriedadesValidas) {
|
|
16689
|
+
if (expressao.hasOwnProperty(propriedade) && expressao[propriedade] !== undefined) {
|
|
16690
|
+
const valor = await this.avaliar(expressao[propriedade]);
|
|
16691
|
+
valores.push(valor);
|
|
16692
|
+
}
|
|
16438
16693
|
}
|
|
16439
16694
|
return valores;
|
|
16440
16695
|
}
|
|
@@ -16806,6 +17061,12 @@ class InterpretadorBase {
|
|
|
16806
17061
|
return Number(valorEsquerdo) * Number(valorDireito);
|
|
16807
17062
|
case delegua_1.default.MODULO:
|
|
16808
17063
|
case delegua_1.default.MODULO_IGUAL:
|
|
17064
|
+
// Se o operando esquerdo é uma string, usar formatação de string
|
|
17065
|
+
if (tipoEsquerdo === delegua_2.default.TEXTO || typeof valorEsquerdo === 'string') {
|
|
17066
|
+
return this.formatarStringComOperadorPorcentagem(String(valorEsquerdo), direita, // Passar 'direita' ao invés de 'valorDireito' para preservar arrays de tuplas
|
|
17067
|
+
expressao.operador);
|
|
17068
|
+
}
|
|
17069
|
+
// Caso contrário, operação matemática normal
|
|
16809
17070
|
this.verificarOperandosNumeros(expressao.operador, esquerda, direita);
|
|
16810
17071
|
return Number(valorEsquerdo) % Number(valorDireito);
|
|
16811
17072
|
case delegua_1.default.BIT_AND:
|
|
@@ -17669,7 +17930,7 @@ class InterpretadorBase {
|
|
|
17669
17930
|
]);
|
|
17670
17931
|
if (typeof promises[0] === 'boolean') {
|
|
17671
17932
|
const chaveLogico = promises[0] === true ? 'verdadeiro' : 'falso';
|
|
17672
|
-
dicionario[chaveLogico] = promises[1];
|
|
17933
|
+
dicionario[chaveLogico] = this.resolverValor(promises[1]);
|
|
17673
17934
|
continue;
|
|
17674
17935
|
}
|
|
17675
17936
|
dicionario[promises[0]] = this.resolverValor(promises[1]);
|
|
@@ -17680,7 +17941,7 @@ class InterpretadorBase {
|
|
|
17680
17941
|
async visitarExpressaoVetor(expressao) {
|
|
17681
17942
|
const valores = [];
|
|
17682
17943
|
for (let i = 0; i < expressao.valores.length; i++) {
|
|
17683
|
-
valores.push(await this.avaliar(expressao.valores[i]));
|
|
17944
|
+
valores.push(this.resolverValor(await this.avaliar(expressao.valores[i])));
|
|
17684
17945
|
}
|
|
17685
17946
|
return valores.filter((v) => v !== null && v !== undefined);
|
|
17686
17947
|
}
|
|
@@ -17721,6 +17982,143 @@ class InterpretadorBase {
|
|
|
17721
17982
|
}
|
|
17722
17983
|
return null;
|
|
17723
17984
|
}
|
|
17985
|
+
/**
|
|
17986
|
+
* Formata uma string usando o operador % (similar ao Python).
|
|
17987
|
+
* @param formato A string de formato com especificadores (ex: "Olá %s").
|
|
17988
|
+
* @param valores Os valores para substituir (pode ser um único valor ou uma tupla/vetor).
|
|
17989
|
+
* @param operador O símbolo do operador para mensagens de erro.
|
|
17990
|
+
* @returns A string formatada.
|
|
17991
|
+
*/
|
|
17992
|
+
formatarStringComOperadorPorcentagem(formato, valores, operador) {
|
|
17993
|
+
let valoresArray;
|
|
17994
|
+
// Verificar se é uma TuplaN (verifica instanceof OU propriedade elementos/tipo para maior compatibilidade)
|
|
17995
|
+
if (valores instanceof construtos_1.TuplaN ||
|
|
17996
|
+
(valores && valores.tipo === 'tupla' && valores.elementos && Array.isArray(valores.elementos))) {
|
|
17997
|
+
valoresArray = valores.elementos.map((elem) => {
|
|
17998
|
+
if (elem instanceof construtos_1.Literal || (elem && typeof elem === 'object' && elem.hasOwnProperty('valor'))) {
|
|
17999
|
+
return this.resolverValor(elem.valor);
|
|
18000
|
+
}
|
|
18001
|
+
return this.resolverValor(elem);
|
|
18002
|
+
});
|
|
18003
|
+
}
|
|
18004
|
+
else if (Array.isArray(valores)) {
|
|
18005
|
+
valoresArray = valores.map(v => this.resolverValor(v));
|
|
18006
|
+
}
|
|
18007
|
+
else {
|
|
18008
|
+
const valorResolvido = this.resolverValor(valores);
|
|
18009
|
+
if (Array.isArray(valorResolvido)) {
|
|
18010
|
+
valoresArray = valorResolvido.map(v => this.resolverValor(v));
|
|
18011
|
+
}
|
|
18012
|
+
else {
|
|
18013
|
+
valoresArray = [valorResolvido];
|
|
18014
|
+
}
|
|
18015
|
+
}
|
|
18016
|
+
let indiceValor = 0;
|
|
18017
|
+
let resultado = '';
|
|
18018
|
+
let i = 0;
|
|
18019
|
+
while (i < formato.length) {
|
|
18020
|
+
if (formato[i] === '%') {
|
|
18021
|
+
if (i + 1 >= formato.length) {
|
|
18022
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(operador, 'Formato inválido: % no final da string', operador.linha);
|
|
18023
|
+
}
|
|
18024
|
+
const proximoChar = formato[i + 1];
|
|
18025
|
+
// %% -> % literal
|
|
18026
|
+
if (proximoChar === '%') {
|
|
18027
|
+
resultado += '%';
|
|
18028
|
+
i += 2;
|
|
18029
|
+
continue;
|
|
18030
|
+
}
|
|
18031
|
+
// Verificar se ainda temos valores para substituir
|
|
18032
|
+
if (indiceValor >= valoresArray.length) {
|
|
18033
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(operador, 'Argumentos insuficientes para a string de formatação', operador.linha);
|
|
18034
|
+
}
|
|
18035
|
+
const valor = valoresArray[indiceValor];
|
|
18036
|
+
indiceValor++;
|
|
18037
|
+
// Processar especificadores de formato
|
|
18038
|
+
if (proximoChar === 's') {
|
|
18039
|
+
// %s - string
|
|
18040
|
+
resultado += this.paraTexto(valor);
|
|
18041
|
+
i += 2;
|
|
18042
|
+
}
|
|
18043
|
+
else if (proximoChar === 'd') {
|
|
18044
|
+
// %d - inteiro
|
|
18045
|
+
const valorNumerico = Number(valor);
|
|
18046
|
+
if (isNaN(valorNumerico)) {
|
|
18047
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(operador, `Esperado número para %d, mas recebeu ${typeof valor}`, operador.linha);
|
|
18048
|
+
}
|
|
18049
|
+
resultado += Math.floor(valorNumerico).toString();
|
|
18050
|
+
i += 2;
|
|
18051
|
+
}
|
|
18052
|
+
else if (proximoChar === 'f') {
|
|
18053
|
+
// %f - flutuante
|
|
18054
|
+
const valorNumerico = Number(valor);
|
|
18055
|
+
if (isNaN(valorNumerico)) {
|
|
18056
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(operador, `Esperado número para %f, mas recebeu ${typeof valor}`, operador.linha);
|
|
18057
|
+
}
|
|
18058
|
+
resultado += valorNumerico.toString();
|
|
18059
|
+
i += 2;
|
|
18060
|
+
}
|
|
18061
|
+
else if (proximoChar === '.') {
|
|
18062
|
+
// %.nf - flutuante com n casas decimais
|
|
18063
|
+
let j = i + 2;
|
|
18064
|
+
let casasDecimais = '';
|
|
18065
|
+
while (j < formato.length && formato[j] >= '0' && formato[j] <= '9') {
|
|
18066
|
+
casasDecimais += formato[j];
|
|
18067
|
+
j++;
|
|
18068
|
+
}
|
|
18069
|
+
if (j >= formato.length || formato[j] !== 'f') {
|
|
18070
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(operador, 'Formato inválido: esperado %.nf (ex: %.2f)', operador.linha);
|
|
18071
|
+
}
|
|
18072
|
+
const precisao = parseInt(casasDecimais, 10);
|
|
18073
|
+
const valorNumerico = Number(valor);
|
|
18074
|
+
if (isNaN(valorNumerico)) {
|
|
18075
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(operador, `Esperado número para %.${precisao}f, mas recebeu ${typeof valor}`, operador.linha);
|
|
18076
|
+
}
|
|
18077
|
+
resultado += valorNumerico.toFixed(precisao);
|
|
18078
|
+
i = j + 1;
|
|
18079
|
+
}
|
|
18080
|
+
else if (proximoChar === 'x') {
|
|
18081
|
+
// %x - hexadecimal (caixa baixa)
|
|
18082
|
+
const valorNumerico = Number(valor);
|
|
18083
|
+
if (isNaN(valorNumerico)) {
|
|
18084
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(operador, `Esperado número para %x, mas recebeu ${typeof valor}`, operador.linha);
|
|
18085
|
+
}
|
|
18086
|
+
resultado += Math.floor(valorNumerico).toString(16);
|
|
18087
|
+
i += 2;
|
|
18088
|
+
}
|
|
18089
|
+
else if (proximoChar === 'X') {
|
|
18090
|
+
// %X - hexadecimal (caixa alta)
|
|
18091
|
+
const valorNumerico = Number(valor);
|
|
18092
|
+
if (isNaN(valorNumerico)) {
|
|
18093
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(operador, `Esperado número para %X, mas recebeu ${typeof valor}`, operador.linha);
|
|
18094
|
+
}
|
|
18095
|
+
resultado += Math.floor(valorNumerico).toString(16).toUpperCase();
|
|
18096
|
+
i += 2;
|
|
18097
|
+
}
|
|
18098
|
+
else if (proximoChar === 'o') {
|
|
18099
|
+
// %o - octal
|
|
18100
|
+
const valorNumerico = Number(valor);
|
|
18101
|
+
if (isNaN(valorNumerico)) {
|
|
18102
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(operador, `Esperado número para %o, mas recebeu ${typeof valor}`, operador.linha);
|
|
18103
|
+
}
|
|
18104
|
+
resultado += Math.floor(valorNumerico).toString(8);
|
|
18105
|
+
i += 2;
|
|
18106
|
+
}
|
|
18107
|
+
else {
|
|
18108
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(operador, `Especificador de formato desconhecido: %${proximoChar}`, operador.linha);
|
|
18109
|
+
}
|
|
18110
|
+
}
|
|
18111
|
+
else {
|
|
18112
|
+
resultado += formato[i];
|
|
18113
|
+
i++;
|
|
18114
|
+
}
|
|
18115
|
+
}
|
|
18116
|
+
// Verificar se há valores não utilizados
|
|
18117
|
+
if (indiceValor < valoresArray.length) {
|
|
18118
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(operador, 'Nem todos os argumentos foram convertidos durante a formatação da string.', operador.linha);
|
|
18119
|
+
}
|
|
18120
|
+
return resultado;
|
|
18121
|
+
}
|
|
17724
18122
|
paraTexto(objeto) {
|
|
17725
18123
|
if (objeto === null || objeto === undefined)
|
|
17726
18124
|
return delegua_2.default.NULO;
|
|
@@ -17767,7 +18165,8 @@ class InterpretadorBase {
|
|
|
17767
18165
|
if ('tipo' in objeto) {
|
|
17768
18166
|
switch (objeto.tipo) {
|
|
17769
18167
|
case 'dicionário':
|
|
17770
|
-
|
|
18168
|
+
const valorResolvido = this.resolverValorRecursivo(objeto.valor);
|
|
18169
|
+
return JSON.stringify(valorResolvido);
|
|
17771
18170
|
default:
|
|
17772
18171
|
return objeto.valor;
|
|
17773
18172
|
}
|
|
@@ -17920,7 +18319,7 @@ class InterpretadorBase {
|
|
|
17920
18319
|
exports.InterpretadorBase = InterpretadorBase;
|
|
17921
18320
|
|
|
17922
18321
|
}).call(this)}).call(this,require('_process'))
|
|
17923
|
-
},{"../avaliador-sintatico":21,"../bibliotecas/primitivas-dicionario":29,"../bibliotecas/primitivas-vetor":32,"../construtos":62,"../excecoes":129,"../inferenciador":135,"../lexador":197,"../quebras":206,"../tipos-de-dados/delegua":207,"../tipos-de-dados/primitivos":209,"../tipos-de-simbolos/delegua":212,"./espaco-memoria":164,"./estruturas":171,"./estruturas/metodo-primitiva":172,"./pilha-escopos-execucao":181,"_process":
|
|
18322
|
+
},{"../avaliador-sintatico":21,"../bibliotecas/primitivas-dicionario":29,"../bibliotecas/primitivas-vetor":32,"../construtos":62,"../excecoes":129,"../inferenciador":135,"../lexador":197,"../quebras":206,"../tipos-de-dados/delegua":207,"../tipos-de-dados/primitivos":209,"../tipos-de-simbolos/delegua":212,"./espaco-memoria":164,"./estruturas":171,"./estruturas/metodo-primitiva":172,"./pilha-escopos-execucao":181,"_process":456,"browser-process-hrtime":402}],179:[function(require,module,exports){
|
|
17924
18323
|
"use strict";
|
|
17925
18324
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17926
18325
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -17943,8 +18342,10 @@ const primitivas_vetor_1 = __importDefault(require("../bibliotecas/primitivas-ve
|
|
|
17943
18342
|
const primitivas_tupla_1 = __importDefault(require("../bibliotecas/dialetos/pitugues/primitivas-tupla"));
|
|
17944
18343
|
const primitivos_1 = __importDefault(require("../tipos-de-dados/primitivos"));
|
|
17945
18344
|
const delegua_1 = __importDefault(require("../tipos-de-dados/delegua"));
|
|
18345
|
+
const delegua_2 = __importDefault(require("../tipos-de-simbolos/delegua"));
|
|
17946
18346
|
/**
|
|
17947
|
-
* O interpretador de Delégua
|
|
18347
|
+
* O interpretador de Delégua, usado também por Pituguês usando herança.
|
|
18348
|
+
* @see InterpretadorPitugues
|
|
17948
18349
|
*/
|
|
17949
18350
|
class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
17950
18351
|
constructor(diretorioBase, performance = false, funcaoDeRetorno = null, funcaoDeRetornoMesmaLinha = null) {
|
|
@@ -17968,15 +18369,7 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
17968
18369
|
return objeto;
|
|
17969
18370
|
}
|
|
17970
18371
|
if (Array.isArray(objeto)) {
|
|
17971
|
-
|
|
17972
|
-
if (referencia) {
|
|
17973
|
-
return objeto;
|
|
17974
|
-
}
|
|
17975
|
-
const vetorResolvido = [];
|
|
17976
|
-
for (const elemento of objeto) {
|
|
17977
|
-
vetorResolvido.push(this.resolverValor(elemento));
|
|
17978
|
-
}
|
|
17979
|
-
return vetorResolvido;
|
|
18372
|
+
return objeto;
|
|
17980
18373
|
}
|
|
17981
18374
|
if (objeto instanceof estruturas_1.ReferenciaMontao) {
|
|
17982
18375
|
return this.resolverReferenciaMontao(objeto);
|
|
@@ -18035,10 +18428,20 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18035
18428
|
if (Array.isArray(objeto)) {
|
|
18036
18429
|
let retornoVetor = '[';
|
|
18037
18430
|
for (let elemento of objeto) {
|
|
18431
|
+
// Resolve referências ao montão antes de processar
|
|
18432
|
+
if (elemento instanceof estruturas_1.ReferenciaMontao) {
|
|
18433
|
+
elemento = this.resolverValor(elemento);
|
|
18434
|
+
}
|
|
18038
18435
|
if (elemento instanceof construtos_1.Tupla) {
|
|
18039
18436
|
retornoVetor += elemento.paraTextoSaida() + ', ';
|
|
18040
18437
|
continue;
|
|
18041
18438
|
}
|
|
18439
|
+
// Se o elemento é um array (incluindo arrays resolvidos de referências),
|
|
18440
|
+
// chama paraTexto recursivamente para processá-lo corretamente
|
|
18441
|
+
if (Array.isArray(elemento)) {
|
|
18442
|
+
retornoVetor += this.paraTexto(elemento) + ', ';
|
|
18443
|
+
continue;
|
|
18444
|
+
}
|
|
18042
18445
|
if (typeof elemento === 'object') {
|
|
18043
18446
|
retornoVetor += `${this.serializarSemEspacos(elemento)}, `;
|
|
18044
18447
|
continue;
|
|
@@ -18101,11 +18504,7 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18101
18504
|
* @param declaracao A declaração de ajuda.
|
|
18102
18505
|
*/
|
|
18103
18506
|
async visitarDeclaracaoAjuda(declaracao) {
|
|
18104
|
-
|
|
18105
|
-
// TODO: Terminar
|
|
18106
|
-
}
|
|
18107
|
-
const elementoResolvido = await declaracao.elemento.aceitar(this);
|
|
18108
|
-
console.log(elementoResolvido);
|
|
18507
|
+
return Promise.resolve((0, comum_1.pontoEntradaAjuda)(declaracao.funcao, declaracao.elemento));
|
|
18109
18508
|
}
|
|
18110
18509
|
visitarDeclaracaoDefinicaoFuncao(declaracao) {
|
|
18111
18510
|
const funcao = new estruturas_1.DeleguaFuncao(declaracao.simbolo.lexema, declaracao.funcao);
|
|
@@ -18139,7 +18538,7 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18139
18538
|
retornoExecucao = null;
|
|
18140
18539
|
}
|
|
18141
18540
|
if (acumularRetornos) {
|
|
18142
|
-
retornos.push(retornoExecucao);
|
|
18541
|
+
retornos.push(this.resolverValor(retornoExecucao));
|
|
18143
18542
|
}
|
|
18144
18543
|
}
|
|
18145
18544
|
catch (erro) {
|
|
@@ -18181,7 +18580,7 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18181
18580
|
retornoExecucao = null;
|
|
18182
18581
|
}
|
|
18183
18582
|
if (acumularRetornos) {
|
|
18184
|
-
retornos.push(retornoExecucao);
|
|
18583
|
+
retornos.push(this.resolverValor(retornoExecucao));
|
|
18185
18584
|
}
|
|
18186
18585
|
}
|
|
18187
18586
|
catch (erro) {
|
|
@@ -18233,7 +18632,7 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18233
18632
|
retornoExecucao = null;
|
|
18234
18633
|
}
|
|
18235
18634
|
if (acumularRetornos) {
|
|
18236
|
-
retornos.push(retornoExecucao);
|
|
18635
|
+
retornos.push(this.resolverValor(retornoExecucao));
|
|
18237
18636
|
}
|
|
18238
18637
|
if (para.incrementar !== null) {
|
|
18239
18638
|
await this.avaliar(para.incrementar);
|
|
@@ -18305,7 +18704,7 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18305
18704
|
retornoExecucao = null;
|
|
18306
18705
|
}
|
|
18307
18706
|
if (acumularRetornos) {
|
|
18308
|
-
retornos.push(retornoExecucao);
|
|
18707
|
+
retornos.push(this.resolverValor(retornoExecucao));
|
|
18309
18708
|
}
|
|
18310
18709
|
paraCada.posicaoAtual++;
|
|
18311
18710
|
}
|
|
@@ -18441,7 +18840,7 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18441
18840
|
}
|
|
18442
18841
|
let tipoObjeto = variavelObjeto.tipo;
|
|
18443
18842
|
if (tipoObjeto === null || tipoObjeto === undefined) {
|
|
18444
|
-
tipoObjeto = (0, inferenciador_1.inferirTipoVariavel)(
|
|
18843
|
+
tipoObjeto = (0, inferenciador_1.inferirTipoVariavel)(objeto);
|
|
18445
18844
|
}
|
|
18446
18845
|
// Como internamente um dicionário de Delégua é simplesmente um objeto de
|
|
18447
18846
|
// JavaScript, as primitivas de dicionário, especificamente, são tratadas
|
|
@@ -18529,7 +18928,7 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18529
18928
|
}
|
|
18530
18929
|
let tipoObjeto = variavelObjeto.tipo;
|
|
18531
18930
|
if (tipoObjeto === null || tipoObjeto === undefined) {
|
|
18532
|
-
tipoObjeto = (0, inferenciador_1.inferirTipoVariavel)(
|
|
18931
|
+
tipoObjeto = (0, inferenciador_1.inferirTipoVariavel)(objeto);
|
|
18533
18932
|
}
|
|
18534
18933
|
// Como internamente um dicionário de Delégua é simplesmente um objeto de
|
|
18535
18934
|
// JavaScript, as primitivas de dicionário, especificamente, são tratadas
|
|
@@ -18632,20 +19031,12 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18632
19031
|
}
|
|
18633
19032
|
let tipoObjeto = variavelObjeto.tipo;
|
|
18634
19033
|
if (tipoObjeto === null || tipoObjeto === undefined) {
|
|
18635
|
-
tipoObjeto = (0, inferenciador_1.inferirTipoVariavel)(
|
|
19034
|
+
tipoObjeto = (0, inferenciador_1.inferirTipoVariavel)(objeto);
|
|
18636
19035
|
}
|
|
18637
19036
|
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(null, `Propriedade para objeto ou primitiva não encontrado: ${expressao.nomePropriedade}.`, expressao.linha));
|
|
18638
19037
|
}
|
|
18639
19038
|
async visitarExpressaoAjuda(expressao) {
|
|
18640
|
-
|
|
18641
|
-
return "Para usar a ajuda, use como uma função: ajuda(objeto).";
|
|
18642
|
-
}
|
|
18643
|
-
if (!expressao.valor) {
|
|
18644
|
-
return "Te damos as boas-vindas ao utilitário de ajuda de Delégua!\n\n" +
|
|
18645
|
-
"Use ajuda(objeto) para obter informações sobre um objeto, função, classe ou módulo.\n" +
|
|
18646
|
-
"Use ajuda('tópico') para obter informações sobre um tópico específico.\n\n";
|
|
18647
|
-
}
|
|
18648
|
-
return (0, comum_1.obterTopicoAjuda)(expressao.valor);
|
|
19039
|
+
return Promise.resolve((0, comum_1.pontoEntradaAjuda)(expressao.funcao, expressao.valor));
|
|
18649
19040
|
}
|
|
18650
19041
|
async visitarExpressaoArgumentoReferenciaFuncao(expressao) {
|
|
18651
19042
|
const deleguaFuncao = this.pilhaEscoposExecucao.obterVariavelPorNome(expressao.simboloFuncao.lexema);
|
|
@@ -18685,9 +19076,9 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18685
19076
|
objeto.push(null);
|
|
18686
19077
|
}
|
|
18687
19078
|
objeto[indice] = valor;
|
|
18688
|
-
this.pilhaEscoposExecucao.atribuirVariavel(expressao.objeto.simbolo, objeto);
|
|
19079
|
+
// this.pilhaEscoposExecucao.atribuirVariavel((expressao.objeto as any).simbolo, objeto);
|
|
18689
19080
|
}
|
|
18690
|
-
else if (objeto.constructor === Object ||
|
|
19081
|
+
else if ((objeto && objeto.constructor === Object) ||
|
|
18691
19082
|
objeto instanceof estruturas_1.ObjetoDeleguaClasse ||
|
|
18692
19083
|
objeto instanceof estruturas_1.DeleguaFuncao ||
|
|
18693
19084
|
objeto instanceof estruturas_1.DescritorTipoClasse ||
|
|
@@ -18899,6 +19290,48 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18899
19290
|
return (0, inferenciador_1.inferirTipoVariavel)(valorTipoDe);
|
|
18900
19291
|
}
|
|
18901
19292
|
}
|
|
19293
|
+
async visitarExpressaoUnaria(expressao) {
|
|
19294
|
+
// Tratamento especial para expressões unárias aplicadas a chamadas de método em literais numéricos.
|
|
19295
|
+
// Por exemplo: -5.absoluto() deve ser avaliado como (-5).absoluto(), não como -(5.absoluto())
|
|
19296
|
+
// Isso garante que o operador unário seja aplicado ao literal antes de chamar o método.
|
|
19297
|
+
if ((expressao.operador.tipo === delegua_2.default.SUBTRACAO || expressao.operador.tipo === delegua_2.default.ADICAO) &&
|
|
19298
|
+
expressao.operando instanceof construtos_1.Chamada) {
|
|
19299
|
+
const entidadeChamada = expressao.operando.entidadeChamada;
|
|
19300
|
+
// Verifica se é AcessoMetodo ou AcessoMetodoOuPropriedade
|
|
19301
|
+
if (entidadeChamada instanceof construtos_1.AcessoMetodo || entidadeChamada instanceof construtos_1.AcessoMetodoOuPropriedade) {
|
|
19302
|
+
const objetoAcesso = entidadeChamada.objeto;
|
|
19303
|
+
// Verifica se o objeto do método é um literal numérico
|
|
19304
|
+
if (objetoAcesso instanceof construtos_1.Literal && typeof objetoAcesso.valor === 'number') {
|
|
19305
|
+
// Cria um novo literal com o sinal aplicado
|
|
19306
|
+
const novoLiteral = new construtos_1.Literal(objetoAcesso.hashArquivo, objetoAcesso.linha, expressao.operador.tipo === delegua_2.default.SUBTRACAO ?
|
|
19307
|
+
-objetoAcesso.valor :
|
|
19308
|
+
+objetoAcesso.valor);
|
|
19309
|
+
// Cria um novo acesso com o literal modificado
|
|
19310
|
+
let novoAcesso;
|
|
19311
|
+
if (entidadeChamada instanceof construtos_1.AcessoMetodo) {
|
|
19312
|
+
novoAcesso = new construtos_1.AcessoMetodo(entidadeChamada.hashArquivo, novoLiteral, entidadeChamada.nomeMetodo, entidadeChamada.tipoRetornoMetodo);
|
|
19313
|
+
}
|
|
19314
|
+
else {
|
|
19315
|
+
novoAcesso = new construtos_1.AcessoMetodoOuPropriedade(entidadeChamada.hashArquivo, novoLiteral, entidadeChamada.simbolo);
|
|
19316
|
+
}
|
|
19317
|
+
// Cria uma nova Chamada com o acesso modificado
|
|
19318
|
+
const novaChamada = new construtos_1.Chamada(expressao.operando.hashArquivo, novoAcesso, expressao.operando.argumentos);
|
|
19319
|
+
// Avalia a nova chamada
|
|
19320
|
+
return await this.avaliar(novaChamada);
|
|
19321
|
+
}
|
|
19322
|
+
}
|
|
19323
|
+
}
|
|
19324
|
+
// Para outros casos, usa o comportamento padrão
|
|
19325
|
+
return await super.visitarExpressaoUnaria(expressao);
|
|
19326
|
+
}
|
|
19327
|
+
async visitarExpressaoVetor(expressao) {
|
|
19328
|
+
// Delega ao interpretador base para processar o vetor
|
|
19329
|
+
const vetor = await super.visitarExpressaoVetor(expressao);
|
|
19330
|
+
// Adiciona referência no montão (comportamento específico deste interpretador)
|
|
19331
|
+
const enderecoVetorMontao = this.montao.adicionarReferencia(vetor);
|
|
19332
|
+
this.pilhaEscoposExecucao.registrarReferenciaMontao(enderecoVetorMontao);
|
|
19333
|
+
return new estruturas_1.ReferenciaMontao(enderecoVetorMontao);
|
|
19334
|
+
}
|
|
18902
19335
|
/**
|
|
18903
19336
|
* Executa o último escopo empilhado no topo na pilha de escopos do interpretador.
|
|
18904
19337
|
* Esse método pega exceções, mas apenas as devolve.
|
|
@@ -18978,7 +19411,7 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
18978
19411
|
}
|
|
18979
19412
|
exports.Interpretador = Interpretador;
|
|
18980
19413
|
|
|
18981
|
-
},{"../bibliotecas/dialetos/pitugues/primitivas-tupla":28,"../bibliotecas/primitivas-dicionario":29,"../bibliotecas/primitivas-numero":30,"../bibliotecas/primitivas-texto":31,"../bibliotecas/primitivas-vetor":32,"../construtos":62,"../declaracoes":109,"../excecoes":129,"../inferenciador":135,"../quebras":206,"../tipos-de-dados/delegua":207,"../tipos-de-dados/primitivos":209,"./comum":163,"./estruturas":171,"./interpretador-base":178,"./montao":180}],180:[function(require,module,exports){
|
|
19414
|
+
},{"../bibliotecas/dialetos/pitugues/primitivas-tupla":28,"../bibliotecas/primitivas-dicionario":29,"../bibliotecas/primitivas-numero":30,"../bibliotecas/primitivas-texto":31,"../bibliotecas/primitivas-vetor":32,"../construtos":62,"../declaracoes":109,"../excecoes":129,"../inferenciador":135,"../quebras":206,"../tipos-de-dados/delegua":207,"../tipos-de-dados/primitivos":209,"../tipos-de-simbolos/delegua":212,"./comum":163,"./estruturas":171,"./interpretador-base":178,"./montao":180}],180:[function(require,module,exports){
|
|
18982
19415
|
"use strict";
|
|
18983
19416
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18984
19417
|
exports.Montao = void 0;
|
|
@@ -20133,7 +20566,42 @@ class LexadorPitugues {
|
|
|
20133
20566
|
}
|
|
20134
20567
|
analisarTexto(delimitador = '"', ehFString = false) {
|
|
20135
20568
|
const linhaPrimeiroCaracter = this.linha;
|
|
20569
|
+
let valor = '';
|
|
20136
20570
|
while (this.simboloAtual() !== delimitador && !this.eFinalDoCodigo()) {
|
|
20571
|
+
const caractereAtual = this.simboloAtual();
|
|
20572
|
+
if (caractereAtual === '\\') {
|
|
20573
|
+
this.avancar();
|
|
20574
|
+
const proximoCaractere = this.simboloAtual();
|
|
20575
|
+
switch (proximoCaractere) {
|
|
20576
|
+
case 'r':
|
|
20577
|
+
valor += '\r';
|
|
20578
|
+
break;
|
|
20579
|
+
case 'b':
|
|
20580
|
+
valor += '\b';
|
|
20581
|
+
break;
|
|
20582
|
+
case 'n':
|
|
20583
|
+
valor += '\n';
|
|
20584
|
+
break;
|
|
20585
|
+
case 't':
|
|
20586
|
+
valor += '\t';
|
|
20587
|
+
break;
|
|
20588
|
+
case "'":
|
|
20589
|
+
valor += "'";
|
|
20590
|
+
break;
|
|
20591
|
+
case '"':
|
|
20592
|
+
valor += '"';
|
|
20593
|
+
break;
|
|
20594
|
+
case '\\':
|
|
20595
|
+
valor += '\\';
|
|
20596
|
+
break;
|
|
20597
|
+
default:
|
|
20598
|
+
valor += '\\' + proximoCaractere;
|
|
20599
|
+
break;
|
|
20600
|
+
}
|
|
20601
|
+
}
|
|
20602
|
+
else {
|
|
20603
|
+
valor += caractereAtual;
|
|
20604
|
+
}
|
|
20137
20605
|
this.avancar();
|
|
20138
20606
|
}
|
|
20139
20607
|
if (this.eFinalDoCodigo()) {
|
|
@@ -20152,7 +20620,7 @@ class LexadorPitugues {
|
|
|
20152
20620
|
return;
|
|
20153
20621
|
}
|
|
20154
20622
|
const tipoSimbolo = ehFString ? pitugues_2.default.INTERPOLACAO : pitugues_2.default.TEXTO;
|
|
20155
|
-
this.simbolos.push(new simbolo_1.Simbolo(tipoSimbolo, textoCompleto,
|
|
20623
|
+
this.simbolos.push(new simbolo_1.Simbolo(tipoSimbolo, textoCompleto, valor, linhaPrimeiroCaracter + 1, this.hashArquivo));
|
|
20156
20624
|
}
|
|
20157
20625
|
analisarNumero() {
|
|
20158
20626
|
const linhaPrimeiroDigito = this.linha;
|
|
@@ -20467,7 +20935,7 @@ class LexadorPitugues {
|
|
|
20467
20935
|
}
|
|
20468
20936
|
exports.LexadorPitugues = LexadorPitugues;
|
|
20469
20937
|
|
|
20470
|
-
},{"../../tipos-de-simbolos/pitugues":216,"../simbolo":205,"./palavras-reservadas/pitugues":193,"browser-process-hrtime":
|
|
20938
|
+
},{"../../tipos-de-simbolos/pitugues":216,"../simbolo":205,"./palavras-reservadas/pitugues":193,"browser-process-hrtime":402}],187:[function(require,module,exports){
|
|
20471
20939
|
"use strict";
|
|
20472
20940
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
20473
20941
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -21077,7 +21545,7 @@ class LexadorPrisma {
|
|
|
21077
21545
|
}
|
|
21078
21546
|
exports.LexadorPrisma = LexadorPrisma;
|
|
21079
21547
|
|
|
21080
|
-
},{"../../tipos-de-simbolos/prisma":218,"../simbolo":205,"./palavras-reservadas/prisma":195,"browser-process-hrtime":
|
|
21548
|
+
},{"../../tipos-de-simbolos/prisma":218,"../simbolo":205,"./palavras-reservadas/prisma":195,"browser-process-hrtime":402}],189:[function(require,module,exports){
|
|
21081
21549
|
"use strict";
|
|
21082
21550
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21083
21551
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -21468,7 +21936,7 @@ class LexadorTenda {
|
|
|
21468
21936
|
}
|
|
21469
21937
|
exports.LexadorTenda = LexadorTenda;
|
|
21470
21938
|
|
|
21471
|
-
},{"../../tipos-de-simbolos/tenda":219,"../simbolo":205,"./palavras-reservadas/tenda":196,"browser-process-hrtime":
|
|
21939
|
+
},{"../../tipos-de-simbolos/tenda":219,"../simbolo":205,"./palavras-reservadas/tenda":196,"browser-process-hrtime":402}],190:[function(require,module,exports){
|
|
21472
21940
|
"use strict";
|
|
21473
21941
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21474
21942
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -22428,7 +22896,7 @@ class Lexador {
|
|
|
22428
22896
|
}
|
|
22429
22897
|
exports.Lexador = Lexador;
|
|
22430
22898
|
|
|
22431
|
-
},{"../tipos-de-simbolos/delegua":212,"./palavras-reservadas":204,"./simbolo":205,"browser-process-hrtime":
|
|
22899
|
+
},{"../tipos-de-simbolos/delegua":212,"./palavras-reservadas":204,"./simbolo":205,"browser-process-hrtime":402}],201:[function(require,module,exports){
|
|
22432
22900
|
"use strict";
|
|
22433
22901
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22434
22902
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -23918,8 +24386,9 @@ __exportStar(require("./tradutor-python"), exports);
|
|
|
23918
24386
|
__exportStar(require("./tradutor-reverso-javascript"), exports);
|
|
23919
24387
|
__exportStar(require("./tradutor-reverso-python"), exports);
|
|
23920
24388
|
__exportStar(require("./tradutor-reverso-tenda"), exports);
|
|
24389
|
+
__exportStar(require("./tradutor-ruby"), exports);
|
|
23921
24390
|
|
|
23922
|
-
},{"./tradutor-assembly-arm":229,"./tradutor-assembly-x64":230,"./tradutor-assemblyscript":231,"./tradutor-calango":232,"./tradutor-javascript":233,"./tradutor-mermaidjs":234,"./tradutor-portugol-ipt":235,"./tradutor-python":236,"./tradutor-reverso-javascript":237,"./tradutor-reverso-python":238,"./tradutor-reverso-tenda":239}],221:[function(require,module,exports){
|
|
24391
|
+
},{"./tradutor-assembly-arm":229,"./tradutor-assembly-x64":230,"./tradutor-assemblyscript":231,"./tradutor-calango":232,"./tradutor-javascript":233,"./tradutor-mermaidjs":234,"./tradutor-portugol-ipt":235,"./tradutor-python":236,"./tradutor-reverso-javascript":237,"./tradutor-reverso-python":238,"./tradutor-reverso-tenda":239,"./tradutor-ruby":240}],221:[function(require,module,exports){
|
|
23923
24392
|
"use strict";
|
|
23924
24393
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23925
24394
|
exports.ArestaFluxograma = void 0;
|
|
@@ -23933,40 +24402,6 @@ exports.ArestaFluxograma = ArestaFluxograma;
|
|
|
23933
24402
|
|
|
23934
24403
|
},{}],222:[function(require,module,exports){
|
|
23935
24404
|
"use strict";
|
|
23936
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23937
|
-
exports.DiagramaClasse = void 0;
|
|
23938
|
-
class DiagramaClasse {
|
|
23939
|
-
constructor(nome, superClasse) {
|
|
23940
|
-
this.nome = nome;
|
|
23941
|
-
this.superClasse = superClasse;
|
|
23942
|
-
this.metodos = [];
|
|
23943
|
-
this.propriedades = [];
|
|
23944
|
-
}
|
|
23945
|
-
paraTexto() {
|
|
23946
|
-
let resultado = ` classe ${this.nome} {\n`;
|
|
23947
|
-
// Adiciona propriedades (se houver)
|
|
23948
|
-
for (const prop of this.propriedades) {
|
|
23949
|
-
const tipo = prop.tipo ? `: ${prop.tipo}` : '';
|
|
23950
|
-
resultado += ` +${prop.nome}${tipo}\n`;
|
|
23951
|
-
}
|
|
23952
|
-
// Adiciona métodos
|
|
23953
|
-
for (const metodo of this.metodos) {
|
|
23954
|
-
const params = metodo.parametros.join(', ');
|
|
23955
|
-
const retorno = metodo.tipoRetorno ? `: ${metodo.tipoRetorno}` : '';
|
|
23956
|
-
resultado += ` +${metodo.nome}(${params})${retorno}\n`;
|
|
23957
|
-
}
|
|
23958
|
-
resultado += ` }\n`;
|
|
23959
|
-
// Adiciona herança se houver
|
|
23960
|
-
if (this.superClasse) {
|
|
23961
|
-
resultado += ` ${this.superClasse} <|-- ${this.nome}\n`;
|
|
23962
|
-
}
|
|
23963
|
-
return resultado;
|
|
23964
|
-
}
|
|
23965
|
-
}
|
|
23966
|
-
exports.DiagramaClasse = DiagramaClasse;
|
|
23967
|
-
|
|
23968
|
-
},{}],223:[function(require,module,exports){
|
|
23969
|
-
"use strict";
|
|
23970
24405
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23971
24406
|
if (k2 === undefined) k2 = k;
|
|
23972
24407
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -23983,50 +24418,50 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
23983
24418
|
};
|
|
23984
24419
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23985
24420
|
__exportStar(require("./aresta-fluxograma"), exports);
|
|
23986
|
-
__exportStar(require("./diagrama-classe"), exports);
|
|
23987
24421
|
__exportStar(require("./subgrafo-classe"), exports);
|
|
23988
24422
|
__exportStar(require("./subgrafo-funcao"), exports);
|
|
24423
|
+
__exportStar(require("./subgrafo-metodo"), exports);
|
|
23989
24424
|
__exportStar(require("./vertice-fluxograma"), exports);
|
|
23990
24425
|
|
|
23991
|
-
},{"./aresta-fluxograma":221,"./
|
|
24426
|
+
},{"./aresta-fluxograma":221,"./subgrafo-classe":223,"./subgrafo-funcao":224,"./subgrafo-metodo":225,"./vertice-fluxograma":226}],223:[function(require,module,exports){
|
|
23992
24427
|
"use strict";
|
|
23993
24428
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23994
24429
|
exports.SubgrafoClasse = void 0;
|
|
23995
24430
|
class SubgrafoClasse {
|
|
23996
|
-
constructor(nomeClasse, linha, superClasse) {
|
|
24431
|
+
constructor(nomeClasse, linha, arestaInicial, arestaFinal, superClasse) {
|
|
23997
24432
|
this.nomeClasse = nomeClasse;
|
|
23998
24433
|
this.linha = linha;
|
|
23999
24434
|
this.superClasse = superClasse;
|
|
24000
24435
|
this.vertices = [];
|
|
24001
24436
|
this.metodos = [];
|
|
24437
|
+
this.arestaInicial = arestaInicial;
|
|
24438
|
+
this.arestaFinal = arestaFinal;
|
|
24002
24439
|
}
|
|
24003
24440
|
paraTexto() {
|
|
24004
|
-
let resultado = ` subgraph
|
|
24441
|
+
let resultado = ` subgraph ${this.nomeClasse}["Classe: ${this.nomeClasse}`;
|
|
24005
24442
|
if (this.superClasse) {
|
|
24006
24443
|
resultado += ` (estende ${this.superClasse})`;
|
|
24007
24444
|
}
|
|
24008
24445
|
resultado += `"]\n`;
|
|
24009
|
-
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
// Adiciona os métodos como sub-subgrafos
|
|
24013
|
-
for (const metodo of this.metodos) {
|
|
24014
|
-
resultado += ` subgraph Metodo_${metodo.nome}_${this.nomeClasse}_${this.linha}["Método: ${metodo.nome}"]\n`;
|
|
24446
|
+
// Renderiza o construtor se existir
|
|
24447
|
+
if (this.construtor) {
|
|
24448
|
+
resultado += ` subgraph construtor_${this.nomeClasse}["Construtor"]\n`;
|
|
24015
24449
|
resultado += ` direction TB\n`;
|
|
24016
|
-
for (const vertice of
|
|
24017
|
-
|
|
24018
|
-
|
|
24019
|
-
resultado += textoVertice;
|
|
24450
|
+
for (const vertice of this.construtor.vertices) {
|
|
24451
|
+
const textoVertice = vertice.paraTexto();
|
|
24452
|
+
resultado += ' ' + textoVertice;
|
|
24020
24453
|
}
|
|
24021
24454
|
resultado += ` end\n`;
|
|
24022
24455
|
}
|
|
24023
|
-
//
|
|
24024
|
-
|
|
24025
|
-
|
|
24026
|
-
|
|
24027
|
-
|
|
24028
|
-
|
|
24456
|
+
// Renderiza os métodos
|
|
24457
|
+
for (const metodo of this.metodos) {
|
|
24458
|
+
resultado += ` subgraph ${metodo.nomeMetodo}_${this.nomeClasse}["Método: ${metodo.nomeMetodo}()"]\n`;
|
|
24459
|
+
resultado += ` direction TB\n`;
|
|
24460
|
+
for (const vertice of metodo.vertices) {
|
|
24461
|
+
const textoVertice = vertice.paraTexto();
|
|
24462
|
+
resultado += ' ' + textoVertice;
|
|
24029
24463
|
}
|
|
24464
|
+
resultado += ` end\n`;
|
|
24030
24465
|
}
|
|
24031
24466
|
resultado += ` end\n`;
|
|
24032
24467
|
return resultado;
|
|
@@ -24034,7 +24469,7 @@ class SubgrafoClasse {
|
|
|
24034
24469
|
}
|
|
24035
24470
|
exports.SubgrafoClasse = SubgrafoClasse;
|
|
24036
24471
|
|
|
24037
|
-
},{}],
|
|
24472
|
+
},{}],224:[function(require,module,exports){
|
|
24038
24473
|
"use strict";
|
|
24039
24474
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24040
24475
|
exports.SubgrafoFuncao = void 0;
|
|
@@ -24049,6 +24484,23 @@ class SubgrafoFuncao {
|
|
|
24049
24484
|
}
|
|
24050
24485
|
exports.SubgrafoFuncao = SubgrafoFuncao;
|
|
24051
24486
|
|
|
24487
|
+
},{}],225:[function(require,module,exports){
|
|
24488
|
+
"use strict";
|
|
24489
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24490
|
+
exports.SubgrafoMetodo = void 0;
|
|
24491
|
+
class SubgrafoMetodo {
|
|
24492
|
+
constructor(nomeMetodo, nomeClasse, linha, arestaInicial, arestaFinal, ehConstrutor = false) {
|
|
24493
|
+
this.nomeMetodo = nomeMetodo;
|
|
24494
|
+
this.nomeClasse = nomeClasse;
|
|
24495
|
+
this.linha = linha;
|
|
24496
|
+
this.vertices = [];
|
|
24497
|
+
this.arestaInicial = arestaInicial;
|
|
24498
|
+
this.arestaFinal = arestaFinal;
|
|
24499
|
+
this.ehConstrutor = ehConstrutor;
|
|
24500
|
+
}
|
|
24501
|
+
}
|
|
24502
|
+
exports.SubgrafoMetodo = SubgrafoMetodo;
|
|
24503
|
+
|
|
24052
24504
|
},{}],226:[function(require,module,exports){
|
|
24053
24505
|
"use strict";
|
|
24054
24506
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -25306,7 +25758,7 @@ __decorate([
|
|
|
25306
25758
|
Decorators_1.Override
|
|
25307
25759
|
], Python3Lexer.prototype, "nextToken", null);
|
|
25308
25760
|
|
|
25309
|
-
},{"./python3-parser":228,"antlr4ts/CommonToken":
|
|
25761
|
+
},{"./python3-parser":228,"antlr4ts/CommonToken":250,"antlr4ts/Decorators":254,"antlr4ts/Lexer":262,"antlr4ts/Token":279,"antlr4ts/VocabularyImpl":285,"antlr4ts/atn/ATNDeserializer":291,"antlr4ts/atn/LexerATNSimulator":312,"antlr4ts/misc/Utils":373}],228:[function(require,module,exports){
|
|
25310
25762
|
"use strict";
|
|
25311
25763
|
// Generated from fontes\tradutores\python\Python3.g4 by ANTLR 4.9.0-SNAPSHOT
|
|
25312
25764
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -36553,7 +37005,7 @@ class Yield_argContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
36553
37005
|
}
|
|
36554
37006
|
exports.Yield_argContext = Yield_argContext;
|
|
36555
37007
|
|
|
36556
|
-
},{"antlr4ts/FailedPredicateException":
|
|
37008
|
+
},{"antlr4ts/FailedPredicateException":258,"antlr4ts/NoViableAltException":266,"antlr4ts/Parser":267,"antlr4ts/ParserRuleContext":270,"antlr4ts/RecognitionException":273,"antlr4ts/Token":279,"antlr4ts/VocabularyImpl":285,"antlr4ts/atn/ATN":287,"antlr4ts/atn/ATNDeserializer":291,"antlr4ts/atn/ParserATNSimulator":328,"antlr4ts/misc/Utils":373}],229:[function(require,module,exports){
|
|
36557
37009
|
"use strict";
|
|
36558
37010
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36559
37011
|
exports.TradutorAssemblyARM = void 0;
|
|
@@ -39434,8 +39886,7 @@ class TradutorMermaidJs {
|
|
|
39434
39886
|
};
|
|
39435
39887
|
this.dicionarioDeclaracoes = {
|
|
39436
39888
|
Bloco: this.traduzirDeclaracaoBloco.bind(this),
|
|
39437
|
-
|
|
39438
|
-
Classe: () => { throw new Error("Fluxogramas de classes ainda não é suportado."); },
|
|
39889
|
+
Classe: this.traduzirDeclaracaoClasse.bind(this),
|
|
39439
39890
|
Comentario: () => '',
|
|
39440
39891
|
Const: this.traduzirDeclaracaoConst.bind(this),
|
|
39441
39892
|
Enquanto: this.traduzirDeclaracaoEnquanto.bind(this),
|
|
@@ -39443,10 +39894,10 @@ class TradutorMermaidJs {
|
|
|
39443
39894
|
Expressao: this.traduzirDeclaracaoExpressao.bind(this),
|
|
39444
39895
|
Escreva: this.traduzirDeclaracaoEscreva.bind(this),
|
|
39445
39896
|
Fazer: this.traduzirDeclaracaoFazerEnquanto.bind(this),
|
|
39446
|
-
|
|
39447
|
-
FuncaoDeclaracao: () => { throw new Error("Fluxogramas de funções ainda não é suportado."); },
|
|
39897
|
+
FuncaoDeclaracao: this.traduzirDeclaracaoFuncao.bind(this),
|
|
39448
39898
|
Para: this.traduzirDeclaracaoPara.bind(this),
|
|
39449
39899
|
ParaCada: this.traduzirDeclaracaoParaCada.bind(this),
|
|
39900
|
+
Retorna: this.traduzirDeclaracaoRetorna.bind(this),
|
|
39450
39901
|
Se: this.traduzirDeclaracaoSe.bind(this),
|
|
39451
39902
|
Var: this.traduzirDeclaracaoVar.bind(this),
|
|
39452
39903
|
};
|
|
@@ -39499,6 +39950,32 @@ class TradutorMermaidJs {
|
|
|
39499
39950
|
}
|
|
39500
39951
|
return texto;
|
|
39501
39952
|
}
|
|
39953
|
+
/**
|
|
39954
|
+
* Traduz uma declaração de Expressao que contém uma chamada de função,
|
|
39955
|
+
* criando os vértices necessários para conectar ao subgrafo da função.
|
|
39956
|
+
*/
|
|
39957
|
+
traduzirChamadaFuncao(declaracaoExpressao, chamada) {
|
|
39958
|
+
// Verifica se é uma chamada a uma função conhecida
|
|
39959
|
+
if (chamada.entidadeChamada.constructor.name === 'Variavel') {
|
|
39960
|
+
const variavel = chamada.entidadeChamada;
|
|
39961
|
+
const nomeFuncao = variavel.simbolo.lexema;
|
|
39962
|
+
if (this.declaracoesFuncoes[nomeFuncao]) {
|
|
39963
|
+
const subgrafo = this.declaracoesFuncoes[nomeFuncao];
|
|
39964
|
+
let vertices = [];
|
|
39965
|
+
// Conecta do fluxo atual para a entrada da função
|
|
39966
|
+
const textoPreChamada = `Linha${declaracaoExpressao.linha}(${this.traduzirConstrutoChamada(chamada)})`;
|
|
39967
|
+
const arestaPreChamada = new mermaid_1.ArestaFluxograma(declaracaoExpressao, textoPreChamada);
|
|
39968
|
+
vertices = vertices.concat(this.logicaComumConexaoArestas(arestaPreChamada));
|
|
39969
|
+
// Conecta a pré-chamada ao início da função
|
|
39970
|
+
vertices.push(new mermaid_1.VerticeFluxograma(arestaPreChamada, subgrafo.arestaInicial));
|
|
39971
|
+
// A saída da função volta para o fluxo principal
|
|
39972
|
+
this.anteriores = [subgrafo.arestaFinal];
|
|
39973
|
+
return vertices;
|
|
39974
|
+
}
|
|
39975
|
+
}
|
|
39976
|
+
// Se não for uma função conhecida, trata como expressão normal
|
|
39977
|
+
return [];
|
|
39978
|
+
}
|
|
39502
39979
|
traduzirConstrutoDefinirValor(definirValor) {
|
|
39503
39980
|
const textoObjeto = this.dicionarioConstrutos[definirValor.objeto.constructor.name](definirValor.objeto);
|
|
39504
39981
|
const textoValor = this.dicionarioConstrutos[definirValor.valor.constructor.name](definirValor.valor);
|
|
@@ -39609,39 +40086,62 @@ class TradutorMermaidJs {
|
|
|
39609
40086
|
return vertices;
|
|
39610
40087
|
}
|
|
39611
40088
|
traduzirDeclaracaoClasse(declaracaoClasse) {
|
|
40089
|
+
var _a, _b;
|
|
39612
40090
|
const nomeClasse = declaracaoClasse.simbolo.lexema;
|
|
39613
40091
|
const superClasse = declaracaoClasse.superClasse
|
|
39614
|
-
? declaracaoClasse.superClasse.nome.lexema
|
|
40092
|
+
? (((_a = declaracaoClasse.superClasse.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) || ((_b = declaracaoClasse.superClasse.nome) === null || _b === void 0 ? void 0 : _b.lexema))
|
|
39615
40093
|
: undefined;
|
|
39616
|
-
|
|
39617
|
-
|
|
39618
|
-
|
|
40094
|
+
const linha = declaracaoClasse.linha;
|
|
40095
|
+
// Cria arestas de entrada e saída para a classe
|
|
40096
|
+
const textoInicio = `Classe${nomeClasse}Inicio[Início: Classe ${nomeClasse}]`;
|
|
40097
|
+
const arestaInicial = new mermaid_1.ArestaFluxograma(declaracaoClasse, textoInicio);
|
|
40098
|
+
const textoFim = `Classe${nomeClasse}Fim[Fim: Classe ${nomeClasse}]`;
|
|
40099
|
+
const arestaFinal = new mermaid_1.ArestaFluxograma(declaracaoClasse, textoFim);
|
|
40100
|
+
// Cria o subgrafo da classe
|
|
40101
|
+
const subgrafo = new mermaid_1.SubgrafoClasse(nomeClasse, linha, arestaInicial, arestaFinal, superClasse);
|
|
40102
|
+
// Salva o estado anterior
|
|
40103
|
+
const anterioresAntes = [...this.anteriores];
|
|
40104
|
+
// Processa métodos
|
|
39619
40105
|
if (declaracaoClasse.metodos && declaracaoClasse.metodos.length > 0) {
|
|
39620
|
-
for (const
|
|
39621
|
-
const
|
|
39622
|
-
|
|
39623
|
-
|
|
39624
|
-
|
|
39625
|
-
|
|
39626
|
-
|
|
40106
|
+
for (const metodoDeclaracao of declaracaoClasse.metodos) {
|
|
40107
|
+
const nomeMetodo = metodoDeclaracao.simbolo.lexema;
|
|
40108
|
+
const linhaMetodo = metodoDeclaracao.linha;
|
|
40109
|
+
const ehConstrutor = nomeMetodo === 'construtor' || nomeMetodo === 'iniciar';
|
|
40110
|
+
// Cria arestas de entrada e saída para o método
|
|
40111
|
+
const textoInicioMetodo = `Metodo${nomeMetodo}${nomeClasse}Inicio[Início: ${nomeMetodo}()]`;
|
|
40112
|
+
const arestaInicialMetodo = new mermaid_1.ArestaFluxograma(metodoDeclaracao, textoInicioMetodo);
|
|
40113
|
+
const textoFimMetodo = `Metodo${nomeMetodo}${nomeClasse}Fim[Fim: ${nomeMetodo}()]`;
|
|
40114
|
+
const arestaFinalMetodo = new mermaid_1.ArestaFluxograma(metodoDeclaracao, textoFimMetodo);
|
|
40115
|
+
// Cria o subgrafo do método
|
|
40116
|
+
const subgrafoMetodo = new mermaid_1.SubgrafoMetodo(nomeMetodo, nomeClasse, linhaMetodo, arestaInicialMetodo, arestaFinalMetodo, ehConstrutor);
|
|
40117
|
+
// Traduz o corpo do método
|
|
40118
|
+
this.anteriores = [arestaInicialMetodo];
|
|
40119
|
+
if (metodoDeclaracao.funcao.corpo && metodoDeclaracao.funcao.corpo.length > 0) {
|
|
40120
|
+
for (const declaracaoCorpo of metodoDeclaracao.funcao.corpo) {
|
|
40121
|
+
const verticesCorpo = this.dicionarioDeclaracoes[declaracaoCorpo.constructor.name](declaracaoCorpo);
|
|
40122
|
+
subgrafoMetodo.vertices = subgrafoMetodo.vertices.concat(verticesCorpo);
|
|
39627
40123
|
}
|
|
39628
40124
|
}
|
|
39629
|
-
|
|
39630
|
-
|
|
39631
|
-
|
|
39632
|
-
|
|
39633
|
-
|
|
39634
|
-
}
|
|
40125
|
+
// Conecta o último vértice do corpo ao fim do método
|
|
40126
|
+
if (this.anteriores.length > 0) {
|
|
40127
|
+
for (const anterior of this.anteriores) {
|
|
40128
|
+
subgrafoMetodo.vertices.push(new mermaid_1.VerticeFluxograma(anterior, arestaFinalMetodo));
|
|
40129
|
+
}
|
|
40130
|
+
}
|
|
40131
|
+
// Adiciona o método ao subgrafo da classe
|
|
40132
|
+
if (ehConstrutor) {
|
|
40133
|
+
subgrafo.construtor = subgrafoMetodo;
|
|
40134
|
+
}
|
|
40135
|
+
else {
|
|
40136
|
+
subgrafo.metodos.push(subgrafoMetodo);
|
|
40137
|
+
}
|
|
39635
40138
|
}
|
|
39636
40139
|
}
|
|
39637
|
-
//
|
|
39638
|
-
this.
|
|
39639
|
-
//
|
|
39640
|
-
|
|
39641
|
-
|
|
39642
|
-
const vertices = this.logicaComumConexaoArestas(aresta);
|
|
39643
|
-
this.anteriores.push(aresta);
|
|
39644
|
-
return vertices;
|
|
40140
|
+
// Restaura o estado anterior
|
|
40141
|
+
this.anteriores = anterioresAntes;
|
|
40142
|
+
// Armazena o subgrafo da classe
|
|
40143
|
+
this.declaracoesClasses[nomeClasse] = subgrafo;
|
|
40144
|
+
return [];
|
|
39645
40145
|
}
|
|
39646
40146
|
traduzirDeclaracaoConst(declaracaoConst) {
|
|
39647
40147
|
let texto = `Linha${declaracaoConst.linha}(variável: ${declaracaoConst.simbolo.lexema}`;
|
|
@@ -39731,6 +40231,16 @@ class TradutorMermaidJs {
|
|
|
39731
40231
|
return vertices;
|
|
39732
40232
|
}
|
|
39733
40233
|
traduzirDeclaracaoExpressao(declaracaoExpressao) {
|
|
40234
|
+
// Verifica se é uma chamada de função
|
|
40235
|
+
if (declaracaoExpressao.expressao.constructor.name === 'Chamada') {
|
|
40236
|
+
const chamada = declaracaoExpressao.expressao;
|
|
40237
|
+
const verticesChamada = this.traduzirChamadaFuncao(declaracaoExpressao, chamada);
|
|
40238
|
+
if (verticesChamada.length > 0) {
|
|
40239
|
+
return verticesChamada;
|
|
40240
|
+
}
|
|
40241
|
+
}
|
|
40242
|
+
// Se não for uma chamada de função ou não for uma função conhecida,
|
|
40243
|
+
// trata como expressão normal
|
|
39734
40244
|
let texto = `Linha${declaracaoExpressao.linha}(`;
|
|
39735
40245
|
const textoConstruto = this.dicionarioConstrutos[declaracaoExpressao.expressao.constructor.name](declaracaoExpressao.expressao);
|
|
39736
40246
|
texto += textoConstruto + ')';
|
|
@@ -39760,25 +40270,36 @@ class TradutorMermaidJs {
|
|
|
39760
40270
|
return vertices;
|
|
39761
40271
|
}
|
|
39762
40272
|
traduzirDeclaracaoFuncao(declaracaoFuncao) {
|
|
39763
|
-
|
|
39764
|
-
const
|
|
39765
|
-
|
|
39766
|
-
|
|
40273
|
+
const nomeFuncao = declaracaoFuncao.simbolo.lexema;
|
|
40274
|
+
const linha = declaracaoFuncao.linha;
|
|
40275
|
+
// Cria arestas de entrada e saída para a função
|
|
40276
|
+
const textoInicio = `Func${nomeFuncao}Inicio[Início: ${nomeFuncao}()]`;
|
|
40277
|
+
const arestaInicial = new mermaid_1.ArestaFluxograma(declaracaoFuncao, textoInicio);
|
|
40278
|
+
const textoFim = `Func${nomeFuncao}Fim[Fim: ${nomeFuncao}()]`;
|
|
40279
|
+
const arestaFinal = new mermaid_1.ArestaFluxograma(declaracaoFuncao, textoFim);
|
|
40280
|
+
// Cria o subgrafo da função
|
|
40281
|
+
const subgrafo = new mermaid_1.SubgrafoFuncao(nomeFuncao, linha, arestaInicial, arestaFinal);
|
|
40282
|
+
// Salva o estado atual de anteriores
|
|
40283
|
+
const anterioresAntes = [...this.anteriores];
|
|
40284
|
+
this.anteriores = [arestaInicial];
|
|
40285
|
+
// Processa o corpo da função
|
|
40286
|
+
if (declaracaoFuncao.funcao.corpo && declaracaoFuncao.funcao.corpo.length > 0) {
|
|
40287
|
+
for (const declaracaoCorpo of declaracaoFuncao.funcao.corpo) {
|
|
40288
|
+
const verticesCorpo = this.dicionarioDeclaracoes[declaracaoCorpo.constructor.name](declaracaoCorpo);
|
|
40289
|
+
subgrafo.vertices = subgrafo.vertices.concat(verticesCorpo);
|
|
40290
|
+
}
|
|
40291
|
+
}
|
|
40292
|
+
// Conecta o fim do corpo à aresta final
|
|
40293
|
+
if (this.anteriores.length > 0) {
|
|
40294
|
+
for (const anterior of this.anteriores) {
|
|
40295
|
+
subgrafo.vertices.push(new mermaid_1.VerticeFluxograma(anterior, arestaFinal));
|
|
40296
|
+
}
|
|
39767
40297
|
}
|
|
39768
|
-
//
|
|
39769
|
-
|
|
39770
|
-
|
|
39771
|
-
|
|
39772
|
-
|
|
39773
|
-
textoSubgrafo += `end;\n`; */
|
|
39774
|
-
// Armazena o subgraph para imprimir depois de graph TD;
|
|
39775
|
-
// this.subgrafosFuncoes.push(textoSubgrafo);
|
|
39776
|
-
// IMPORTANTE: não altera this.anteriores aqui, para a função
|
|
39777
|
-
// não entrar no fluxo principal. O fluxo principal continua
|
|
39778
|
-
// sendo só as declarações "top-level" (como a chamada em Linha4).
|
|
39779
|
-
// Também não precisa devolver vértices, porque eles já
|
|
39780
|
-
// foram adicionados em this.vertices pelos próprios tradutores
|
|
39781
|
-
// das declarações do corpo (via dicionarioDeclaracoes).
|
|
40298
|
+
// Restaura o estado anterior
|
|
40299
|
+
this.anteriores = anterioresAntes;
|
|
40300
|
+
// Armazena o subgrafo
|
|
40301
|
+
this.declaracoesFuncoes[nomeFuncao] = subgrafo;
|
|
40302
|
+
// Não adiciona ao fluxo principal
|
|
39782
40303
|
return [];
|
|
39783
40304
|
}
|
|
39784
40305
|
traduzirDeclaracaoPara(declaracaoPara) {
|
|
@@ -39874,6 +40395,17 @@ class TradutorMermaidJs {
|
|
|
39874
40395
|
this.anteriores.push(aresta);
|
|
39875
40396
|
return vertices;
|
|
39876
40397
|
}
|
|
40398
|
+
traduzirDeclaracaoRetorna(declaracaoRetorna) {
|
|
40399
|
+
let texto = `Linha${declaracaoRetorna.linha}(retorna`;
|
|
40400
|
+
if (declaracaoRetorna.valor) {
|
|
40401
|
+
texto += `: ${this.dicionarioConstrutos[declaracaoRetorna.valor.constructor.name](declaracaoRetorna.valor)}`;
|
|
40402
|
+
}
|
|
40403
|
+
texto += ')';
|
|
40404
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoRetorna, texto);
|
|
40405
|
+
const vertices = this.logicaComumConexaoArestas(aresta);
|
|
40406
|
+
this.anteriores.push(aresta);
|
|
40407
|
+
return vertices;
|
|
40408
|
+
}
|
|
39877
40409
|
/**
|
|
39878
40410
|
* Ponto de entrada para a tradução de declarações em um fluxograma
|
|
39879
40411
|
* no formato MermaidJs.
|
|
@@ -39885,13 +40417,26 @@ class TradutorMermaidJs {
|
|
|
39885
40417
|
this.vertices = [];
|
|
39886
40418
|
let resultado = 'graph TD;\n';
|
|
39887
40419
|
this.indentacaoAtual = 4;
|
|
39888
|
-
this.
|
|
40420
|
+
this.declaracoesFuncoes = {};
|
|
40421
|
+
this.declaracoesClasses = {};
|
|
39889
40422
|
for (const declaracao of declaracoes) {
|
|
39890
40423
|
this.vertices = this.vertices.concat(this.dicionarioDeclaracoes[declaracao.constructor.name](declaracao));
|
|
39891
40424
|
}
|
|
39892
|
-
|
|
39893
|
-
|
|
39894
|
-
|
|
40425
|
+
// Renderiza os subgrafos de funções
|
|
40426
|
+
if (Object.keys(this.declaracoesFuncoes).length > 0) {
|
|
40427
|
+
for (const [nomeFuncao, subgrafo] of Object.entries(this.declaracoesFuncoes)) {
|
|
40428
|
+
resultado += ` subgraph ${nomeFuncao}["Função: ${nomeFuncao}()"]\n`;
|
|
40429
|
+
// Renderiza os vértices da função
|
|
40430
|
+
for (const vertice of subgrafo.vertices) {
|
|
40431
|
+
resultado += ' ' + vertice.paraTexto();
|
|
40432
|
+
}
|
|
40433
|
+
resultado += ` end\n`;
|
|
40434
|
+
}
|
|
40435
|
+
}
|
|
40436
|
+
// Renderiza os subgrafos de classes
|
|
40437
|
+
if (Object.keys(this.declaracoesClasses).length > 0) {
|
|
40438
|
+
for (const [nomeClasse, subgrafo] of Object.entries(this.declaracoesClasses)) {
|
|
40439
|
+
resultado += subgrafo.paraTexto();
|
|
39895
40440
|
}
|
|
39896
40441
|
}
|
|
39897
40442
|
if (this.vertices.length === 0 && this.anteriores.length === 0) {
|
|
@@ -39918,7 +40463,7 @@ class TradutorMermaidJs {
|
|
|
39918
40463
|
}
|
|
39919
40464
|
exports.TradutorMermaidJs = TradutorMermaidJs;
|
|
39920
40465
|
|
|
39921
|
-
},{"../tipos-de-simbolos/delegua":212,"./mermaid":
|
|
40466
|
+
},{"../tipos-de-simbolos/delegua":212,"./mermaid":222}],235:[function(require,module,exports){
|
|
39922
40467
|
"use strict";
|
|
39923
40468
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39924
40469
|
exports.TradutorPortugolIpt = void 0;
|
|
@@ -40008,6 +40553,7 @@ class TradutorPython {
|
|
|
40008
40553
|
ComentarioComoConstruto: this.traduzirConstrutoComentario.bind(this),
|
|
40009
40554
|
DefinirValor: this.traduzirConstrutoDefinirValor.bind(this),
|
|
40010
40555
|
Dicionario: this.traduzirConstrutoDicionario.bind(this),
|
|
40556
|
+
FuncaoConstruto: this.traduzirFuncaoAnonimaParaLambda.bind(this),
|
|
40011
40557
|
Literal: this.traduzirConstrutoLiteral.bind(this),
|
|
40012
40558
|
Logico: this.traduzirConstrutoLogico.bind(this),
|
|
40013
40559
|
ReferenciaFuncao: this.traduzirConstrutoReferenciaFuncao.bind(this),
|
|
@@ -40145,9 +40691,38 @@ class TradutorPython {
|
|
|
40145
40691
|
const indice = this.dicionarioConstrutos[acessoIndiceVariavel.indice.constructor.name](acessoIndiceVariavel.indice);
|
|
40146
40692
|
return `${entidade}[${indice}]`;
|
|
40147
40693
|
}
|
|
40148
|
-
|
|
40694
|
+
/**
|
|
40695
|
+
* Traduz uma função anônima de Delégua para uma lambda do Python.
|
|
40696
|
+
* Em Delégua: funcao(x) { retorna x * 2 }
|
|
40697
|
+
* Em Python: lambda x: x * 2
|
|
40698
|
+
*
|
|
40699
|
+
* Limitação: Python lambdas suportam apenas uma expressão, então apenas funções
|
|
40700
|
+
* simples com um único retorno podem ser traduzidas adequadamente.
|
|
40701
|
+
* @param argumento O construto da função anônima
|
|
40702
|
+
* @returns String com a lambda do Python
|
|
40703
|
+
*/
|
|
40149
40704
|
traduzirFuncaoAnonimaParaLambda(argumento) {
|
|
40150
|
-
|
|
40705
|
+
if (!(argumento instanceof construtos_1.FuncaoConstruto)) {
|
|
40706
|
+
return '';
|
|
40707
|
+
}
|
|
40708
|
+
const funcao = argumento;
|
|
40709
|
+
// Extrai os nomes dos parâmetros
|
|
40710
|
+
const parametros = funcao.parametros.map(param => param.nome.lexema).join(', ');
|
|
40711
|
+
// Python lambdas suportam apenas uma expressão
|
|
40712
|
+
// Assumimos que a função tem um corpo simples com uma declaração de retorno
|
|
40713
|
+
let expressao = '';
|
|
40714
|
+
if (funcao.corpo.length > 0) {
|
|
40715
|
+
const primeiraDeclaracao = funcao.corpo[0];
|
|
40716
|
+
// Se for uma declaração de retorno, extraímos a expressão
|
|
40717
|
+
if (primeiraDeclaracao.constructor.name === 'Retorna') {
|
|
40718
|
+
const retorna = primeiraDeclaracao;
|
|
40719
|
+
if (retorna.valor) {
|
|
40720
|
+
expressao = this.dicionarioConstrutos[retorna.valor.constructor.name](retorna.valor);
|
|
40721
|
+
}
|
|
40722
|
+
}
|
|
40723
|
+
}
|
|
40724
|
+
// Retorna a lambda formatada
|
|
40725
|
+
return `lambda ${parametros}: ${expressao}`;
|
|
40151
40726
|
}
|
|
40152
40727
|
traduzirAcessoMetodoVetor(objeto, nomeMetodo, argumentos) {
|
|
40153
40728
|
const objetoResolvido = this.dicionarioConstrutos[objeto.constructor.name](objeto);
|
|
@@ -40678,7 +41253,6 @@ class TradutorReversoJavaScript {
|
|
|
40678
41253
|
return operador;
|
|
40679
41254
|
}
|
|
40680
41255
|
}
|
|
40681
|
-
//TODO: @Samuel
|
|
40682
41256
|
traduzirFuncoesNativas(metodo) {
|
|
40683
41257
|
switch (metodo.toLowerCase()) {
|
|
40684
41258
|
case 'concat':
|
|
@@ -40864,7 +41438,6 @@ class TradutorReversoJavaScript {
|
|
|
40864
41438
|
resultado += this.logicaComumBlocoEscopo(declaracao);
|
|
40865
41439
|
return resultado;
|
|
40866
41440
|
}
|
|
40867
|
-
//TODO: Refatorar esse método. @Samuel
|
|
40868
41441
|
traduzirDeclaracaoClasse(declaracao) {
|
|
40869
41442
|
let resultado = `classe ${declaracao.id.name} `;
|
|
40870
41443
|
if (declaracao.superClass) {
|
|
@@ -41106,7 +41679,7 @@ class TradutorReversoPython {
|
|
|
41106
41679
|
}
|
|
41107
41680
|
exports.TradutorReversoPython = TradutorReversoPython;
|
|
41108
41681
|
|
|
41109
|
-
},{"./python/python3-lexer":227,"./python/python3-parser":228,"antlr4ts":
|
|
41682
|
+
},{"./python/python3-lexer":227,"./python/python3-parser":228,"antlr4ts":356,"antlr4ts/tree/ParseTreeWalker":375}],239:[function(require,module,exports){
|
|
41110
41683
|
"use strict";
|
|
41111
41684
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41112
41685
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -41701,6 +42274,694 @@ class TradutorReversoTenda {
|
|
|
41701
42274
|
exports.TradutorReversoTenda = TradutorReversoTenda;
|
|
41702
42275
|
|
|
41703
42276
|
},{"../construtos":62,"../tipos-de-simbolos/tenda":219}],240:[function(require,module,exports){
|
|
42277
|
+
"use strict";
|
|
42278
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42279
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42280
|
+
};
|
|
42281
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42282
|
+
exports.TradutorRuby = void 0;
|
|
42283
|
+
const construtos_1 = require("../construtos");
|
|
42284
|
+
const declaracoes_1 = require("../declaracoes");
|
|
42285
|
+
const delegua_1 = __importDefault(require("../tipos-de-simbolos/delegua"));
|
|
42286
|
+
class TradutorRuby {
|
|
42287
|
+
constructor() {
|
|
42288
|
+
this.indentacao = 0;
|
|
42289
|
+
this.classesConhecidas = [];
|
|
42290
|
+
this.dicionarioConstrutos = {
|
|
42291
|
+
AcessoMetodo: this.traduzirConstrutoAcessoMetodo.bind(this),
|
|
42292
|
+
AcessoMetodoOuPropriedade: this.traduzirConstrutoAcessoMetodoOuPropriedade.bind(this),
|
|
42293
|
+
AcessoPropriedade: this.traduzirConstrutoAcessoPropriedade.bind(this),
|
|
42294
|
+
AcessoIndiceVariavel: this.traduzirConstrutoAcessoIndiceVariavel.bind(this),
|
|
42295
|
+
Agrupamento: this.traduzirConstrutoAgrupamento.bind(this),
|
|
42296
|
+
ArgumentoReferenciaFuncao: this.traduzirConstrutoArgumentoReferenciaFuncao.bind(this),
|
|
42297
|
+
AtribuicaoPorIndice: this.traduzirConstrutoAtribuicaoPorIndice.bind(this),
|
|
42298
|
+
Atribuir: this.traduzirConstrutoAtribuir.bind(this),
|
|
42299
|
+
Binario: this.traduzirConstrutoBinario.bind(this),
|
|
42300
|
+
Chamada: this.traduzirConstrutoChamada.bind(this),
|
|
42301
|
+
ComentarioComoConstruto: this.traduzirConstrutoComentario.bind(this),
|
|
42302
|
+
DefinirValor: this.traduzirConstrutoDefinirValor.bind(this),
|
|
42303
|
+
Dicionario: this.traduzirConstrutoDicionario.bind(this),
|
|
42304
|
+
FuncaoConstruto: this.traduzirFuncaoAnonimaParaLambda.bind(this),
|
|
42305
|
+
Literal: this.traduzirConstrutoLiteral.bind(this),
|
|
42306
|
+
Logico: this.traduzirConstrutoLogico.bind(this),
|
|
42307
|
+
ReferenciaFuncao: this.traduzirConstrutoReferenciaFuncao.bind(this),
|
|
42308
|
+
Separador: this.traduzirConstrutoSeparador.bind(this),
|
|
42309
|
+
SeTernario: this.traduzirConstrutoSeTernario.bind(this),
|
|
42310
|
+
Unario: this.traduzirConstrutoUnario.bind(this),
|
|
42311
|
+
Variavel: this.traduzirConstrutoVariavel.bind(this),
|
|
42312
|
+
Vetor: this.traduzirConstrutoVetor.bind(this),
|
|
42313
|
+
};
|
|
42314
|
+
this.dicionarioDeclaracoes = {
|
|
42315
|
+
Bloco: this.traduzirDeclaracaoBloco.bind(this),
|
|
42316
|
+
Classe: this.traduzirDeclaracaoClasse.bind(this),
|
|
42317
|
+
Comentario: this.traduzirConstrutoComentario.bind(this),
|
|
42318
|
+
Const: this.traduzirDeclaracaoConst.bind(this),
|
|
42319
|
+
Continua: () => 'next',
|
|
42320
|
+
Enquanto: this.traduzirDeclaracaoEnquanto.bind(this),
|
|
42321
|
+
Escreva: this.traduzirDeclaracaoEscreva.bind(this),
|
|
42322
|
+
Expressao: this.traduzirDeclaracaoExpressao.bind(this),
|
|
42323
|
+
FuncaoDeclaracao: this.traduzirDeclaracaoFuncao.bind(this),
|
|
42324
|
+
Leia: this.traduzirDeclaracaoLeia.bind(this),
|
|
42325
|
+
Para: this.traduzirDeclaracaoPara.bind(this),
|
|
42326
|
+
ParaCada: this.traduzirDeclaracaoParaCada.bind(this),
|
|
42327
|
+
Retorna: this.traduzirDeclaracaoRetorna.bind(this),
|
|
42328
|
+
Se: this.traduzirDeclaracaoSe.bind(this),
|
|
42329
|
+
Sustar: () => 'break',
|
|
42330
|
+
Tente: this.traduzirDeclaracaoTente.bind(this),
|
|
42331
|
+
Var: this.traduzirDeclaracaoVar.bind(this),
|
|
42332
|
+
};
|
|
42333
|
+
}
|
|
42334
|
+
traduzirSimboloOperador(operador) {
|
|
42335
|
+
switch (operador.tipo) {
|
|
42336
|
+
case delegua_1.default.ADICAO:
|
|
42337
|
+
return '+';
|
|
42338
|
+
case delegua_1.default.BIT_AND:
|
|
42339
|
+
return '&';
|
|
42340
|
+
case delegua_1.default.BIT_OR:
|
|
42341
|
+
return '|';
|
|
42342
|
+
case delegua_1.default.BIT_XOR:
|
|
42343
|
+
return '^';
|
|
42344
|
+
case delegua_1.default.BIT_NOT:
|
|
42345
|
+
return '~';
|
|
42346
|
+
case delegua_1.default.DIFERENTE:
|
|
42347
|
+
return '!=';
|
|
42348
|
+
case delegua_1.default.DIVISAO:
|
|
42349
|
+
return '/';
|
|
42350
|
+
case delegua_1.default.E:
|
|
42351
|
+
return '&&';
|
|
42352
|
+
case delegua_1.default.EXPONENCIACAO:
|
|
42353
|
+
return '**';
|
|
42354
|
+
case delegua_1.default.IGUAL:
|
|
42355
|
+
return '=';
|
|
42356
|
+
case delegua_1.default.IGUAL_IGUAL:
|
|
42357
|
+
return '==';
|
|
42358
|
+
case delegua_1.default.MAIOR:
|
|
42359
|
+
return '>';
|
|
42360
|
+
case delegua_1.default.MAIOR_IGUAL:
|
|
42361
|
+
return '>=';
|
|
42362
|
+
case delegua_1.default.MENOR:
|
|
42363
|
+
return '<';
|
|
42364
|
+
case delegua_1.default.MENOR_IGUAL:
|
|
42365
|
+
return '<=';
|
|
42366
|
+
case delegua_1.default.MODULO:
|
|
42367
|
+
return '%';
|
|
42368
|
+
case delegua_1.default.MULTIPLICACAO:
|
|
42369
|
+
return '*';
|
|
42370
|
+
case delegua_1.default.OU:
|
|
42371
|
+
return '||';
|
|
42372
|
+
case delegua_1.default.SUBTRACAO:
|
|
42373
|
+
return '-';
|
|
42374
|
+
}
|
|
42375
|
+
}
|
|
42376
|
+
traduzirFuncaoOuMetodo(nomeMetodo, objetoResolvido, argumentos) {
|
|
42377
|
+
const argumentosResolvidos = [];
|
|
42378
|
+
for (const argumento of argumentos) {
|
|
42379
|
+
const argumentoResolvido = this.dicionarioConstrutos[argumento.constructor.name](argumento);
|
|
42380
|
+
argumentosResolvidos.push(argumentoResolvido);
|
|
42381
|
+
}
|
|
42382
|
+
let textoArgumentos = argumentosResolvidos.reduce((atual, proximo) => (atual += proximo + ', '), '');
|
|
42383
|
+
textoArgumentos = textoArgumentos.slice(0, -2);
|
|
42384
|
+
switch (nomeMetodo) {
|
|
42385
|
+
case 'adicionar':
|
|
42386
|
+
case 'empilhar':
|
|
42387
|
+
return `${objetoResolvido}.push(${textoArgumentos})`;
|
|
42388
|
+
case 'fatiar':
|
|
42389
|
+
return `${objetoResolvido}[${argumentos[0]}..${argumentos[1]}]`;
|
|
42390
|
+
case 'inclui':
|
|
42391
|
+
return `${objetoResolvido}.include?(${argumentosResolvidos[0]})`;
|
|
42392
|
+
case 'inverter':
|
|
42393
|
+
return `${objetoResolvido}.reverse`;
|
|
42394
|
+
case 'juntar':
|
|
42395
|
+
return `${objetoResolvido}.join(${argumentosResolvidos[0]})`;
|
|
42396
|
+
case 'maiusculo':
|
|
42397
|
+
return `${objetoResolvido}.upcase`;
|
|
42398
|
+
case 'mapear':
|
|
42399
|
+
return `${objetoResolvido}.map(&${this.traduzirFuncaoAnonimaParaLambda(argumentos[0])})`;
|
|
42400
|
+
case 'minusculo':
|
|
42401
|
+
return `${objetoResolvido}.downcase`;
|
|
42402
|
+
case 'ordenar':
|
|
42403
|
+
return `${objetoResolvido}.sort!`;
|
|
42404
|
+
case 'remover':
|
|
42405
|
+
return `${objetoResolvido}.delete_at(${argumentosResolvidos[0]})`;
|
|
42406
|
+
case 'removerPrimeiro':
|
|
42407
|
+
return `${objetoResolvido}.shift`;
|
|
42408
|
+
case 'removerUltimo':
|
|
42409
|
+
return `${objetoResolvido}.pop`;
|
|
42410
|
+
case 'somar':
|
|
42411
|
+
return `${objetoResolvido}.sum`;
|
|
42412
|
+
case 'tamanho':
|
|
42413
|
+
return `${objetoResolvido}.length`;
|
|
42414
|
+
}
|
|
42415
|
+
return `${objetoResolvido}.${nomeMetodo}(${textoArgumentos})`;
|
|
42416
|
+
}
|
|
42417
|
+
logicaComumBlocoEscopo(declaracoes) {
|
|
42418
|
+
let resultado = '';
|
|
42419
|
+
this.indentacao += 4;
|
|
42420
|
+
if (typeof declaracoes[Symbol.iterator] === 'function') {
|
|
42421
|
+
for (const declaracaoOuConstruto of declaracoes) {
|
|
42422
|
+
resultado += ' '.repeat(this.indentacao);
|
|
42423
|
+
const nomeConstrutor = declaracaoOuConstruto.constructor.name;
|
|
42424
|
+
if (this.dicionarioConstrutos.hasOwnProperty(nomeConstrutor)) {
|
|
42425
|
+
resultado += this.dicionarioConstrutos[nomeConstrutor](declaracaoOuConstruto);
|
|
42426
|
+
}
|
|
42427
|
+
else {
|
|
42428
|
+
resultado += this.dicionarioDeclaracoes[nomeConstrutor](declaracaoOuConstruto);
|
|
42429
|
+
}
|
|
42430
|
+
resultado += '\n';
|
|
42431
|
+
}
|
|
42432
|
+
}
|
|
42433
|
+
this.indentacao -= 4;
|
|
42434
|
+
return resultado;
|
|
42435
|
+
}
|
|
42436
|
+
traduzirConstrutoAcessoIndiceVariavel(acessoIndiceVariavel) {
|
|
42437
|
+
const entidade = this.dicionarioConstrutos[acessoIndiceVariavel.entidadeChamada.constructor.name](acessoIndiceVariavel.entidadeChamada);
|
|
42438
|
+
const indice = this.dicionarioConstrutos[acessoIndiceVariavel.indice.constructor.name](acessoIndiceVariavel.indice);
|
|
42439
|
+
return `${entidade}[${indice}]`;
|
|
42440
|
+
}
|
|
42441
|
+
/**
|
|
42442
|
+
* Traduz uma função anônima de Delégua para um lambda do Ruby.
|
|
42443
|
+
* Em Delégua: funcao(x) { retorna x * 2 }
|
|
42444
|
+
* Em Ruby: lambda { |x| x * 2 }
|
|
42445
|
+
*
|
|
42446
|
+
* @param argumento O construto da função anônima
|
|
42447
|
+
* @returns String com o lambda do Ruby
|
|
42448
|
+
*/
|
|
42449
|
+
traduzirFuncaoAnonimaParaLambda(argumento) {
|
|
42450
|
+
if (!(argumento instanceof construtos_1.FuncaoConstruto)) {
|
|
42451
|
+
return '';
|
|
42452
|
+
}
|
|
42453
|
+
const funcao = argumento;
|
|
42454
|
+
// Extrai os nomes dos parâmetros
|
|
42455
|
+
const parametros = funcao.parametros.map(param => param.nome.lexema).join(', ');
|
|
42456
|
+
// Assumimos que a função tem um corpo simples com uma declaração de retorno
|
|
42457
|
+
let expressao = '';
|
|
42458
|
+
if (funcao.corpo.length > 0) {
|
|
42459
|
+
const primeiraDeclaracao = funcao.corpo[0];
|
|
42460
|
+
// Se for uma declaração de retorno, extraímos a expressão
|
|
42461
|
+
if (primeiraDeclaracao.constructor.name === 'Retorna') {
|
|
42462
|
+
const retorna = primeiraDeclaracao;
|
|
42463
|
+
if (retorna.valor) {
|
|
42464
|
+
expressao = this.dicionarioConstrutos[retorna.valor.constructor.name](retorna.valor);
|
|
42465
|
+
}
|
|
42466
|
+
}
|
|
42467
|
+
}
|
|
42468
|
+
// Retorna o lambda formatado
|
|
42469
|
+
const parametrosFormatados = parametros ? `|${parametros}| ` : '';
|
|
42470
|
+
return `lambda { ${parametrosFormatados}${expressao} }`;
|
|
42471
|
+
}
|
|
42472
|
+
traduzirAcessoMetodoVetor(objeto, nomeMetodo, argumentos) {
|
|
42473
|
+
const objetoResolvido = this.dicionarioConstrutos[objeto.constructor.name](objeto);
|
|
42474
|
+
const argumentosResolvidos = [];
|
|
42475
|
+
for (const argumento of argumentos) {
|
|
42476
|
+
const argumentoResolvido = this.dicionarioConstrutos[argumento.constructor.name](argumento);
|
|
42477
|
+
argumentosResolvidos.push(argumentoResolvido);
|
|
42478
|
+
}
|
|
42479
|
+
switch (nomeMetodo) {
|
|
42480
|
+
case 'adicionar':
|
|
42481
|
+
case 'empilhar':
|
|
42482
|
+
let textoArgumentos = argumentosResolvidos.reduce((atual, proximo) => (atual += proximo + ', '), '');
|
|
42483
|
+
textoArgumentos = textoArgumentos.slice(0, -2);
|
|
42484
|
+
return `${objetoResolvido}.push(${textoArgumentos})`;
|
|
42485
|
+
case 'fatiar':
|
|
42486
|
+
return `${objetoResolvido}[${argumentos[0]}..${argumentos[1]}]`;
|
|
42487
|
+
case 'inclui':
|
|
42488
|
+
return `${objetoResolvido}.include?(${argumentos[0]})`;
|
|
42489
|
+
case 'inverter':
|
|
42490
|
+
return `${objetoResolvido}.reverse`;
|
|
42491
|
+
case 'juntar':
|
|
42492
|
+
return `${objetoResolvido}.join(${argumentos[0]})`;
|
|
42493
|
+
case 'mapear':
|
|
42494
|
+
return `${objetoResolvido}.map(&${this.traduzirFuncaoAnonimaParaLambda(argumentos[0])})`;
|
|
42495
|
+
case 'ordenar':
|
|
42496
|
+
return `${objetoResolvido}.sort!`;
|
|
42497
|
+
case 'remover':
|
|
42498
|
+
return `${objetoResolvido}.delete_at(${argumentos[0]})`;
|
|
42499
|
+
case 'removerPrimeiro':
|
|
42500
|
+
return `${objetoResolvido}.shift`;
|
|
42501
|
+
case 'removerUltimo':
|
|
42502
|
+
return `${objetoResolvido}.pop`;
|
|
42503
|
+
case 'somar':
|
|
42504
|
+
return `${objetoResolvido}.sum`;
|
|
42505
|
+
case 'tamanho':
|
|
42506
|
+
return `${objetoResolvido}.length`;
|
|
42507
|
+
}
|
|
42508
|
+
}
|
|
42509
|
+
traduzirConstrutoAcessoMetodo(acessoMetodo, argumentos) {
|
|
42510
|
+
switch (acessoMetodo.objeto.constructor.name) {
|
|
42511
|
+
case 'Isto':
|
|
42512
|
+
return `self.${acessoMetodo.nomeMetodo}`;
|
|
42513
|
+
case 'Variavel':
|
|
42514
|
+
let objetoVariavel = acessoMetodo.objeto;
|
|
42515
|
+
return this.traduzirFuncaoOuMetodo(acessoMetodo.nomeMetodo, objetoVariavel.simbolo.lexema, argumentos);
|
|
42516
|
+
case 'Vetor':
|
|
42517
|
+
return this.traduzirAcessoMetodoVetor(acessoMetodo.objeto, acessoMetodo.nomeMetodo, argumentos);
|
|
42518
|
+
default:
|
|
42519
|
+
const objetoResolvido = this.dicionarioConstrutos[acessoMetodo.objeto.constructor.name](acessoMetodo.objeto);
|
|
42520
|
+
return `${objetoResolvido}.${acessoMetodo.nomeMetodo}`;
|
|
42521
|
+
}
|
|
42522
|
+
}
|
|
42523
|
+
traduzirConstrutoAcessoMetodoOuPropriedade(acessoMetodo, argumentos) {
|
|
42524
|
+
if (acessoMetodo.objeto instanceof construtos_1.Variavel) {
|
|
42525
|
+
let objetoVariavel = acessoMetodo.objeto;
|
|
42526
|
+
return this.traduzirFuncaoOuMetodo(acessoMetodo.simbolo.lexema, objetoVariavel.simbolo.lexema, argumentos);
|
|
42527
|
+
}
|
|
42528
|
+
return `@${acessoMetodo.simbolo.lexema}`;
|
|
42529
|
+
}
|
|
42530
|
+
traduzirConstrutoAcessoPropriedade(acessoPropriedade, argumentos) {
|
|
42531
|
+
if (acessoPropriedade.objeto instanceof construtos_1.Variavel) {
|
|
42532
|
+
let objetoVariavel = acessoPropriedade.objeto;
|
|
42533
|
+
return this.traduzirFuncaoOuMetodo(objetoVariavel.simbolo.lexema, acessoPropriedade.nomePropriedade, argumentos);
|
|
42534
|
+
}
|
|
42535
|
+
return `@${acessoPropriedade.nomePropriedade}`;
|
|
42536
|
+
}
|
|
42537
|
+
traduzirConstrutoAgrupamento(agrupamento) {
|
|
42538
|
+
return this.dicionarioConstrutos[agrupamento.constructor.name](agrupamento.expressao || agrupamento);
|
|
42539
|
+
}
|
|
42540
|
+
traduzirConstrutoArgumentoReferenciaFuncao(argumentoReferenciaFuncao, argumentos) {
|
|
42541
|
+
const argumentosResolvidos = [];
|
|
42542
|
+
const argumentosValidados = argumentos || [];
|
|
42543
|
+
for (const argumento of argumentosValidados) {
|
|
42544
|
+
const argumentoResolvido = this.dicionarioConstrutos[argumento.constructor.name](argumento);
|
|
42545
|
+
argumentosResolvidos.push(argumentoResolvido);
|
|
42546
|
+
}
|
|
42547
|
+
let textoArgumentos = argumentosResolvidos.reduce((atual, proximo) => (atual += proximo + ', '), '');
|
|
42548
|
+
textoArgumentos = textoArgumentos.slice(0, -2);
|
|
42549
|
+
return `${argumentoReferenciaFuncao.simboloFuncao.lexema}(${textoArgumentos})`;
|
|
42550
|
+
}
|
|
42551
|
+
traduzirConstrutoAtribuicaoPorIndice(atribuicaoPorIndice) {
|
|
42552
|
+
const objeto = this.dicionarioConstrutos[atribuicaoPorIndice.objeto.constructor.name](atribuicaoPorIndice.objeto);
|
|
42553
|
+
const indice = this.dicionarioConstrutos[atribuicaoPorIndice.indice.constructor.name](atribuicaoPorIndice.indice);
|
|
42554
|
+
const valor = this.dicionarioConstrutos[atribuicaoPorIndice.valor.constructor.name](atribuicaoPorIndice.valor);
|
|
42555
|
+
return `${objeto}[${indice}] = ${valor}`;
|
|
42556
|
+
}
|
|
42557
|
+
traduzirConstrutoAtribuir(atribuir) {
|
|
42558
|
+
var _a;
|
|
42559
|
+
let resultado = this.dicionarioConstrutos[atribuir.alvo.constructor.name](atribuir.alvo);
|
|
42560
|
+
const operador = ((_a = atribuir.simboloOperador) === null || _a === void 0 ? void 0 : _a.lexema) || '=';
|
|
42561
|
+
// Em Delégua, atribuições com operações embutidas devolvem um construto `Binario` no valor
|
|
42562
|
+
// por várias razões, sendo a mais importante delas a lógica de interpretação.
|
|
42563
|
+
let valorResolvido = '';
|
|
42564
|
+
if (atribuir.simboloOperador && atribuir.valor.constructor === construtos_1.Binario) {
|
|
42565
|
+
valorResolvido = this.dicionarioConstrutos[atribuir.valor.direita.constructor.name](atribuir.valor.direita);
|
|
42566
|
+
}
|
|
42567
|
+
else {
|
|
42568
|
+
valorResolvido = this.dicionarioConstrutos[atribuir.valor.constructor.name](atribuir.valor);
|
|
42569
|
+
}
|
|
42570
|
+
resultado += ` ${operador} ` + valorResolvido;
|
|
42571
|
+
return resultado;
|
|
42572
|
+
}
|
|
42573
|
+
traduzirConstrutoBinario(binario) {
|
|
42574
|
+
let resultado = '';
|
|
42575
|
+
const valorEsquerdo = this.dicionarioConstrutos[binario.esquerda.constructor.name](binario.esquerda);
|
|
42576
|
+
if (binario.esquerda.constructor.name === 'Agrupamento')
|
|
42577
|
+
resultado += '(' + valorEsquerdo + ')';
|
|
42578
|
+
else
|
|
42579
|
+
resultado += valorEsquerdo;
|
|
42580
|
+
let operador = this.traduzirSimboloOperador(binario.operador);
|
|
42581
|
+
resultado += ` ${operador} `;
|
|
42582
|
+
const valorDireito = this.dicionarioConstrutos[binario.direita.constructor.name](binario.direita);
|
|
42583
|
+
if (binario.direita.constructor.name === 'Agrupamento')
|
|
42584
|
+
resultado += '(' + valorDireito + ')';
|
|
42585
|
+
else
|
|
42586
|
+
resultado += valorDireito;
|
|
42587
|
+
return resultado;
|
|
42588
|
+
}
|
|
42589
|
+
traduzirConstrutoChamada(chamada) {
|
|
42590
|
+
return `${this.dicionarioConstrutos[chamada.entidadeChamada.constructor.name](chamada.entidadeChamada, chamada.argumentos)}`;
|
|
42591
|
+
}
|
|
42592
|
+
traduzirConstrutoComentario(comentario) {
|
|
42593
|
+
let resultado = '';
|
|
42594
|
+
if (comentario.multilinha) {
|
|
42595
|
+
resultado += `=begin\n`;
|
|
42596
|
+
for (let linhaComentario of comentario.conteudo) {
|
|
42597
|
+
resultado += `${linhaComentario}\n`;
|
|
42598
|
+
}
|
|
42599
|
+
resultado += `=end`;
|
|
42600
|
+
}
|
|
42601
|
+
else {
|
|
42602
|
+
resultado += `# ${comentario.conteudo}`;
|
|
42603
|
+
}
|
|
42604
|
+
return resultado;
|
|
42605
|
+
}
|
|
42606
|
+
traduzirConstrutoDefinirValor(definirValor) {
|
|
42607
|
+
let resultado = '';
|
|
42608
|
+
if (definirValor.objeto instanceof construtos_1.Isto) {
|
|
42609
|
+
resultado = '@' + definirValor.nome.lexema + ' = ';
|
|
42610
|
+
}
|
|
42611
|
+
resultado += definirValor.valor.simbolo.lexema;
|
|
42612
|
+
return resultado;
|
|
42613
|
+
}
|
|
42614
|
+
traduzirConstrutoDicionario(dicionario) {
|
|
42615
|
+
let resultado = `{${dicionario.chaves.length > 0 ? '\n' : ''}`;
|
|
42616
|
+
for (let indice = 0; indice < dicionario.chaves.length; indice++) {
|
|
42617
|
+
resultado += ' '.repeat(this.indentacao + 4);
|
|
42618
|
+
if (dicionario.esSpread && dicionario.esSpread[indice]) {
|
|
42619
|
+
resultado += '**';
|
|
42620
|
+
const valor = dicionario.valores[indice];
|
|
42621
|
+
resultado += `${this.dicionarioConstrutos[valor.constructor.name](valor)},\n`;
|
|
42622
|
+
}
|
|
42623
|
+
else {
|
|
42624
|
+
const chave = dicionario.chaves[indice];
|
|
42625
|
+
resultado += `${this.dicionarioConstrutos[chave.constructor.name](chave)} => `;
|
|
42626
|
+
const valor = dicionario.valores[indice];
|
|
42627
|
+
resultado += `${this.dicionarioConstrutos[valor.constructor.name](valor)},\n`;
|
|
42628
|
+
}
|
|
42629
|
+
}
|
|
42630
|
+
resultado += '}';
|
|
42631
|
+
return resultado;
|
|
42632
|
+
}
|
|
42633
|
+
traduzirConstrutoLiteral(literal) {
|
|
42634
|
+
if (typeof literal.valor === 'string')
|
|
42635
|
+
return `'${literal.valor}'`;
|
|
42636
|
+
if (typeof literal.valor === 'boolean') {
|
|
42637
|
+
return literal.valor ? 'true' : 'false';
|
|
42638
|
+
}
|
|
42639
|
+
if (typeof literal.valor === 'number') {
|
|
42640
|
+
return String(literal.valor);
|
|
42641
|
+
}
|
|
42642
|
+
if (!literal.valor)
|
|
42643
|
+
return 'nil';
|
|
42644
|
+
return String(literal.valor);
|
|
42645
|
+
}
|
|
42646
|
+
traduzirConstrutoLogico(logico) {
|
|
42647
|
+
const direita = this.dicionarioConstrutos[logico.direita.constructor.name](logico.direita);
|
|
42648
|
+
const operador = this.traduzirSimboloOperador(logico.operador);
|
|
42649
|
+
const esquerda = this.dicionarioConstrutos[logico.esquerda.constructor.name](logico.esquerda);
|
|
42650
|
+
return `${esquerda} ${operador} ${direita}`;
|
|
42651
|
+
}
|
|
42652
|
+
traduzirConstrutoReferenciaFuncao(referenciaFuncao, argumentos) {
|
|
42653
|
+
const argumentosResolvidos = [];
|
|
42654
|
+
const argumentosValidados = argumentos || [];
|
|
42655
|
+
for (const argumento of argumentosValidados) {
|
|
42656
|
+
const argumentoResolvido = this.dicionarioConstrutos[argumento.constructor.name](argumento);
|
|
42657
|
+
argumentosResolvidos.push(argumentoResolvido);
|
|
42658
|
+
}
|
|
42659
|
+
let textoArgumentos = argumentosResolvidos.reduce((atual, proximo) => (atual += proximo + ', '), '');
|
|
42660
|
+
textoArgumentos = textoArgumentos.slice(0, -2);
|
|
42661
|
+
return `${referenciaFuncao.simboloFuncao.lexema}(${textoArgumentos})`;
|
|
42662
|
+
}
|
|
42663
|
+
traduzirConstrutoSeparador(separador) {
|
|
42664
|
+
return `${separador.conteudo} `;
|
|
42665
|
+
}
|
|
42666
|
+
traduzirConstrutoSeTernario(seTernario) {
|
|
42667
|
+
const condicao = this.dicionarioConstrutos[seTernario.condicao.constructor.name](seTernario.condicao);
|
|
42668
|
+
const expressaoSe = this.dicionarioConstrutos[seTernario.expressaoSe.constructor.name](seTernario.expressaoSe);
|
|
42669
|
+
const expressaoSenao = this.dicionarioConstrutos[seTernario.expressaoSenao.constructor.name](seTernario.expressaoSenao);
|
|
42670
|
+
return `${condicao} ? ${expressaoSe} : ${expressaoSenao}`;
|
|
42671
|
+
}
|
|
42672
|
+
traduzirConstrutoUnario(unario) {
|
|
42673
|
+
const operador = this.traduzirSimboloOperador(unario.operador);
|
|
42674
|
+
const operando = this.dicionarioConstrutos[unario.operando.constructor.name](unario.operando);
|
|
42675
|
+
switch (unario.incidenciaOperador) {
|
|
42676
|
+
case 'ANTES':
|
|
42677
|
+
return `${operador}${operando}`;
|
|
42678
|
+
case 'DEPOIS':
|
|
42679
|
+
return `${operando}${operador}`;
|
|
42680
|
+
}
|
|
42681
|
+
}
|
|
42682
|
+
traduzirConstrutoVariavel(variavel, argumentos) {
|
|
42683
|
+
const argumentosResolvidos = [];
|
|
42684
|
+
const argumentosValidados = argumentos || [];
|
|
42685
|
+
for (const argumento of argumentosValidados) {
|
|
42686
|
+
const argumentoResolvido = this.dicionarioConstrutos[argumento.constructor.name](argumento);
|
|
42687
|
+
argumentosResolvidos.push(argumentoResolvido);
|
|
42688
|
+
}
|
|
42689
|
+
let textoArgumentos = argumentosResolvidos.reduce((atual, proximo) => (atual += proximo + ', '), '');
|
|
42690
|
+
textoArgumentos = textoArgumentos.slice(0, -2);
|
|
42691
|
+
switch (variavel.simbolo.lexema) {
|
|
42692
|
+
case 'texto':
|
|
42693
|
+
return `(${textoArgumentos}).to_s`;
|
|
42694
|
+
default:
|
|
42695
|
+
if (argumentosValidados.length === 0 &&
|
|
42696
|
+
!this.classesConhecidas.includes(variavel.simbolo.lexema)) {
|
|
42697
|
+
return `${variavel.simbolo.lexema}`;
|
|
42698
|
+
}
|
|
42699
|
+
return `${variavel.simbolo.lexema}(${textoArgumentos})`;
|
|
42700
|
+
}
|
|
42701
|
+
}
|
|
42702
|
+
traduzirConstrutoVetor(vetor) {
|
|
42703
|
+
if (!vetor.valores.length) {
|
|
42704
|
+
return '[]';
|
|
42705
|
+
}
|
|
42706
|
+
let resultado = '[';
|
|
42707
|
+
for (let valor of vetor.valores) {
|
|
42708
|
+
resultado += `${this.dicionarioConstrutos[valor.constructor.name](valor)}`;
|
|
42709
|
+
}
|
|
42710
|
+
resultado += ']';
|
|
42711
|
+
return resultado;
|
|
42712
|
+
}
|
|
42713
|
+
logicaTraducaoMetodoClasse(metodoClasse) {
|
|
42714
|
+
this.indentacao += 4;
|
|
42715
|
+
let resultado = ' '.repeat(this.indentacao);
|
|
42716
|
+
let temContrutor = metodoClasse.simbolo.lexema === 'construtor';
|
|
42717
|
+
resultado += temContrutor ? 'def initialize(' : 'def ' + metodoClasse.simbolo.lexema + '(';
|
|
42718
|
+
for (let parametro of metodoClasse.funcao.parametros) {
|
|
42719
|
+
resultado += parametro.nome.lexema + ', ';
|
|
42720
|
+
}
|
|
42721
|
+
if (metodoClasse.funcao.parametros.length > 0) {
|
|
42722
|
+
resultado = resultado.slice(0, -2);
|
|
42723
|
+
}
|
|
42724
|
+
resultado += ')\n';
|
|
42725
|
+
if (metodoClasse.funcao.corpo.length === 0) {
|
|
42726
|
+
this.indentacao -= 4;
|
|
42727
|
+
resultado += ' '.repeat(this.indentacao + 4) + 'end\n';
|
|
42728
|
+
return resultado;
|
|
42729
|
+
}
|
|
42730
|
+
resultado += this.logicaComumBlocoEscopo(metodoClasse.funcao.corpo);
|
|
42731
|
+
resultado += ' '.repeat(this.indentacao + 4) + 'end\n';
|
|
42732
|
+
this.indentacao -= 4;
|
|
42733
|
+
return resultado;
|
|
42734
|
+
}
|
|
42735
|
+
traduzirDeclaracaoBloco(declaracaoBloco) {
|
|
42736
|
+
return this.logicaComumBlocoEscopo(declaracaoBloco.declaracoes);
|
|
42737
|
+
}
|
|
42738
|
+
traduzirDeclaracaoClasse(declaracaoClasse) {
|
|
42739
|
+
let resultado = 'class ';
|
|
42740
|
+
if (declaracaoClasse.superClasse)
|
|
42741
|
+
resultado += `${declaracaoClasse.simbolo.lexema} < ${declaracaoClasse.superClasse.simbolo.lexema}\n`;
|
|
42742
|
+
else
|
|
42743
|
+
resultado += declaracaoClasse.simbolo.lexema + '\n';
|
|
42744
|
+
if (declaracaoClasse.metodos.length === 0) {
|
|
42745
|
+
this.classesConhecidas.push(declaracaoClasse.simbolo.lexema);
|
|
42746
|
+
return (resultado += 'end\n');
|
|
42747
|
+
}
|
|
42748
|
+
for (let metodo of declaracaoClasse.metodos) {
|
|
42749
|
+
resultado += this.logicaTraducaoMetodoClasse(metodo);
|
|
42750
|
+
}
|
|
42751
|
+
resultado += 'end\n';
|
|
42752
|
+
this.classesConhecidas.push(declaracaoClasse.simbolo.lexema);
|
|
42753
|
+
return resultado;
|
|
42754
|
+
}
|
|
42755
|
+
traduzirDeclaracaoConst(declaracaoConst) {
|
|
42756
|
+
let resultado = declaracaoConst.simbolo.lexema.toUpperCase() + ' = ';
|
|
42757
|
+
const inicializador = declaracaoConst.inicializador;
|
|
42758
|
+
if (inicializador) {
|
|
42759
|
+
if (this.dicionarioConstrutos[inicializador.constructor.name]) {
|
|
42760
|
+
resultado += this.dicionarioConstrutos[declaracaoConst.inicializador.constructor.name](declaracaoConst.inicializador);
|
|
42761
|
+
}
|
|
42762
|
+
else {
|
|
42763
|
+
resultado += this.dicionarioDeclaracoes[declaracaoConst.inicializador.constructor.name](declaracaoConst.inicializador);
|
|
42764
|
+
}
|
|
42765
|
+
}
|
|
42766
|
+
else {
|
|
42767
|
+
resultado += 'nil';
|
|
42768
|
+
}
|
|
42769
|
+
return resultado;
|
|
42770
|
+
}
|
|
42771
|
+
traduzirDeclaracaoEnquanto(declaracaoEnquanto) {
|
|
42772
|
+
let resultado = ' '.repeat(this.indentacao) + 'while ';
|
|
42773
|
+
const condicao = this.dicionarioConstrutos[declaracaoEnquanto.condicao.constructor.name](declaracaoEnquanto.condicao);
|
|
42774
|
+
resultado += condicao + '\n';
|
|
42775
|
+
resultado += this.dicionarioDeclaracoes[declaracaoEnquanto.corpo.constructor.name](declaracaoEnquanto.corpo);
|
|
42776
|
+
resultado += ' '.repeat(this.indentacao) + 'end\n';
|
|
42777
|
+
return resultado;
|
|
42778
|
+
}
|
|
42779
|
+
traduzirDeclaracaoEscreva(declaracaoEscreva) {
|
|
42780
|
+
let resultado = 'puts(';
|
|
42781
|
+
for (const argumento of declaracaoEscreva.argumentos) {
|
|
42782
|
+
const valor = this.dicionarioConstrutos[argumento.constructor.name](argumento);
|
|
42783
|
+
resultado += valor + ', ';
|
|
42784
|
+
}
|
|
42785
|
+
resultado = resultado.slice(0, -2);
|
|
42786
|
+
resultado += ')';
|
|
42787
|
+
return resultado;
|
|
42788
|
+
}
|
|
42789
|
+
traduzirDeclaracaoExpressao(declaracaoExpressao) {
|
|
42790
|
+
return this.dicionarioConstrutos[declaracaoExpressao.expressao.constructor.name](declaracaoExpressao.expressao);
|
|
42791
|
+
}
|
|
42792
|
+
traduzirDeclaracaoFuncao(declaracaoFuncao) {
|
|
42793
|
+
let resultado = 'def ';
|
|
42794
|
+
resultado += declaracaoFuncao.simbolo.lexema + '(';
|
|
42795
|
+
for (const parametro of declaracaoFuncao.funcao.parametros) {
|
|
42796
|
+
resultado += parametro.nome.lexema + ', ';
|
|
42797
|
+
}
|
|
42798
|
+
if (declaracaoFuncao.funcao.parametros.length > 0) {
|
|
42799
|
+
resultado = resultado.slice(0, -2);
|
|
42800
|
+
}
|
|
42801
|
+
resultado += ')\n';
|
|
42802
|
+
resultado += this.logicaComumBlocoEscopo(declaracaoFuncao.funcao.corpo);
|
|
42803
|
+
resultado += 'end\n';
|
|
42804
|
+
return resultado;
|
|
42805
|
+
}
|
|
42806
|
+
traduzirDeclaracaoLeia(declaracaoLeia) {
|
|
42807
|
+
let resultado = 'gets';
|
|
42808
|
+
if (declaracaoLeia.argumentos.length > 0) {
|
|
42809
|
+
resultado = 'print(';
|
|
42810
|
+
for (const argumento of declaracaoLeia.argumentos) {
|
|
42811
|
+
const valor = this.dicionarioConstrutos[argumento.constructor.name](argumento);
|
|
42812
|
+
resultado += valor + ', ';
|
|
42813
|
+
}
|
|
42814
|
+
resultado = resultado.slice(0, -2);
|
|
42815
|
+
resultado += '); gets.chomp';
|
|
42816
|
+
}
|
|
42817
|
+
else {
|
|
42818
|
+
resultado += '.chomp';
|
|
42819
|
+
}
|
|
42820
|
+
return resultado;
|
|
42821
|
+
}
|
|
42822
|
+
traduzirDeclaracaoPara(declaracaoPara) {
|
|
42823
|
+
let resultado = '';
|
|
42824
|
+
// Em uma declaração `Para` em Delégua, são obrigatórios a condição e o incremento.
|
|
42825
|
+
if (declaracaoPara.inicializador) {
|
|
42826
|
+
if (Array.isArray(declaracaoPara.inicializador)) {
|
|
42827
|
+
for (const declaracaoInicializador of declaracaoPara.inicializador) {
|
|
42828
|
+
resultado +=
|
|
42829
|
+
this.dicionarioDeclaracoes[declaracaoInicializador.constructor.name](declaracaoInicializador) + `\n`;
|
|
42830
|
+
}
|
|
42831
|
+
}
|
|
42832
|
+
else {
|
|
42833
|
+
resultado +=
|
|
42834
|
+
this.dicionarioDeclaracoes[declaracaoPara.inicializador.constructor.name](declaracaoPara.inicializador) + `\n`;
|
|
42835
|
+
}
|
|
42836
|
+
}
|
|
42837
|
+
const condicao = this.dicionarioConstrutos[declaracaoPara.condicao.constructor.name](declaracaoPara.condicao);
|
|
42838
|
+
resultado += ' '.repeat(this.indentacao) + `while ${condicao}\n`;
|
|
42839
|
+
// O incremento passa a ser a última instrução do bloco.
|
|
42840
|
+
declaracaoPara.corpo.declaracoes.push(new declaracoes_1.Expressao(declaracaoPara.incrementar));
|
|
42841
|
+
resultado += this.dicionarioDeclaracoes[declaracaoPara.corpo.constructor.name](declaracaoPara.corpo);
|
|
42842
|
+
resultado += ' '.repeat(this.indentacao) + 'end\n';
|
|
42843
|
+
return resultado;
|
|
42844
|
+
}
|
|
42845
|
+
traduzirDeclaracaoParaCada(declaracaoParaCada) {
|
|
42846
|
+
const variavelIteracao = this.dicionarioConstrutos[declaracaoParaCada.variavelIteracao.constructor.name](declaracaoParaCada.variavelIteracao);
|
|
42847
|
+
const vetorOuDicionario = this.dicionarioConstrutos[declaracaoParaCada.vetorOuDicionario.constructor.name](declaracaoParaCada.vetorOuDicionario);
|
|
42848
|
+
let resultado = `${vetorOuDicionario}.each do |${variavelIteracao}|\n`;
|
|
42849
|
+
resultado += this.dicionarioDeclaracoes[declaracaoParaCada.corpo.constructor.name](declaracaoParaCada.corpo);
|
|
42850
|
+
resultado += ' '.repeat(this.indentacao) + 'end\n';
|
|
42851
|
+
return resultado;
|
|
42852
|
+
}
|
|
42853
|
+
traduzirDeclaracaoRetorna(declaracaoRetorna) {
|
|
42854
|
+
let resultado = 'return ';
|
|
42855
|
+
const nomeConstrutor = declaracaoRetorna.valor.constructor.name;
|
|
42856
|
+
return (resultado += this.dicionarioConstrutos[nomeConstrutor](declaracaoRetorna === null || declaracaoRetorna === void 0 ? void 0 : declaracaoRetorna.valor));
|
|
42857
|
+
}
|
|
42858
|
+
traduzirDeclaracaoSe(declaracaoSe, iniciarComIf = true) {
|
|
42859
|
+
let resultado = '';
|
|
42860
|
+
if (iniciarComIf) {
|
|
42861
|
+
resultado += 'if ';
|
|
42862
|
+
}
|
|
42863
|
+
else {
|
|
42864
|
+
resultado += 'elsif ';
|
|
42865
|
+
}
|
|
42866
|
+
const condicao = this.dicionarioConstrutos[declaracaoSe.condicao.constructor.name](declaracaoSe.condicao);
|
|
42867
|
+
resultado += condicao;
|
|
42868
|
+
resultado += '\n';
|
|
42869
|
+
resultado += this.dicionarioDeclaracoes[declaracaoSe.caminhoEntao.constructor.name](declaracaoSe.caminhoEntao);
|
|
42870
|
+
if (declaracaoSe.caminhoSenao) {
|
|
42871
|
+
resultado += ' '.repeat(this.indentacao);
|
|
42872
|
+
const senao = declaracaoSe.caminhoSenao;
|
|
42873
|
+
if (senao === null || senao === void 0 ? void 0 : senao.caminhoEntao) {
|
|
42874
|
+
resultado += 'elsif ';
|
|
42875
|
+
resultado += this.dicionarioConstrutos[senao.condicao.constructor.name](senao.condicao, false);
|
|
42876
|
+
resultado += '\n';
|
|
42877
|
+
resultado += this.dicionarioDeclaracoes[senao.caminhoEntao.constructor.name](senao.caminhoEntao);
|
|
42878
|
+
resultado += ' '.repeat(this.indentacao);
|
|
42879
|
+
if (senao === null || senao === void 0 ? void 0 : senao.caminhoSenao) {
|
|
42880
|
+
if (senao.caminhoSenao instanceof declaracoes_1.Bloco) {
|
|
42881
|
+
resultado += 'else\n';
|
|
42882
|
+
resultado += this.dicionarioDeclaracoes[senao.caminhoSenao.constructor.name](senao.caminhoSenao, false);
|
|
42883
|
+
resultado += ' '.repeat(this.indentacao) + 'end\n';
|
|
42884
|
+
return resultado;
|
|
42885
|
+
}
|
|
42886
|
+
resultado += this.dicionarioDeclaracoes[senao.caminhoSenao.constructor.name](senao.caminhoSenao, false);
|
|
42887
|
+
return resultado;
|
|
42888
|
+
}
|
|
42889
|
+
}
|
|
42890
|
+
resultado += 'else\n';
|
|
42891
|
+
resultado += this.dicionarioDeclaracoes[declaracaoSe.caminhoSenao.constructor.name](declaracaoSe.caminhoSenao);
|
|
42892
|
+
}
|
|
42893
|
+
resultado += ' '.repeat(this.indentacao) + 'end\n';
|
|
42894
|
+
return resultado;
|
|
42895
|
+
}
|
|
42896
|
+
traduzirDeclaracaoTente(declaracaoTente) {
|
|
42897
|
+
let resultado = 'begin\n';
|
|
42898
|
+
this.indentacao += 4;
|
|
42899
|
+
resultado += ' '.repeat(this.indentacao);
|
|
42900
|
+
for (let condicao of declaracaoTente.caminhoTente) {
|
|
42901
|
+
resultado += this.dicionarioDeclaracoes[condicao.constructor.name](condicao) + '\n';
|
|
42902
|
+
resultado += ' '.repeat(this.indentacao);
|
|
42903
|
+
}
|
|
42904
|
+
if (declaracaoTente.caminhoPegue !== null) {
|
|
42905
|
+
resultado += '\nrescue\n';
|
|
42906
|
+
resultado += ' '.repeat(this.indentacao);
|
|
42907
|
+
if (Array.isArray(declaracaoTente.caminhoPegue)) {
|
|
42908
|
+
for (let declaracao of declaracaoTente.caminhoPegue) {
|
|
42909
|
+
resultado +=
|
|
42910
|
+
this.dicionarioDeclaracoes[declaracao.constructor.name](declaracao) + '\n';
|
|
42911
|
+
}
|
|
42912
|
+
}
|
|
42913
|
+
else {
|
|
42914
|
+
for (let corpo of declaracaoTente.caminhoPegue.corpo) {
|
|
42915
|
+
resultado += this.dicionarioDeclaracoes[corpo.constructor.name](corpo) + '\n';
|
|
42916
|
+
}
|
|
42917
|
+
}
|
|
42918
|
+
resultado += ' '.repeat(this.indentacao);
|
|
42919
|
+
}
|
|
42920
|
+
if (declaracaoTente.caminhoFinalmente !== null) {
|
|
42921
|
+
resultado += '\nensure\n';
|
|
42922
|
+
resultado += ' '.repeat(this.indentacao);
|
|
42923
|
+
for (let finalmente of declaracaoTente.caminhoFinalmente) {
|
|
42924
|
+
resultado +=
|
|
42925
|
+
this.dicionarioDeclaracoes[finalmente.constructor.name](finalmente) + '\n';
|
|
42926
|
+
}
|
|
42927
|
+
}
|
|
42928
|
+
this.indentacao -= 4;
|
|
42929
|
+
resultado += 'end\n';
|
|
42930
|
+
return resultado;
|
|
42931
|
+
}
|
|
42932
|
+
traduzirDeclaracaoVar(declaracaoVar) {
|
|
42933
|
+
let resultado = declaracaoVar.simbolo.lexema + ' = ';
|
|
42934
|
+
const inicializador = declaracaoVar.inicializador;
|
|
42935
|
+
if (inicializador) {
|
|
42936
|
+
if (inicializador.constructor.name in this.dicionarioConstrutos) {
|
|
42937
|
+
resultado += this.dicionarioConstrutos[declaracaoVar.inicializador.constructor.name](declaracaoVar.inicializador);
|
|
42938
|
+
}
|
|
42939
|
+
else {
|
|
42940
|
+
resultado += this.dicionarioDeclaracoes[declaracaoVar.inicializador.constructor.name](declaracaoVar.inicializador);
|
|
42941
|
+
}
|
|
42942
|
+
}
|
|
42943
|
+
else {
|
|
42944
|
+
resultado += 'nil';
|
|
42945
|
+
}
|
|
42946
|
+
return resultado;
|
|
42947
|
+
}
|
|
42948
|
+
traduzir(declaracoes) {
|
|
42949
|
+
let resultado = '';
|
|
42950
|
+
this.classesConhecidas = [];
|
|
42951
|
+
try {
|
|
42952
|
+
for (const declaracao of declaracoes) {
|
|
42953
|
+
resultado += `${this.dicionarioDeclaracoes[declaracao.constructor.name](declaracao)}`;
|
|
42954
|
+
}
|
|
42955
|
+
}
|
|
42956
|
+
catch (erro) {
|
|
42957
|
+
console.error(`Erro em tradução para Ruby: ${erro}`);
|
|
42958
|
+
}
|
|
42959
|
+
return resultado.replace(/\n{2,}/g, '\n');
|
|
42960
|
+
}
|
|
42961
|
+
}
|
|
42962
|
+
exports.TradutorRuby = TradutorRuby;
|
|
42963
|
+
|
|
42964
|
+
},{"../construtos":62,"../declaracoes":109,"../tipos-de-simbolos/delegua":212}],241:[function(require,module,exports){
|
|
41704
42965
|
"use strict";
|
|
41705
42966
|
/*!
|
|
41706
42967
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -41708,7 +42969,7 @@ exports.TradutorReversoTenda = TradutorReversoTenda;
|
|
|
41708
42969
|
*/
|
|
41709
42970
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41710
42971
|
|
|
41711
|
-
},{}],
|
|
42972
|
+
},{}],242:[function(require,module,exports){
|
|
41712
42973
|
"use strict";
|
|
41713
42974
|
/*!
|
|
41714
42975
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -41716,7 +42977,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41716
42977
|
*/
|
|
41717
42978
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41718
42979
|
|
|
41719
|
-
},{}],
|
|
42980
|
+
},{}],243:[function(require,module,exports){
|
|
41720
42981
|
"use strict";
|
|
41721
42982
|
/*!
|
|
41722
42983
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -41878,7 +43139,7 @@ __decorate([
|
|
|
41878
43139
|
], ANTLRInputStream.prototype, "toString", null);
|
|
41879
43140
|
exports.ANTLRInputStream = ANTLRInputStream;
|
|
41880
43141
|
|
|
41881
|
-
},{"./Decorators":
|
|
43142
|
+
},{"./Decorators":254,"./IntStream":260,"assert":397}],244:[function(require,module,exports){
|
|
41882
43143
|
"use strict";
|
|
41883
43144
|
/*!
|
|
41884
43145
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -41961,7 +43222,7 @@ __decorate([
|
|
|
41961
43222
|
], BailErrorStrategy.prototype, "sync", null);
|
|
41962
43223
|
exports.BailErrorStrategy = BailErrorStrategy;
|
|
41963
43224
|
|
|
41964
|
-
},{"./Decorators":
|
|
43225
|
+
},{"./Decorators":254,"./DefaultErrorStrategy":255,"./InputMismatchException":259,"./misc/ParseCancellationException":371}],245:[function(require,module,exports){
|
|
41965
43226
|
"use strict";
|
|
41966
43227
|
/*!
|
|
41967
43228
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42451,7 +43712,7 @@ BufferedTokenStream = __decorate([
|
|
|
42451
43712
|
], BufferedTokenStream);
|
|
42452
43713
|
exports.BufferedTokenStream = BufferedTokenStream;
|
|
42453
43714
|
|
|
42454
|
-
},{"./CommonToken":
|
|
43715
|
+
},{"./CommonToken":250,"./Decorators":254,"./Lexer":262,"./Token":279,"./misc/Interval":366,"assert":397}],246:[function(require,module,exports){
|
|
42455
43716
|
"use strict";
|
|
42456
43717
|
/*!
|
|
42457
43718
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42459,7 +43720,7 @@ exports.BufferedTokenStream = BufferedTokenStream;
|
|
|
42459
43720
|
*/
|
|
42460
43721
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42461
43722
|
|
|
42462
|
-
},{}],
|
|
43723
|
+
},{}],247:[function(require,module,exports){
|
|
42463
43724
|
"use strict";
|
|
42464
43725
|
/*!
|
|
42465
43726
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42593,7 +43854,7 @@ var CharStreams;
|
|
|
42593
43854
|
// }
|
|
42594
43855
|
})(CharStreams = exports.CharStreams || (exports.CharStreams = {}));
|
|
42595
43856
|
|
|
42596
|
-
},{"./CodePointBuffer":
|
|
43857
|
+
},{"./CodePointBuffer":248,"./CodePointCharStream":249,"./IntStream":260}],248:[function(require,module,exports){
|
|
42597
43858
|
"use strict";
|
|
42598
43859
|
/*!
|
|
42599
43860
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42828,7 +44089,7 @@ exports.CodePointBuffer = CodePointBuffer;
|
|
|
42828
44089
|
CodePointBuffer.Builder = Builder;
|
|
42829
44090
|
})(CodePointBuffer = exports.CodePointBuffer || (exports.CodePointBuffer = {}));
|
|
42830
44091
|
|
|
42831
|
-
},{"./misc/Character":
|
|
44092
|
+
},{"./misc/Character":362,"assert":397}],249:[function(require,module,exports){
|
|
42832
44093
|
"use strict";
|
|
42833
44094
|
/*!
|
|
42834
44095
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42978,7 +44239,7 @@ __decorate([
|
|
|
42978
44239
|
], CodePointCharStream.prototype, "getText", null);
|
|
42979
44240
|
exports.CodePointCharStream = CodePointCharStream;
|
|
42980
44241
|
|
|
42981
|
-
},{"./Decorators":
|
|
44242
|
+
},{"./Decorators":254,"./IntStream":260,"./misc/Interval":366,"assert":397}],250:[function(require,module,exports){
|
|
42982
44243
|
"use strict";
|
|
42983
44244
|
/*!
|
|
42984
44245
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -43208,7 +44469,7 @@ CommonToken = __decorate([
|
|
|
43208
44469
|
], CommonToken);
|
|
43209
44470
|
exports.CommonToken = CommonToken;
|
|
43210
44471
|
|
|
43211
|
-
},{"./Decorators":
|
|
44472
|
+
},{"./Decorators":254,"./Token":279,"./misc/Interval":366}],251:[function(require,module,exports){
|
|
43212
44473
|
"use strict";
|
|
43213
44474
|
/*!
|
|
43214
44475
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -43272,7 +44533,7 @@ exports.CommonTokenFactory = CommonTokenFactory;
|
|
|
43272
44533
|
CommonTokenFactory.DEFAULT = new CommonTokenFactory();
|
|
43273
44534
|
})(CommonTokenFactory = exports.CommonTokenFactory || (exports.CommonTokenFactory = {}));
|
|
43274
44535
|
|
|
43275
|
-
},{"./CommonToken":
|
|
44536
|
+
},{"./CommonToken":250,"./Decorators":254,"./misc/Interval":366}],252:[function(require,module,exports){
|
|
43276
44537
|
"use strict";
|
|
43277
44538
|
/*!
|
|
43278
44539
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -43399,7 +44660,7 @@ CommonTokenStream = __decorate([
|
|
|
43399
44660
|
], CommonTokenStream);
|
|
43400
44661
|
exports.CommonTokenStream = CommonTokenStream;
|
|
43401
44662
|
|
|
43402
|
-
},{"./BufferedTokenStream":
|
|
44663
|
+
},{"./BufferedTokenStream":245,"./Decorators":254,"./Token":279}],253:[function(require,module,exports){
|
|
43403
44664
|
"use strict";
|
|
43404
44665
|
/*!
|
|
43405
44666
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -43433,7 +44694,7 @@ exports.ConsoleErrorListener = ConsoleErrorListener;
|
|
|
43433
44694
|
*/
|
|
43434
44695
|
ConsoleErrorListener.INSTANCE = new ConsoleErrorListener();
|
|
43435
44696
|
|
|
43436
|
-
},{}],
|
|
44697
|
+
},{}],254:[function(require,module,exports){
|
|
43437
44698
|
"use strict";
|
|
43438
44699
|
/*!
|
|
43439
44700
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -43460,7 +44721,7 @@ function SuppressWarnings(options) {
|
|
|
43460
44721
|
}
|
|
43461
44722
|
exports.SuppressWarnings = SuppressWarnings;
|
|
43462
44723
|
|
|
43463
|
-
},{}],
|
|
44724
|
+
},{}],255:[function(require,module,exports){
|
|
43464
44725
|
"use strict";
|
|
43465
44726
|
/*!
|
|
43466
44727
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -44274,7 +45535,7 @@ __decorate([
|
|
|
44274
45535
|
], DefaultErrorStrategy.prototype, "consumeUntil", null);
|
|
44275
45536
|
exports.DefaultErrorStrategy = DefaultErrorStrategy;
|
|
44276
45537
|
|
|
44277
|
-
},{"./Decorators":
|
|
45538
|
+
},{"./Decorators":254,"./FailedPredicateException":258,"./InputMismatchException":259,"./NoViableAltException":266,"./Token":279,"./atn/ATNState":293,"./atn/ATNStateType":294,"./atn/PredictionContext":334,"./misc/IntervalSet":367}],256:[function(require,module,exports){
|
|
44278
45539
|
"use strict";
|
|
44279
45540
|
/*!
|
|
44280
45541
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -44350,7 +45611,7 @@ var Dependents;
|
|
|
44350
45611
|
Dependents[Dependents["FOLLOWING"] = 9] = "FOLLOWING";
|
|
44351
45612
|
})(Dependents = exports.Dependents || (exports.Dependents = {}));
|
|
44352
45613
|
|
|
44353
|
-
},{}],
|
|
45614
|
+
},{}],257:[function(require,module,exports){
|
|
44354
45615
|
"use strict";
|
|
44355
45616
|
/*!
|
|
44356
45617
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -44498,7 +45759,7 @@ __decorate([
|
|
|
44498
45759
|
], DiagnosticErrorListener.prototype, "getConflictingAlts", null);
|
|
44499
45760
|
exports.DiagnosticErrorListener = DiagnosticErrorListener;
|
|
44500
45761
|
|
|
44501
|
-
},{"./Decorators":
|
|
45762
|
+
},{"./Decorators":254,"./misc/BitSet":361,"./misc/Interval":366}],258:[function(require,module,exports){
|
|
44502
45763
|
"use strict";
|
|
44503
45764
|
/*!
|
|
44504
45765
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -44563,7 +45824,7 @@ FailedPredicateException = __decorate([
|
|
|
44563
45824
|
], FailedPredicateException);
|
|
44564
45825
|
exports.FailedPredicateException = FailedPredicateException;
|
|
44565
45826
|
|
|
44566
|
-
},{"./Decorators":
|
|
45827
|
+
},{"./Decorators":254,"./RecognitionException":273,"./atn/PredicateTransition":333}],259:[function(require,module,exports){
|
|
44567
45828
|
"use strict";
|
|
44568
45829
|
/*!
|
|
44569
45830
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -44603,7 +45864,7 @@ InputMismatchException = __decorate([
|
|
|
44603
45864
|
], InputMismatchException);
|
|
44604
45865
|
exports.InputMismatchException = InputMismatchException;
|
|
44605
45866
|
|
|
44606
|
-
},{"./Decorators":
|
|
45867
|
+
},{"./Decorators":254,"./RecognitionException":273}],260:[function(require,module,exports){
|
|
44607
45868
|
"use strict";
|
|
44608
45869
|
/*!
|
|
44609
45870
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -44626,7 +45887,7 @@ var IntStream;
|
|
|
44626
45887
|
IntStream.UNKNOWN_SOURCE_NAME = "<unknown>";
|
|
44627
45888
|
})(IntStream = exports.IntStream || (exports.IntStream = {}));
|
|
44628
45889
|
|
|
44629
|
-
},{}],
|
|
45890
|
+
},{}],261:[function(require,module,exports){
|
|
44630
45891
|
"use strict";
|
|
44631
45892
|
/*!
|
|
44632
45893
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -44673,7 +45934,7 @@ __decorate([
|
|
|
44673
45934
|
], InterpreterRuleContext.prototype, "ruleIndex", null);
|
|
44674
45935
|
exports.InterpreterRuleContext = InterpreterRuleContext;
|
|
44675
45936
|
|
|
44676
|
-
},{"./Decorators":
|
|
45937
|
+
},{"./Decorators":254,"./ParserRuleContext":270}],262:[function(require,module,exports){
|
|
44677
45938
|
"use strict";
|
|
44678
45939
|
/*!
|
|
44679
45940
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45009,7 +46270,7 @@ __decorate([
|
|
|
45009
46270
|
], Lexer.prototype, "charPositionInLine", null);
|
|
45010
46271
|
exports.Lexer = Lexer;
|
|
45011
46272
|
|
|
45012
|
-
},{"./CommonTokenFactory":
|
|
46273
|
+
},{"./CommonTokenFactory":251,"./Decorators":254,"./IntStream":260,"./LexerNoViableAltException":264,"./Recognizer":274,"./Token":279,"./atn/LexerATNSimulator":312,"./misc/IntegerStack":365,"./misc/Interval":366}],263:[function(require,module,exports){
|
|
45013
46274
|
"use strict";
|
|
45014
46275
|
/*!
|
|
45015
46276
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45089,7 +46350,7 @@ LexerInterpreter = __decorate([
|
|
|
45089
46350
|
], LexerInterpreter);
|
|
45090
46351
|
exports.LexerInterpreter = LexerInterpreter;
|
|
45091
46352
|
|
|
45092
|
-
},{"./Decorators":
|
|
46353
|
+
},{"./Decorators":254,"./Lexer":262,"./atn/LexerATNSimulator":312}],264:[function(require,module,exports){
|
|
45093
46354
|
"use strict";
|
|
45094
46355
|
/*!
|
|
45095
46356
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45146,7 +46407,7 @@ LexerNoViableAltException = __decorate([
|
|
|
45146
46407
|
], LexerNoViableAltException);
|
|
45147
46408
|
exports.LexerNoViableAltException = LexerNoViableAltException;
|
|
45148
46409
|
|
|
45149
|
-
},{"./Decorators":
|
|
46410
|
+
},{"./Decorators":254,"./RecognitionException":273,"./misc/Interval":366,"./misc/Utils":373}],265:[function(require,module,exports){
|
|
45150
46411
|
"use strict";
|
|
45151
46412
|
/*!
|
|
45152
46413
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45356,7 +46617,7 @@ ListTokenSource = __decorate([
|
|
|
45356
46617
|
], ListTokenSource);
|
|
45357
46618
|
exports.ListTokenSource = ListTokenSource;
|
|
45358
46619
|
|
|
45359
|
-
},{"./CommonTokenFactory":
|
|
46620
|
+
},{"./CommonTokenFactory":251,"./Decorators":254,"./Token":279}],266:[function(require,module,exports){
|
|
45360
46621
|
"use strict";
|
|
45361
46622
|
/*!
|
|
45362
46623
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45411,7 +46672,7 @@ __decorate([
|
|
|
45411
46672
|
], NoViableAltException.prototype, "_startToken", void 0);
|
|
45412
46673
|
exports.NoViableAltException = NoViableAltException;
|
|
45413
46674
|
|
|
45414
|
-
},{"./Decorators":
|
|
46675
|
+
},{"./Decorators":254,"./Parser":267,"./RecognitionException":273}],267:[function(require,module,exports){
|
|
45415
46676
|
(function (process){(function (){
|
|
45416
46677
|
"use strict";
|
|
45417
46678
|
/*!
|
|
@@ -46257,7 +47518,7 @@ __decorate([
|
|
|
46257
47518
|
exports.Parser = Parser;
|
|
46258
47519
|
|
|
46259
47520
|
}).call(this)}).call(this,require('_process'))
|
|
46260
|
-
},{"./Decorators":
|
|
47521
|
+
},{"./Decorators":254,"./DefaultErrorStrategy":255,"./Lexer":262,"./ProxyParserErrorListener":272,"./Recognizer":274,"./Token":279,"./atn/ATNDeserializationOptions":290,"./atn/ATNDeserializer":291,"./atn/ParseInfo":327,"./atn/ParserATNSimulator":328,"./atn/ProfilingATNSimulator":337,"./misc/IntegerStack":365,"./misc/Utils":373,"./tree/ErrorNode":374,"./tree/TerminalNode":377,"./tree/pattern/ParseTreePatternMatcher":382,"_process":456}],268:[function(require,module,exports){
|
|
46261
47522
|
"use strict";
|
|
46262
47523
|
/*!
|
|
46263
47524
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46265,7 +47526,7 @@ exports.Parser = Parser;
|
|
|
46265
47526
|
*/
|
|
46266
47527
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46267
47528
|
|
|
46268
|
-
},{}],
|
|
47529
|
+
},{}],269:[function(require,module,exports){
|
|
46269
47530
|
"use strict";
|
|
46270
47531
|
/*!
|
|
46271
47532
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46673,7 +47934,7 @@ ParserInterpreter = __decorate([
|
|
|
46673
47934
|
], ParserInterpreter);
|
|
46674
47935
|
exports.ParserInterpreter = ParserInterpreter;
|
|
46675
47936
|
|
|
46676
|
-
},{"./Decorators":
|
|
47937
|
+
},{"./Decorators":254,"./FailedPredicateException":258,"./InputMismatchException":259,"./InterpreterRuleContext":261,"./Parser":267,"./RecognitionException":273,"./Token":279,"./atn/ATNState":293,"./atn/ATNStateType":294,"./atn/LoopEndState":324,"./atn/ParserATNSimulator":328,"./atn/StarLoopEntryState":346,"./misc/BitSet":361}],270:[function(require,module,exports){
|
|
46677
47938
|
"use strict";
|
|
46678
47939
|
/*!
|
|
46679
47940
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46974,7 +48235,7 @@ __decorate([
|
|
|
46974
48235
|
], ParserRuleContext.prototype, "sourceInterval", null);
|
|
46975
48236
|
exports.ParserRuleContext = ParserRuleContext;
|
|
46976
48237
|
|
|
46977
|
-
},{"./Decorators":
|
|
48238
|
+
},{"./Decorators":254,"./RuleContext":275,"./misc/Interval":366,"./tree/ErrorNode":374,"./tree/TerminalNode":377}],271:[function(require,module,exports){
|
|
46978
48239
|
"use strict";
|
|
46979
48240
|
/*!
|
|
46980
48241
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47024,7 +48285,7 @@ __decorate([
|
|
|
47024
48285
|
], ProxyErrorListener.prototype, "syntaxError", null);
|
|
47025
48286
|
exports.ProxyErrorListener = ProxyErrorListener;
|
|
47026
48287
|
|
|
47027
|
-
},{"./Decorators":
|
|
48288
|
+
},{"./Decorators":254}],272:[function(require,module,exports){
|
|
47028
48289
|
"use strict";
|
|
47029
48290
|
/*!
|
|
47030
48291
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47083,7 +48344,7 @@ __decorate([
|
|
|
47083
48344
|
], ProxyParserErrorListener.prototype, "reportContextSensitivity", null);
|
|
47084
48345
|
exports.ProxyParserErrorListener = ProxyParserErrorListener;
|
|
47085
48346
|
|
|
47086
|
-
},{"./Decorators":
|
|
48347
|
+
},{"./Decorators":254,"./ProxyErrorListener":271}],273:[function(require,module,exports){
|
|
47087
48348
|
"use strict";
|
|
47088
48349
|
/*!
|
|
47089
48350
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47188,7 +48449,7 @@ class RecognitionException extends Error {
|
|
|
47188
48449
|
}
|
|
47189
48450
|
exports.RecognitionException = RecognitionException;
|
|
47190
48451
|
|
|
47191
|
-
},{}],
|
|
48452
|
+
},{}],274:[function(require,module,exports){
|
|
47192
48453
|
"use strict";
|
|
47193
48454
|
/*!
|
|
47194
48455
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47407,7 +48668,7 @@ __decorate([
|
|
|
47407
48668
|
], Recognizer.prototype, "getErrorListeners", null);
|
|
47408
48669
|
exports.Recognizer = Recognizer;
|
|
47409
48670
|
|
|
47410
|
-
},{"./ConsoleErrorListener":
|
|
48671
|
+
},{"./ConsoleErrorListener":253,"./Decorators":254,"./ProxyErrorListener":271,"./Token":279,"./misc/Utils":373}],275:[function(require,module,exports){
|
|
47411
48672
|
"use strict";
|
|
47412
48673
|
/*!
|
|
47413
48674
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47624,7 +48885,7 @@ __decorate([
|
|
|
47624
48885
|
], RuleContext.prototype, "toStringTree", null);
|
|
47625
48886
|
exports.RuleContext = RuleContext;
|
|
47626
48887
|
|
|
47627
|
-
},{"./Decorators":
|
|
48888
|
+
},{"./Decorators":254,"./ParserRuleContext":270,"./Recognizer":274,"./atn/ATN":287,"./misc/Interval":366,"./tree/RuleNode":376,"./tree/Trees":378}],276:[function(require,module,exports){
|
|
47628
48889
|
"use strict";
|
|
47629
48890
|
/*!
|
|
47630
48891
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47675,7 +48936,7 @@ __decorate([
|
|
|
47675
48936
|
], RuleContextWithAltNum.prototype, "altNumber", null);
|
|
47676
48937
|
exports.RuleContextWithAltNum = RuleContextWithAltNum;
|
|
47677
48938
|
|
|
47678
|
-
},{"./Decorators":
|
|
48939
|
+
},{"./Decorators":254,"./ParserRuleContext":270,"./atn/ATN":287}],277:[function(require,module,exports){
|
|
47679
48940
|
"use strict";
|
|
47680
48941
|
/*!
|
|
47681
48942
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47698,7 +48959,7 @@ function RuleDependency(dependency) {
|
|
|
47698
48959
|
}
|
|
47699
48960
|
exports.RuleDependency = RuleDependency;
|
|
47700
48961
|
|
|
47701
|
-
},{}],
|
|
48962
|
+
},{}],278:[function(require,module,exports){
|
|
47702
48963
|
"use strict";
|
|
47703
48964
|
/*!
|
|
47704
48965
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47717,7 +48978,7 @@ function RuleVersion(version) {
|
|
|
47717
48978
|
}
|
|
47718
48979
|
exports.RuleVersion = RuleVersion;
|
|
47719
48980
|
|
|
47720
|
-
},{}],
|
|
48981
|
+
},{}],279:[function(require,module,exports){
|
|
47721
48982
|
"use strict";
|
|
47722
48983
|
/*!
|
|
47723
48984
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47757,7 +49018,7 @@ var Token;
|
|
|
47757
49018
|
Token.MIN_USER_CHANNEL_VALUE = 2;
|
|
47758
49019
|
})(Token = exports.Token || (exports.Token = {}));
|
|
47759
49020
|
|
|
47760
|
-
},{"./IntStream":
|
|
49021
|
+
},{"./IntStream":260}],280:[function(require,module,exports){
|
|
47761
49022
|
"use strict";
|
|
47762
49023
|
/*!
|
|
47763
49024
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47765,7 +49026,7 @@ var Token;
|
|
|
47765
49026
|
*/
|
|
47766
49027
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47767
49028
|
|
|
47768
|
-
},{}],
|
|
49029
|
+
},{}],281:[function(require,module,exports){
|
|
47769
49030
|
"use strict";
|
|
47770
49031
|
/*!
|
|
47771
49032
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47773,7 +49034,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
47773
49034
|
*/
|
|
47774
49035
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47775
49036
|
|
|
47776
|
-
},{}],
|
|
49037
|
+
},{}],282:[function(require,module,exports){
|
|
47777
49038
|
"use strict";
|
|
47778
49039
|
/*!
|
|
47779
49040
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47781,7 +49042,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
47781
49042
|
*/
|
|
47782
49043
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47783
49044
|
|
|
47784
|
-
},{}],
|
|
49045
|
+
},{}],283:[function(require,module,exports){
|
|
47785
49046
|
"use strict";
|
|
47786
49047
|
/*!
|
|
47787
49048
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48289,7 +49550,7 @@ __decorate([
|
|
|
48289
49550
|
Decorators_1.Override
|
|
48290
49551
|
], ReplaceOp.prototype, "toString", null);
|
|
48291
49552
|
|
|
48292
|
-
},{"./Decorators":
|
|
49553
|
+
},{"./Decorators":254,"./Token":279,"./misc/Interval":366}],284:[function(require,module,exports){
|
|
48293
49554
|
"use strict";
|
|
48294
49555
|
/*!
|
|
48295
49556
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48297,7 +49558,7 @@ __decorate([
|
|
|
48297
49558
|
*/
|
|
48298
49559
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48299
49560
|
|
|
48300
|
-
},{}],
|
|
49561
|
+
},{}],285:[function(require,module,exports){
|
|
48301
49562
|
"use strict";
|
|
48302
49563
|
/*!
|
|
48303
49564
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48417,7 +49678,7 @@ __decorate([
|
|
|
48417
49678
|
], VocabularyImpl, "EMPTY_VOCABULARY", void 0);
|
|
48418
49679
|
exports.VocabularyImpl = VocabularyImpl;
|
|
48419
49680
|
|
|
48420
|
-
},{"./Decorators":
|
|
49681
|
+
},{"./Decorators":254,"./Token":279}],286:[function(require,module,exports){
|
|
48421
49682
|
"use strict";
|
|
48422
49683
|
/*!
|
|
48423
49684
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48425,7 +49686,7 @@ exports.VocabularyImpl = VocabularyImpl;
|
|
|
48425
49686
|
*/
|
|
48426
49687
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48427
49688
|
|
|
48428
|
-
},{}],
|
|
49689
|
+
},{}],287:[function(require,module,exports){
|
|
48429
49690
|
"use strict";
|
|
48430
49691
|
/*!
|
|
48431
49692
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48647,7 +49908,7 @@ exports.ATN = ATN;
|
|
|
48647
49908
|
})(ATN = exports.ATN || (exports.ATN = {}));
|
|
48648
49909
|
exports.ATN = ATN;
|
|
48649
49910
|
|
|
48650
|
-
},{"../Decorators":
|
|
49911
|
+
},{"../Decorators":254,"../Token":279,"../dfa/DFA":352,"../misc/Array2DHashMap":357,"../misc/IntervalSet":367,"../misc/ObjectEqualityComparator":370,"./InvalidState":310,"./LL1Analyzer":311,"./PredictionContext":334,"assert":397}],288:[function(require,module,exports){
|
|
48651
49912
|
"use strict";
|
|
48652
49913
|
/*!
|
|
48653
49914
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -49172,7 +50433,7 @@ ActionSemanticContextATNConfig = __decorate([
|
|
|
49172
50433
|
__param(1, Decorators_1.NotNull), __param(2, Decorators_1.NotNull)
|
|
49173
50434
|
], ActionSemanticContextATNConfig);
|
|
49174
50435
|
|
|
49175
|
-
},{"../Decorators":
|
|
50436
|
+
},{"../Decorators":254,"../misc/Array2DHashMap":357,"../misc/MurmurHash":369,"../misc/ObjectEqualityComparator":370,"./DecisionState":307,"./PredictionContext":334,"./SemanticContext":342,"assert":397}],289:[function(require,module,exports){
|
|
49176
50437
|
"use strict";
|
|
49177
50438
|
/*!
|
|
49178
50439
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -49619,7 +50880,7 @@ __decorate([
|
|
|
49619
50880
|
], ATNConfigSet.prototype, "hashCode", null);
|
|
49620
50881
|
exports.ATNConfigSet = ATNConfigSet;
|
|
49621
50882
|
|
|
49622
|
-
},{"../Decorators":
|
|
50883
|
+
},{"../Decorators":254,"../misc/Array2DHashMap":357,"../misc/Array2DHashSet":358,"../misc/ArrayEqualityComparator":359,"../misc/BitSet":361,"../misc/ObjectEqualityComparator":370,"../misc/Utils":373,"./ATN":287,"./ATNConfig":288,"./PredictionContext":334,"./PredictionContextCache":335,"./SemanticContext":342,"assert":397}],290:[function(require,module,exports){
|
|
49623
50884
|
"use strict";
|
|
49624
50885
|
/*!
|
|
49625
50886
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -49698,7 +50959,7 @@ __decorate([
|
|
|
49698
50959
|
], ATNDeserializationOptions, "defaultOptions", null);
|
|
49699
50960
|
exports.ATNDeserializationOptions = ATNDeserializationOptions;
|
|
49700
50961
|
|
|
49701
|
-
},{"../Decorators":
|
|
50962
|
+
},{"../Decorators":254}],291:[function(require,module,exports){
|
|
49702
50963
|
"use strict";
|
|
49703
50964
|
/*!
|
|
49704
50965
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -50785,7 +52046,7 @@ __decorate([
|
|
|
50785
52046
|
], ATNDeserializer.prototype, "edgeFactory", null);
|
|
50786
52047
|
exports.ATNDeserializer = ATNDeserializer;
|
|
50787
52048
|
|
|
50788
|
-
},{"../Decorators":
|
|
52049
|
+
},{"../Decorators":254,"../Token":279,"../dfa/DFA":352,"../misc/Array2DHashSet":358,"../misc/BitSet":361,"../misc/IntervalSet":367,"../misc/UUID":372,"./ATN":287,"./ATNDeserializationOptions":290,"./ATNStateType":294,"./ActionTransition":296,"./AtomTransition":298,"./BasicBlockStartState":299,"./BasicState":300,"./BlockEndState":301,"./BlockStartState":302,"./DecisionState":307,"./EpsilonTransition":308,"./InvalidState":310,"./LexerChannelAction":314,"./LexerCustomAction":315,"./LexerModeAction":317,"./LexerMoreAction":318,"./LexerPopModeAction":319,"./LexerPushModeAction":320,"./LexerSkipAction":321,"./LexerTypeAction":322,"./LoopEndState":324,"./NotSetTransition":325,"./ParserATNSimulator":328,"./PlusBlockStartState":329,"./PlusLoopbackState":330,"./PrecedencePredicateTransition":331,"./PredicateTransition":333,"./RangeTransition":338,"./RuleStartState":339,"./RuleStopState":340,"./RuleTransition":341,"./SetTransition":343,"./StarBlockStartState":345,"./StarLoopEntryState":346,"./StarLoopbackState":347,"./TokensStartState":348,"./WildcardTransition":350}],292:[function(require,module,exports){
|
|
50789
52050
|
"use strict";
|
|
50790
52051
|
/*!
|
|
50791
52052
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -50849,7 +52110,7 @@ exports.ATNSimulator = ATNSimulator;
|
|
|
50849
52110
|
})(ATNSimulator = exports.ATNSimulator || (exports.ATNSimulator = {}));
|
|
50850
52111
|
exports.ATNSimulator = ATNSimulator;
|
|
50851
52112
|
|
|
50852
|
-
},{"../Decorators":
|
|
52113
|
+
},{"../Decorators":254,"../dfa/DFAState":354,"./ATNConfigSet":289,"./PredictionContext":334}],293:[function(require,module,exports){
|
|
50853
52114
|
"use strict";
|
|
50854
52115
|
/*!
|
|
50855
52116
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51036,7 +52297,7 @@ exports.ATNState = ATNState;
|
|
|
51036
52297
|
ATNState.INVALID_STATE_NUMBER = -1;
|
|
51037
52298
|
})(ATNState = exports.ATNState || (exports.ATNState = {}));
|
|
51038
52299
|
|
|
51039
|
-
},{"../Decorators":
|
|
52300
|
+
},{"../Decorators":254}],294:[function(require,module,exports){
|
|
51040
52301
|
"use strict";
|
|
51041
52302
|
/*!
|
|
51042
52303
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51062,7 +52323,7 @@ var ATNStateType;
|
|
|
51062
52323
|
ATNStateType[ATNStateType["LOOP_END"] = 12] = "LOOP_END";
|
|
51063
52324
|
})(ATNStateType = exports.ATNStateType || (exports.ATNStateType = {}));
|
|
51064
52325
|
|
|
51065
|
-
},{}],
|
|
52326
|
+
},{}],295:[function(require,module,exports){
|
|
51066
52327
|
"use strict";
|
|
51067
52328
|
/*!
|
|
51068
52329
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51082,7 +52343,7 @@ class AbstractPredicateTransition extends Transition_1.Transition {
|
|
|
51082
52343
|
}
|
|
51083
52344
|
exports.AbstractPredicateTransition = AbstractPredicateTransition;
|
|
51084
52345
|
|
|
51085
|
-
},{"./Transition":
|
|
52346
|
+
},{"./Transition":349}],296:[function(require,module,exports){
|
|
51086
52347
|
"use strict";
|
|
51087
52348
|
/*!
|
|
51088
52349
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51138,7 +52399,7 @@ ActionTransition = __decorate([
|
|
|
51138
52399
|
], ActionTransition);
|
|
51139
52400
|
exports.ActionTransition = ActionTransition;
|
|
51140
52401
|
|
|
51141
|
-
},{"../Decorators":
|
|
52402
|
+
},{"../Decorators":254,"./Transition":349}],297:[function(require,module,exports){
|
|
51142
52403
|
"use strict";
|
|
51143
52404
|
/*!
|
|
51144
52405
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51225,7 +52486,7 @@ AmbiguityInfo = __decorate([
|
|
|
51225
52486
|
], AmbiguityInfo);
|
|
51226
52487
|
exports.AmbiguityInfo = AmbiguityInfo;
|
|
51227
52488
|
|
|
51228
|
-
},{"../Decorators":
|
|
52489
|
+
},{"../Decorators":254,"./DecisionEventInfo":305}],298:[function(require,module,exports){
|
|
51229
52490
|
"use strict";
|
|
51230
52491
|
/*!
|
|
51231
52492
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51283,7 +52544,7 @@ AtomTransition = __decorate([
|
|
|
51283
52544
|
], AtomTransition);
|
|
51284
52545
|
exports.AtomTransition = AtomTransition;
|
|
51285
52546
|
|
|
51286
|
-
},{"../Decorators":
|
|
52547
|
+
},{"../Decorators":254,"../misc/IntervalSet":367,"./Transition":349}],299:[function(require,module,exports){
|
|
51287
52548
|
"use strict";
|
|
51288
52549
|
/*!
|
|
51289
52550
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51315,7 +52576,7 @@ __decorate([
|
|
|
51315
52576
|
], BasicBlockStartState.prototype, "stateType", null);
|
|
51316
52577
|
exports.BasicBlockStartState = BasicBlockStartState;
|
|
51317
52578
|
|
|
51318
|
-
},{"../Decorators":
|
|
52579
|
+
},{"../Decorators":254,"./ATNStateType":294,"./BlockStartState":302}],300:[function(require,module,exports){
|
|
51319
52580
|
"use strict";
|
|
51320
52581
|
/*!
|
|
51321
52582
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51347,7 +52608,7 @@ __decorate([
|
|
|
51347
52608
|
], BasicState.prototype, "stateType", null);
|
|
51348
52609
|
exports.BasicState = BasicState;
|
|
51349
52610
|
|
|
51350
|
-
},{"../Decorators":
|
|
52611
|
+
},{"../Decorators":254,"./ATNState":293,"./ATNStateType":294}],301:[function(require,module,exports){
|
|
51351
52612
|
"use strict";
|
|
51352
52613
|
/*!
|
|
51353
52614
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51376,7 +52637,7 @@ __decorate([
|
|
|
51376
52637
|
], BlockEndState.prototype, "stateType", null);
|
|
51377
52638
|
exports.BlockEndState = BlockEndState;
|
|
51378
52639
|
|
|
51379
|
-
},{"../Decorators":
|
|
52640
|
+
},{"../Decorators":254,"./ATNState":293,"./ATNStateType":294}],302:[function(require,module,exports){
|
|
51380
52641
|
"use strict";
|
|
51381
52642
|
/*!
|
|
51382
52643
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51390,7 +52651,7 @@ class BlockStartState extends DecisionState_1.DecisionState {
|
|
|
51390
52651
|
}
|
|
51391
52652
|
exports.BlockStartState = BlockStartState;
|
|
51392
52653
|
|
|
51393
|
-
},{"./DecisionState":
|
|
52654
|
+
},{"./DecisionState":307}],303:[function(require,module,exports){
|
|
51394
52655
|
"use strict";
|
|
51395
52656
|
/*!
|
|
51396
52657
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51460,7 +52721,7 @@ __decorate([
|
|
|
51460
52721
|
], ConflictInfo.prototype, "hashCode", null);
|
|
51461
52722
|
exports.ConflictInfo = ConflictInfo;
|
|
51462
52723
|
|
|
51463
|
-
},{"../Decorators":
|
|
52724
|
+
},{"../Decorators":254,"../misc/Utils":373}],304:[function(require,module,exports){
|
|
51464
52725
|
"use strict";
|
|
51465
52726
|
/*!
|
|
51466
52727
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51520,7 +52781,7 @@ ContextSensitivityInfo = __decorate([
|
|
|
51520
52781
|
], ContextSensitivityInfo);
|
|
51521
52782
|
exports.ContextSensitivityInfo = ContextSensitivityInfo;
|
|
51522
52783
|
|
|
51523
|
-
},{"../Decorators":
|
|
52784
|
+
},{"../Decorators":254,"./DecisionEventInfo":305}],305:[function(require,module,exports){
|
|
51524
52785
|
"use strict";
|
|
51525
52786
|
/*!
|
|
51526
52787
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51572,7 +52833,7 @@ DecisionEventInfo = __decorate([
|
|
|
51572
52833
|
], DecisionEventInfo);
|
|
51573
52834
|
exports.DecisionEventInfo = DecisionEventInfo;
|
|
51574
52835
|
|
|
51575
|
-
},{"../Decorators":
|
|
52836
|
+
},{"../Decorators":254}],306:[function(require,module,exports){
|
|
51576
52837
|
"use strict";
|
|
51577
52838
|
/*!
|
|
51578
52839
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51785,7 +53046,7 @@ __decorate([
|
|
|
51785
53046
|
], DecisionInfo.prototype, "toString", null);
|
|
51786
53047
|
exports.DecisionInfo = DecisionInfo;
|
|
51787
53048
|
|
|
51788
|
-
},{"../Decorators":
|
|
53049
|
+
},{"../Decorators":254}],307:[function(require,module,exports){
|
|
51789
53050
|
"use strict";
|
|
51790
53051
|
/*!
|
|
51791
53052
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51805,7 +53066,7 @@ class DecisionState extends ATNState_1.ATNState {
|
|
|
51805
53066
|
}
|
|
51806
53067
|
exports.DecisionState = DecisionState;
|
|
51807
53068
|
|
|
51808
|
-
},{"./ATNState":
|
|
53069
|
+
},{"./ATNState":293}],308:[function(require,module,exports){
|
|
51809
53070
|
"use strict";
|
|
51810
53071
|
/*!
|
|
51811
53072
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51871,7 +53132,7 @@ EpsilonTransition = __decorate([
|
|
|
51871
53132
|
], EpsilonTransition);
|
|
51872
53133
|
exports.EpsilonTransition = EpsilonTransition;
|
|
51873
53134
|
|
|
51874
|
-
},{"../Decorators":
|
|
53135
|
+
},{"../Decorators":254,"./Transition":349}],309:[function(require,module,exports){
|
|
51875
53136
|
"use strict";
|
|
51876
53137
|
/*!
|
|
51877
53138
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51924,7 +53185,7 @@ ErrorInfo = __decorate([
|
|
|
51924
53185
|
], ErrorInfo);
|
|
51925
53186
|
exports.ErrorInfo = ErrorInfo;
|
|
51926
53187
|
|
|
51927
|
-
},{"../Decorators":
|
|
53188
|
+
},{"../Decorators":254,"./DecisionEventInfo":305}],310:[function(require,module,exports){
|
|
51928
53189
|
"use strict";
|
|
51929
53190
|
/*!
|
|
51930
53191
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51955,7 +53216,7 @@ __decorate([
|
|
|
51955
53216
|
], InvalidState.prototype, "stateType", null);
|
|
51956
53217
|
exports.InvalidState = InvalidState;
|
|
51957
53218
|
|
|
51958
|
-
},{"../Decorators":
|
|
53219
|
+
},{"../Decorators":254,"./ATNStateType":294,"./BasicState":300}],311:[function(require,module,exports){
|
|
51959
53220
|
"use strict";
|
|
51960
53221
|
/*!
|
|
51961
53222
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -52177,7 +53438,7 @@ LL1Analyzer = __decorate([
|
|
|
52177
53438
|
], LL1Analyzer);
|
|
52178
53439
|
exports.LL1Analyzer = LL1Analyzer;
|
|
52179
53440
|
|
|
52180
|
-
},{"../Decorators":
|
|
53441
|
+
},{"../Decorators":254,"../Token":279,"../misc/Array2DHashSet":358,"../misc/BitSet":361,"../misc/IntervalSet":367,"../misc/ObjectEqualityComparator":370,"./ATNConfig":288,"./AbstractPredicateTransition":295,"./NotSetTransition":325,"./PredictionContext":334,"./RuleStopState":340,"./RuleTransition":341,"./WildcardTransition":350}],312:[function(require,module,exports){
|
|
52181
53442
|
"use strict";
|
|
52182
53443
|
/*!
|
|
52183
53444
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -52894,7 +54155,7 @@ exports.LexerATNSimulator = LexerATNSimulator;
|
|
|
52894
54155
|
})(LexerATNSimulator = exports.LexerATNSimulator || (exports.LexerATNSimulator = {}));
|
|
52895
54156
|
exports.LexerATNSimulator = LexerATNSimulator;
|
|
52896
54157
|
|
|
52897
|
-
},{"../Decorators":
|
|
54158
|
+
},{"../Decorators":254,"../IntStream":260,"../Lexer":262,"../LexerNoViableAltException":264,"../Token":279,"../dfa/AcceptStateInfo":351,"../dfa/DFAState":354,"../misc/Interval":366,"./ATN":287,"./ATNConfig":288,"./ATNConfigSet":289,"./ATNSimulator":292,"./LexerActionExecutor":313,"./OrderedATNConfigSet":326,"./PredictionContext":334,"./RuleStopState":340,"assert":397}],313:[function(require,module,exports){
|
|
52898
54159
|
"use strict";
|
|
52899
54160
|
/*!
|
|
52900
54161
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53095,7 +54356,7 @@ LexerActionExecutor = __decorate([
|
|
|
53095
54356
|
], LexerActionExecutor);
|
|
53096
54357
|
exports.LexerActionExecutor = LexerActionExecutor;
|
|
53097
54358
|
|
|
53098
|
-
},{"../Decorators":
|
|
54359
|
+
},{"../Decorators":254,"../misc/ArrayEqualityComparator":359,"../misc/MurmurHash":369,"./LexerIndexedCustomAction":316}],314:[function(require,module,exports){
|
|
53099
54360
|
"use strict";
|
|
53100
54361
|
/*!
|
|
53101
54362
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53200,7 +54461,7 @@ __decorate([
|
|
|
53200
54461
|
], LexerChannelAction.prototype, "toString", null);
|
|
53201
54462
|
exports.LexerChannelAction = LexerChannelAction;
|
|
53202
54463
|
|
|
53203
|
-
},{"../Decorators":
|
|
54464
|
+
},{"../Decorators":254,"../misc/MurmurHash":369}],315:[function(require,module,exports){
|
|
53204
54465
|
"use strict";
|
|
53205
54466
|
/*!
|
|
53206
54467
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53329,7 +54590,7 @@ __decorate([
|
|
|
53329
54590
|
], LexerCustomAction.prototype, "equals", null);
|
|
53330
54591
|
exports.LexerCustomAction = LexerCustomAction;
|
|
53331
54592
|
|
|
53332
|
-
},{"../Decorators":
|
|
54593
|
+
},{"../Decorators":254,"../misc/MurmurHash":369}],316:[function(require,module,exports){
|
|
53333
54594
|
"use strict";
|
|
53334
54595
|
/*!
|
|
53335
54596
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53464,7 +54725,7 @@ LexerIndexedCustomAction = __decorate([
|
|
|
53464
54725
|
], LexerIndexedCustomAction);
|
|
53465
54726
|
exports.LexerIndexedCustomAction = LexerIndexedCustomAction;
|
|
53466
54727
|
|
|
53467
|
-
},{"../Decorators":
|
|
54728
|
+
},{"../Decorators":254,"../misc/MurmurHash":369}],317:[function(require,module,exports){
|
|
53468
54729
|
"use strict";
|
|
53469
54730
|
/*!
|
|
53470
54731
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53569,7 +54830,7 @@ __decorate([
|
|
|
53569
54830
|
], LexerModeAction.prototype, "toString", null);
|
|
53570
54831
|
exports.LexerModeAction = LexerModeAction;
|
|
53571
54832
|
|
|
53572
|
-
},{"../Decorators":
|
|
54833
|
+
},{"../Decorators":254,"../misc/MurmurHash":369}],318:[function(require,module,exports){
|
|
53573
54834
|
"use strict";
|
|
53574
54835
|
/*!
|
|
53575
54836
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53665,7 +54926,7 @@ exports.LexerMoreAction = LexerMoreAction;
|
|
|
53665
54926
|
LexerMoreAction.INSTANCE = new LexerMoreAction();
|
|
53666
54927
|
})(LexerMoreAction = exports.LexerMoreAction || (exports.LexerMoreAction = {}));
|
|
53667
54928
|
|
|
53668
|
-
},{"../Decorators":
|
|
54929
|
+
},{"../Decorators":254,"../misc/MurmurHash":369}],319:[function(require,module,exports){
|
|
53669
54930
|
"use strict";
|
|
53670
54931
|
/*!
|
|
53671
54932
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53761,7 +55022,7 @@ exports.LexerPopModeAction = LexerPopModeAction;
|
|
|
53761
55022
|
LexerPopModeAction.INSTANCE = new LexerPopModeAction();
|
|
53762
55023
|
})(LexerPopModeAction = exports.LexerPopModeAction || (exports.LexerPopModeAction = {}));
|
|
53763
55024
|
|
|
53764
|
-
},{"../Decorators":
|
|
55025
|
+
},{"../Decorators":254,"../misc/MurmurHash":369}],320:[function(require,module,exports){
|
|
53765
55026
|
"use strict";
|
|
53766
55027
|
/*!
|
|
53767
55028
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53866,7 +55127,7 @@ __decorate([
|
|
|
53866
55127
|
], LexerPushModeAction.prototype, "toString", null);
|
|
53867
55128
|
exports.LexerPushModeAction = LexerPushModeAction;
|
|
53868
55129
|
|
|
53869
|
-
},{"../Decorators":
|
|
55130
|
+
},{"../Decorators":254,"../misc/MurmurHash":369}],321:[function(require,module,exports){
|
|
53870
55131
|
"use strict";
|
|
53871
55132
|
/*!
|
|
53872
55133
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53962,7 +55223,7 @@ exports.LexerSkipAction = LexerSkipAction;
|
|
|
53962
55223
|
LexerSkipAction.INSTANCE = new LexerSkipAction();
|
|
53963
55224
|
})(LexerSkipAction = exports.LexerSkipAction || (exports.LexerSkipAction = {}));
|
|
53964
55225
|
|
|
53965
|
-
},{"../Decorators":
|
|
55226
|
+
},{"../Decorators":254,"../misc/MurmurHash":369}],322:[function(require,module,exports){
|
|
53966
55227
|
"use strict";
|
|
53967
55228
|
/*!
|
|
53968
55229
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54066,7 +55327,7 @@ __decorate([
|
|
|
54066
55327
|
], LexerTypeAction.prototype, "toString", null);
|
|
54067
55328
|
exports.LexerTypeAction = LexerTypeAction;
|
|
54068
55329
|
|
|
54069
|
-
},{"../Decorators":
|
|
55330
|
+
},{"../Decorators":254,"../misc/MurmurHash":369}],323:[function(require,module,exports){
|
|
54070
55331
|
"use strict";
|
|
54071
55332
|
/*!
|
|
54072
55333
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54118,7 +55379,7 @@ LookaheadEventInfo = __decorate([
|
|
|
54118
55379
|
], LookaheadEventInfo);
|
|
54119
55380
|
exports.LookaheadEventInfo = LookaheadEventInfo;
|
|
54120
55381
|
|
|
54121
|
-
},{"../Decorators":
|
|
55382
|
+
},{"../Decorators":254,"./DecisionEventInfo":305}],324:[function(require,module,exports){
|
|
54122
55383
|
"use strict";
|
|
54123
55384
|
/*!
|
|
54124
55385
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54147,7 +55408,7 @@ __decorate([
|
|
|
54147
55408
|
], LoopEndState.prototype, "stateType", null);
|
|
54148
55409
|
exports.LoopEndState = LoopEndState;
|
|
54149
55410
|
|
|
54150
|
-
},{"../Decorators":
|
|
55411
|
+
},{"../Decorators":254,"./ATNState":293,"./ATNStateType":294}],325:[function(require,module,exports){
|
|
54151
55412
|
"use strict";
|
|
54152
55413
|
/*!
|
|
54153
55414
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54196,7 +55457,7 @@ NotSetTransition = __decorate([
|
|
|
54196
55457
|
], NotSetTransition);
|
|
54197
55458
|
exports.NotSetTransition = NotSetTransition;
|
|
54198
55459
|
|
|
54199
|
-
},{"../Decorators":
|
|
55460
|
+
},{"../Decorators":254,"./SetTransition":343}],326:[function(require,module,exports){
|
|
54200
55461
|
"use strict";
|
|
54201
55462
|
/*!
|
|
54202
55463
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54251,7 +55512,7 @@ __decorate([
|
|
|
54251
55512
|
], OrderedATNConfigSet.prototype, "canMerge", null);
|
|
54252
55513
|
exports.OrderedATNConfigSet = OrderedATNConfigSet;
|
|
54253
55514
|
|
|
54254
|
-
},{"../Decorators":
|
|
55515
|
+
},{"../Decorators":254,"./ATNConfigSet":289}],327:[function(require,module,exports){
|
|
54255
55516
|
"use strict";
|
|
54256
55517
|
/*!
|
|
54257
55518
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54413,7 +55674,7 @@ ParseInfo = __decorate([
|
|
|
54413
55674
|
], ParseInfo);
|
|
54414
55675
|
exports.ParseInfo = ParseInfo;
|
|
54415
55676
|
|
|
54416
|
-
},{"../Decorators":
|
|
55677
|
+
},{"../Decorators":254}],328:[function(require,module,exports){
|
|
54417
55678
|
"use strict";
|
|
54418
55679
|
/*!
|
|
54419
55680
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -56686,7 +57947,7 @@ ParserATNSimulator = __decorate([
|
|
|
56686
57947
|
], ParserATNSimulator);
|
|
56687
57948
|
exports.ParserATNSimulator = ParserATNSimulator;
|
|
56688
57949
|
|
|
56689
|
-
},{"../Decorators":
|
|
57950
|
+
},{"../Decorators":254,"../IntStream":260,"../NoViableAltException":266,"../ParserRuleContext":270,"../Token":279,"../VocabularyImpl":285,"../dfa/AcceptStateInfo":351,"../dfa/DFAState":354,"../misc/Array2DHashSet":358,"../misc/Arrays":360,"../misc/BitSet":361,"../misc/IntegerList":364,"../misc/Interval":366,"../misc/ObjectEqualityComparator":370,"./ATN":287,"./ATNConfig":288,"./ATNConfigSet":289,"./ATNSimulator":292,"./ATNStateType":294,"./ActionTransition":296,"./AtomTransition":298,"./ConflictInfo":303,"./DecisionState":307,"./NotSetTransition":325,"./PredictionContext":334,"./PredictionContextCache":335,"./PredictionMode":336,"./RuleStopState":340,"./RuleTransition":341,"./SemanticContext":342,"./SetTransition":343,"./SimulatorState":344,"assert":397}],329:[function(require,module,exports){
|
|
56690
57951
|
"use strict";
|
|
56691
57952
|
/*!
|
|
56692
57953
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -56719,7 +57980,7 @@ __decorate([
|
|
|
56719
57980
|
], PlusBlockStartState.prototype, "stateType", null);
|
|
56720
57981
|
exports.PlusBlockStartState = PlusBlockStartState;
|
|
56721
57982
|
|
|
56722
|
-
},{"../Decorators":
|
|
57983
|
+
},{"../Decorators":254,"./ATNStateType":294,"./BlockStartState":302}],330:[function(require,module,exports){
|
|
56723
57984
|
"use strict";
|
|
56724
57985
|
/*!
|
|
56725
57986
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -56750,7 +58011,7 @@ __decorate([
|
|
|
56750
58011
|
], PlusLoopbackState.prototype, "stateType", null);
|
|
56751
58012
|
exports.PlusLoopbackState = PlusLoopbackState;
|
|
56752
58013
|
|
|
56753
|
-
},{"../Decorators":
|
|
58014
|
+
},{"../Decorators":254,"./ATNStateType":294,"./DecisionState":307}],331:[function(require,module,exports){
|
|
56754
58015
|
"use strict";
|
|
56755
58016
|
/*!
|
|
56756
58017
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -56813,7 +58074,7 @@ PrecedencePredicateTransition = __decorate([
|
|
|
56813
58074
|
], PrecedencePredicateTransition);
|
|
56814
58075
|
exports.PrecedencePredicateTransition = PrecedencePredicateTransition;
|
|
56815
58076
|
|
|
56816
|
-
},{"../Decorators":
|
|
58077
|
+
},{"../Decorators":254,"./AbstractPredicateTransition":295,"./SemanticContext":342}],332:[function(require,module,exports){
|
|
56817
58078
|
"use strict";
|
|
56818
58079
|
/*!
|
|
56819
58080
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -56876,7 +58137,7 @@ PredicateEvalInfo = __decorate([
|
|
|
56876
58137
|
], PredicateEvalInfo);
|
|
56877
58138
|
exports.PredicateEvalInfo = PredicateEvalInfo;
|
|
56878
58139
|
|
|
56879
|
-
},{"../Decorators":
|
|
58140
|
+
},{"../Decorators":254,"./DecisionEventInfo":305}],333:[function(require,module,exports){
|
|
56880
58141
|
"use strict";
|
|
56881
58142
|
/*!
|
|
56882
58143
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -56942,7 +58203,7 @@ PredicateTransition = __decorate([
|
|
|
56942
58203
|
], PredicateTransition);
|
|
56943
58204
|
exports.PredicateTransition = PredicateTransition;
|
|
56944
58205
|
|
|
56945
|
-
},{"../Decorators":
|
|
58206
|
+
},{"../Decorators":254,"./AbstractPredicateTransition":295,"./SemanticContext":342}],334:[function(require,module,exports){
|
|
56946
58207
|
"use strict";
|
|
56947
58208
|
/*!
|
|
56948
58209
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57633,7 +58894,7 @@ exports.SingletonPredictionContext = SingletonPredictionContext;
|
|
|
57633
58894
|
PredictionContext.IdentityEqualityComparator = IdentityEqualityComparator;
|
|
57634
58895
|
})(PredictionContext = exports.PredictionContext || (exports.PredictionContext = {}));
|
|
57635
58896
|
|
|
57636
|
-
},{"../Decorators":
|
|
58897
|
+
},{"../Decorators":254,"../misc/Array2DHashMap":357,"../misc/Array2DHashSet":358,"../misc/Arrays":360,"../misc/MurmurHash":369,"./PredictionContextCache":335,"assert":397}],335:[function(require,module,exports){
|
|
57637
58898
|
"use strict";
|
|
57638
58899
|
/*!
|
|
57639
58900
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57774,7 +59035,7 @@ PredictionContextCache.UNCACHED = new PredictionContextCache(false);
|
|
|
57774
59035
|
PredictionContextCache.IdentityCommutativePredictionContextOperands = IdentityCommutativePredictionContextOperands;
|
|
57775
59036
|
})(PredictionContextCache = exports.PredictionContextCache || (exports.PredictionContextCache = {}));
|
|
57776
59037
|
|
|
57777
|
-
},{"../Decorators":
|
|
59038
|
+
},{"../Decorators":254,"../misc/Array2DHashMap":357,"../misc/ObjectEqualityComparator":370,"./PredictionContext":334,"assert":397}],336:[function(require,module,exports){
|
|
57778
59039
|
"use strict";
|
|
57779
59040
|
/*!
|
|
57780
59041
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57935,7 +59196,7 @@ var PredictionMode;
|
|
|
57935
59196
|
PredictionMode.allConfigsInRuleStopStates = allConfigsInRuleStopStates;
|
|
57936
59197
|
})(PredictionMode = exports.PredictionMode || (exports.PredictionMode = {}));
|
|
57937
59198
|
|
|
57938
|
-
},{"../Decorators":
|
|
59199
|
+
},{"../Decorators":254,"../misc/Array2DHashMap":357,"../misc/MurmurHash":369,"./RuleStopState":340}],337:[function(require,module,exports){
|
|
57939
59200
|
(function (process){(function (){
|
|
57940
59201
|
"use strict";
|
|
57941
59202
|
/*!
|
|
@@ -58204,7 +59465,7 @@ __decorate([
|
|
|
58204
59465
|
exports.ProfilingATNSimulator = ProfilingATNSimulator;
|
|
58205
59466
|
|
|
58206
59467
|
}).call(this)}).call(this,require('_process'))
|
|
58207
|
-
},{"../Decorators":
|
|
59468
|
+
},{"../Decorators":254,"./ATN":287,"./ATNSimulator":292,"./AmbiguityInfo":297,"./ContextSensitivityInfo":304,"./DecisionInfo":306,"./ErrorInfo":309,"./LookaheadEventInfo":323,"./ParserATNSimulator":328,"./PredicateEvalInfo":332,"./SemanticContext":342,"./SimulatorState":344,"_process":456}],338:[function(require,module,exports){
|
|
58208
59469
|
"use strict";
|
|
58209
59470
|
/*!
|
|
58210
59471
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58262,7 +59523,7 @@ RangeTransition = __decorate([
|
|
|
58262
59523
|
], RangeTransition);
|
|
58263
59524
|
exports.RangeTransition = RangeTransition;
|
|
58264
59525
|
|
|
58265
|
-
},{"../Decorators":
|
|
59526
|
+
},{"../Decorators":254,"../misc/IntervalSet":367,"./Transition":349}],339:[function(require,module,exports){
|
|
58266
59527
|
"use strict";
|
|
58267
59528
|
/*!
|
|
58268
59529
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58295,7 +59556,7 @@ __decorate([
|
|
|
58295
59556
|
], RuleStartState.prototype, "stateType", null);
|
|
58296
59557
|
exports.RuleStartState = RuleStartState;
|
|
58297
59558
|
|
|
58298
|
-
},{"../Decorators":
|
|
59559
|
+
},{"../Decorators":254,"./ATNState":293,"./ATNStateType":294}],340:[function(require,module,exports){
|
|
58299
59560
|
"use strict";
|
|
58300
59561
|
/*!
|
|
58301
59562
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58334,7 +59595,7 @@ __decorate([
|
|
|
58334
59595
|
], RuleStopState.prototype, "stateType", null);
|
|
58335
59596
|
exports.RuleStopState = RuleStopState;
|
|
58336
59597
|
|
|
58337
|
-
},{"../Decorators":
|
|
59598
|
+
},{"../Decorators":254,"./ATNState":293,"./ATNStateType":294}],341:[function(require,module,exports){
|
|
58338
59599
|
"use strict";
|
|
58339
59600
|
/*!
|
|
58340
59601
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58390,7 +59651,7 @@ RuleTransition = __decorate([
|
|
|
58390
59651
|
], RuleTransition);
|
|
58391
59652
|
exports.RuleTransition = RuleTransition;
|
|
58392
59653
|
|
|
58393
|
-
},{"../Decorators":
|
|
59654
|
+
},{"../Decorators":254,"./Transition":349}],342:[function(require,module,exports){
|
|
58394
59655
|
"use strict";
|
|
58395
59656
|
/*!
|
|
58396
59657
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58870,7 +60131,7 @@ exports.SemanticContext = SemanticContext;
|
|
|
58870
60131
|
SemanticContext.OR = OR;
|
|
58871
60132
|
})(SemanticContext = exports.SemanticContext || (exports.SemanticContext = {}));
|
|
58872
60133
|
|
|
58873
|
-
},{"../Decorators":
|
|
60134
|
+
},{"../Decorators":254,"../misc/Array2DHashSet":358,"../misc/ArrayEqualityComparator":359,"../misc/MurmurHash":369,"../misc/ObjectEqualityComparator":370,"../misc/Utils":373}],343:[function(require,module,exports){
|
|
58874
60135
|
"use strict";
|
|
58875
60136
|
/*!
|
|
58876
60137
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58936,7 +60197,7 @@ SetTransition = __decorate([
|
|
|
58936
60197
|
], SetTransition);
|
|
58937
60198
|
exports.SetTransition = SetTransition;
|
|
58938
60199
|
|
|
58939
|
-
},{"../Decorators":
|
|
60200
|
+
},{"../Decorators":254,"../Token":279,"../misc/IntervalSet":367,"./Transition":349}],344:[function(require,module,exports){
|
|
58940
60201
|
"use strict";
|
|
58941
60202
|
/*!
|
|
58942
60203
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58972,7 +60233,7 @@ SimulatorState = __decorate([
|
|
|
58972
60233
|
], SimulatorState);
|
|
58973
60234
|
exports.SimulatorState = SimulatorState;
|
|
58974
60235
|
|
|
58975
|
-
},{"../Decorators":
|
|
60236
|
+
},{"../Decorators":254,"../ParserRuleContext":270}],345:[function(require,module,exports){
|
|
58976
60237
|
"use strict";
|
|
58977
60238
|
/*!
|
|
58978
60239
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59000,7 +60261,7 @@ __decorate([
|
|
|
59000
60261
|
], StarBlockStartState.prototype, "stateType", null);
|
|
59001
60262
|
exports.StarBlockStartState = StarBlockStartState;
|
|
59002
60263
|
|
|
59003
|
-
},{"../Decorators":
|
|
60264
|
+
},{"../Decorators":254,"./ATNStateType":294,"./BlockStartState":302}],346:[function(require,module,exports){
|
|
59004
60265
|
"use strict";
|
|
59005
60266
|
/*!
|
|
59006
60267
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59057,7 +60318,7 @@ __decorate([
|
|
|
59057
60318
|
], StarLoopEntryState.prototype, "stateType", null);
|
|
59058
60319
|
exports.StarLoopEntryState = StarLoopEntryState;
|
|
59059
60320
|
|
|
59060
|
-
},{"../Decorators":
|
|
60321
|
+
},{"../Decorators":254,"../misc/BitSet":361,"./ATNStateType":294,"./DecisionState":307}],347:[function(require,module,exports){
|
|
59061
60322
|
"use strict";
|
|
59062
60323
|
/*!
|
|
59063
60324
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59088,7 +60349,7 @@ __decorate([
|
|
|
59088
60349
|
], StarLoopbackState.prototype, "stateType", null);
|
|
59089
60350
|
exports.StarLoopbackState = StarLoopbackState;
|
|
59090
60351
|
|
|
59091
|
-
},{"../Decorators":
|
|
60352
|
+
},{"../Decorators":254,"./ATNState":293,"./ATNStateType":294}],348:[function(require,module,exports){
|
|
59092
60353
|
"use strict";
|
|
59093
60354
|
/*!
|
|
59094
60355
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59117,7 +60378,7 @@ __decorate([
|
|
|
59117
60378
|
], TokensStartState.prototype, "stateType", null);
|
|
59118
60379
|
exports.TokensStartState = TokensStartState;
|
|
59119
60380
|
|
|
59120
|
-
},{"../Decorators":
|
|
60381
|
+
},{"../Decorators":254,"./ATNStateType":294,"./DecisionState":307}],349:[function(require,module,exports){
|
|
59121
60382
|
"use strict";
|
|
59122
60383
|
/*!
|
|
59123
60384
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59191,7 +60452,7 @@ Transition = __decorate([
|
|
|
59191
60452
|
], Transition);
|
|
59192
60453
|
exports.Transition = Transition;
|
|
59193
60454
|
|
|
59194
|
-
},{"../Decorators":
|
|
60455
|
+
},{"../Decorators":254}],350:[function(require,module,exports){
|
|
59195
60456
|
"use strict";
|
|
59196
60457
|
/*!
|
|
59197
60458
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59239,7 +60500,7 @@ WildcardTransition = __decorate([
|
|
|
59239
60500
|
], WildcardTransition);
|
|
59240
60501
|
exports.WildcardTransition = WildcardTransition;
|
|
59241
60502
|
|
|
59242
|
-
},{"../Decorators":
|
|
60503
|
+
},{"../Decorators":254,"./Transition":349}],351:[function(require,module,exports){
|
|
59243
60504
|
"use strict";
|
|
59244
60505
|
/*!
|
|
59245
60506
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59281,7 +60542,7 @@ class AcceptStateInfo {
|
|
|
59281
60542
|
}
|
|
59282
60543
|
exports.AcceptStateInfo = AcceptStateInfo;
|
|
59283
60544
|
|
|
59284
|
-
},{}],
|
|
60545
|
+
},{}],352:[function(require,module,exports){
|
|
59285
60546
|
"use strict";
|
|
59286
60547
|
/*!
|
|
59287
60548
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59456,7 +60717,7 @@ DFA = __decorate([
|
|
|
59456
60717
|
], DFA);
|
|
59457
60718
|
exports.DFA = DFA;
|
|
59458
60719
|
|
|
59459
|
-
},{"../Decorators":
|
|
60720
|
+
},{"../Decorators":254,"../VocabularyImpl":285,"../atn/ATNConfigSet":289,"../atn/StarLoopEntryState":346,"../misc/Array2DHashSet":358,"../misc/ObjectEqualityComparator":370,"./DFASerializer":353,"./DFAState":354,"./LexerDFASerializer":355}],353:[function(require,module,exports){
|
|
59460
60721
|
"use strict";
|
|
59461
60722
|
/*!
|
|
59462
60723
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59598,7 +60859,7 @@ __decorate([
|
|
|
59598
60859
|
], DFASerializer.prototype, "toString", null);
|
|
59599
60860
|
exports.DFASerializer = DFASerializer;
|
|
59600
60861
|
|
|
59601
|
-
},{"../Decorators":
|
|
60862
|
+
},{"../Decorators":254,"../Recognizer":274,"../VocabularyImpl":285,"../atn/ATNSimulator":292,"../atn/PredictionContext":334}],354:[function(require,module,exports){
|
|
59602
60863
|
"use strict";
|
|
59603
60864
|
/*!
|
|
59604
60865
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59829,7 +61090,7 @@ exports.DFAState = DFAState;
|
|
|
59829
61090
|
DFAState.PredPrediction = PredPrediction;
|
|
59830
61091
|
})(DFAState = exports.DFAState || (exports.DFAState = {}));
|
|
59831
61092
|
|
|
59832
|
-
},{"../Decorators":
|
|
61093
|
+
},{"../Decorators":254,"../atn/ATN":287,"../atn/PredictionContext":334,"../misc/BitSet":361,"../misc/MurmurHash":369,"assert":397}],355:[function(require,module,exports){
|
|
59833
61094
|
"use strict";
|
|
59834
61095
|
/*!
|
|
59835
61096
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59866,7 +61127,7 @@ LexerDFASerializer = __decorate([
|
|
|
59866
61127
|
], LexerDFASerializer);
|
|
59867
61128
|
exports.LexerDFASerializer = LexerDFASerializer;
|
|
59868
61129
|
|
|
59869
|
-
},{"../Decorators":
|
|
61130
|
+
},{"../Decorators":254,"../VocabularyImpl":285,"./DFASerializer":353}],356:[function(require,module,exports){
|
|
59870
61131
|
"use strict";
|
|
59871
61132
|
/*!
|
|
59872
61133
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59932,7 +61193,7 @@ __exportStar(require("./Vocabulary"), exports);
|
|
|
59932
61193
|
__exportStar(require("./VocabularyImpl"), exports);
|
|
59933
61194
|
__exportStar(require("./WritableToken"), exports);
|
|
59934
61195
|
|
|
59935
|
-
},{"./ANTLRErrorListener":
|
|
61196
|
+
},{"./ANTLRErrorListener":241,"./ANTLRErrorStrategy":242,"./ANTLRInputStream":243,"./BailErrorStrategy":244,"./BufferedTokenStream":245,"./CharStream":246,"./CharStreams":247,"./CodePointBuffer":248,"./CodePointCharStream":249,"./CommonToken":250,"./CommonTokenFactory":251,"./CommonTokenStream":252,"./ConsoleErrorListener":253,"./DefaultErrorStrategy":255,"./Dependents":256,"./DiagnosticErrorListener":257,"./FailedPredicateException":258,"./InputMismatchException":259,"./IntStream":260,"./InterpreterRuleContext":261,"./Lexer":262,"./LexerInterpreter":263,"./LexerNoViableAltException":264,"./ListTokenSource":265,"./NoViableAltException":266,"./Parser":267,"./ParserErrorListener":268,"./ParserInterpreter":269,"./ParserRuleContext":270,"./ProxyErrorListener":271,"./ProxyParserErrorListener":272,"./RecognitionException":273,"./Recognizer":274,"./RuleContext":275,"./RuleContextWithAltNum":276,"./RuleDependency":277,"./RuleVersion":278,"./Token":279,"./TokenFactory":280,"./TokenSource":281,"./TokenStream":282,"./TokenStreamRewriter":283,"./Vocabulary":284,"./VocabularyImpl":285,"./WritableToken":286}],357:[function(require,module,exports){
|
|
59936
61197
|
"use strict";
|
|
59937
61198
|
/*!
|
|
59938
61199
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60015,7 +61276,7 @@ class Array2DHashMap {
|
|
|
60015
61276
|
}
|
|
60016
61277
|
exports.Array2DHashMap = Array2DHashMap;
|
|
60017
61278
|
|
|
60018
|
-
},{"./Array2DHashSet":
|
|
61279
|
+
},{"./Array2DHashSet":358}],358:[function(require,module,exports){
|
|
60019
61280
|
"use strict";
|
|
60020
61281
|
/*!
|
|
60021
61282
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60382,7 +61643,7 @@ __decorate([
|
|
|
60382
61643
|
], Array2DHashSet.prototype, "createBuckets", null);
|
|
60383
61644
|
exports.Array2DHashSet = Array2DHashSet;
|
|
60384
61645
|
|
|
60385
|
-
},{"../Decorators":
|
|
61646
|
+
},{"../Decorators":254,"./DefaultEqualityComparator":363,"./MurmurHash":369,"assert":397}],359:[function(require,module,exports){
|
|
60386
61647
|
"use strict";
|
|
60387
61648
|
/*!
|
|
60388
61649
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60454,7 +61715,7 @@ __decorate([
|
|
|
60454
61715
|
], ArrayEqualityComparator.prototype, "equals", null);
|
|
60455
61716
|
exports.ArrayEqualityComparator = ArrayEqualityComparator;
|
|
60456
61717
|
|
|
60457
|
-
},{"../Decorators":
|
|
61718
|
+
},{"../Decorators":254,"./MurmurHash":369,"./ObjectEqualityComparator":370}],360:[function(require,module,exports){
|
|
60458
61719
|
"use strict";
|
|
60459
61720
|
/*!
|
|
60460
61721
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60524,7 +61785,7 @@ var Arrays;
|
|
|
60524
61785
|
Arrays.toString = toString;
|
|
60525
61786
|
})(Arrays = exports.Arrays || (exports.Arrays = {}));
|
|
60526
61787
|
|
|
60527
|
-
},{}],
|
|
61788
|
+
},{}],361:[function(require,module,exports){
|
|
60528
61789
|
"use strict";
|
|
60529
61790
|
/*!
|
|
60530
61791
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -61196,7 +62457,7 @@ class BitSetIterator {
|
|
|
61196
62457
|
[Symbol.iterator]() { return this; }
|
|
61197
62458
|
}
|
|
61198
62459
|
|
|
61199
|
-
},{"./MurmurHash":
|
|
62460
|
+
},{"./MurmurHash":369,"util":461}],362:[function(require,module,exports){
|
|
61200
62461
|
"use strict";
|
|
61201
62462
|
/*!
|
|
61202
62463
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -61217,7 +62478,7 @@ function isSupplementaryCodePoint(ch) {
|
|
|
61217
62478
|
}
|
|
61218
62479
|
exports.isSupplementaryCodePoint = isSupplementaryCodePoint;
|
|
61219
62480
|
|
|
61220
|
-
},{}],
|
|
62481
|
+
},{}],363:[function(require,module,exports){
|
|
61221
62482
|
"use strict";
|
|
61222
62483
|
/*!
|
|
61223
62484
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -61288,7 +62549,7 @@ __decorate([
|
|
|
61288
62549
|
], DefaultEqualityComparator.prototype, "equals", null);
|
|
61289
62550
|
exports.DefaultEqualityComparator = DefaultEqualityComparator;
|
|
61290
62551
|
|
|
61291
|
-
},{"../Decorators":
|
|
62552
|
+
},{"../Decorators":254,"./MurmurHash":369,"./ObjectEqualityComparator":370}],364:[function(require,module,exports){
|
|
61292
62553
|
"use strict";
|
|
61293
62554
|
/*!
|
|
61294
62555
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -61582,7 +62843,7 @@ __decorate([
|
|
|
61582
62843
|
], IntegerList.prototype, "toString", null);
|
|
61583
62844
|
exports.IntegerList = IntegerList;
|
|
61584
62845
|
|
|
61585
|
-
},{"../Decorators":
|
|
62846
|
+
},{"../Decorators":254,"./Arrays":360}],365:[function(require,module,exports){
|
|
61586
62847
|
"use strict";
|
|
61587
62848
|
/*!
|
|
61588
62849
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -61612,7 +62873,7 @@ class IntegerStack extends IntegerList_1.IntegerList {
|
|
|
61612
62873
|
}
|
|
61613
62874
|
exports.IntegerStack = IntegerStack;
|
|
61614
62875
|
|
|
61615
|
-
},{"./IntegerList":
|
|
62876
|
+
},{"./IntegerList":364}],366:[function(require,module,exports){
|
|
61616
62877
|
"use strict";
|
|
61617
62878
|
/*!
|
|
61618
62879
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -61755,7 +63016,7 @@ __decorate([
|
|
|
61755
63016
|
], Interval.prototype, "toString", null);
|
|
61756
63017
|
exports.Interval = Interval;
|
|
61757
63018
|
|
|
61758
|
-
},{"../Decorators":
|
|
63019
|
+
},{"../Decorators":254}],367:[function(require,module,exports){
|
|
61759
63020
|
"use strict";
|
|
61760
63021
|
/*!
|
|
61761
63022
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -62401,7 +63662,7 @@ __decorate([
|
|
|
62401
63662
|
], IntervalSet, "subtract", null);
|
|
62402
63663
|
exports.IntervalSet = IntervalSet;
|
|
62403
63664
|
|
|
62404
|
-
},{"../Decorators":
|
|
63665
|
+
},{"../Decorators":254,"../Lexer":262,"../Token":279,"./ArrayEqualityComparator":359,"./IntegerList":364,"./Interval":366,"./MurmurHash":369}],368:[function(require,module,exports){
|
|
62405
63666
|
"use strict";
|
|
62406
63667
|
/*!
|
|
62407
63668
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -62434,7 +63695,7 @@ class MultiMap extends Map {
|
|
|
62434
63695
|
}
|
|
62435
63696
|
exports.MultiMap = MultiMap;
|
|
62436
63697
|
|
|
62437
|
-
},{}],
|
|
63698
|
+
},{}],369:[function(require,module,exports){
|
|
62438
63699
|
"use strict";
|
|
62439
63700
|
/*!
|
|
62440
63701
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -62549,7 +63810,7 @@ var MurmurHash;
|
|
|
62549
63810
|
}
|
|
62550
63811
|
})(MurmurHash = exports.MurmurHash || (exports.MurmurHash = {}));
|
|
62551
63812
|
|
|
62552
|
-
},{}],
|
|
63813
|
+
},{}],370:[function(require,module,exports){
|
|
62553
63814
|
"use strict";
|
|
62554
63815
|
/*!
|
|
62555
63816
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -62608,7 +63869,7 @@ __decorate([
|
|
|
62608
63869
|
], ObjectEqualityComparator.prototype, "equals", null);
|
|
62609
63870
|
exports.ObjectEqualityComparator = ObjectEqualityComparator;
|
|
62610
63871
|
|
|
62611
|
-
},{"../Decorators":
|
|
63872
|
+
},{"../Decorators":254}],371:[function(require,module,exports){
|
|
62612
63873
|
"use strict";
|
|
62613
63874
|
/*!
|
|
62614
63875
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -62637,7 +63898,7 @@ class ParseCancellationException extends Error {
|
|
|
62637
63898
|
}
|
|
62638
63899
|
exports.ParseCancellationException = ParseCancellationException;
|
|
62639
63900
|
|
|
62640
|
-
},{}],
|
|
63901
|
+
},{}],372:[function(require,module,exports){
|
|
62641
63902
|
"use strict";
|
|
62642
63903
|
/*!
|
|
62643
63904
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -62691,7 +63952,7 @@ class UUID {
|
|
|
62691
63952
|
}
|
|
62692
63953
|
exports.UUID = UUID;
|
|
62693
63954
|
|
|
62694
|
-
},{"./MurmurHash":
|
|
63955
|
+
},{"./MurmurHash":369}],373:[function(require,module,exports){
|
|
62695
63956
|
"use strict";
|
|
62696
63957
|
/*!
|
|
62697
63958
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -62866,7 +64127,7 @@ exports.toCharArray = toCharArray;
|
|
|
62866
64127
|
// return s;
|
|
62867
64128
|
// }
|
|
62868
64129
|
|
|
62869
|
-
},{}],
|
|
64130
|
+
},{}],374:[function(require,module,exports){
|
|
62870
64131
|
"use strict";
|
|
62871
64132
|
/*!
|
|
62872
64133
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -62902,7 +64163,7 @@ __decorate([
|
|
|
62902
64163
|
], ErrorNode.prototype, "accept", null);
|
|
62903
64164
|
exports.ErrorNode = ErrorNode;
|
|
62904
64165
|
|
|
62905
|
-
},{"../Decorators":
|
|
64166
|
+
},{"../Decorators":254,"./TerminalNode":377}],375:[function(require,module,exports){
|
|
62906
64167
|
"use strict";
|
|
62907
64168
|
/*!
|
|
62908
64169
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -63007,7 +64268,7 @@ exports.ParseTreeWalker = ParseTreeWalker;
|
|
|
63007
64268
|
ParseTreeWalker.DEFAULT = new ParseTreeWalker();
|
|
63008
64269
|
})(ParseTreeWalker = exports.ParseTreeWalker || (exports.ParseTreeWalker = {}));
|
|
63009
64270
|
|
|
63010
|
-
},{"./ErrorNode":
|
|
64271
|
+
},{"./ErrorNode":374,"./RuleNode":376,"./TerminalNode":377}],376:[function(require,module,exports){
|
|
63011
64272
|
"use strict";
|
|
63012
64273
|
/*!
|
|
63013
64274
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -63019,7 +64280,7 @@ class RuleNode {
|
|
|
63019
64280
|
}
|
|
63020
64281
|
exports.RuleNode = RuleNode;
|
|
63021
64282
|
|
|
63022
|
-
},{}],
|
|
64283
|
+
},{}],377:[function(require,module,exports){
|
|
63023
64284
|
"use strict";
|
|
63024
64285
|
/*!
|
|
63025
64286
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -63111,7 +64372,7 @@ __decorate([
|
|
|
63111
64372
|
], TerminalNode.prototype, "toString", null);
|
|
63112
64373
|
exports.TerminalNode = TerminalNode;
|
|
63113
64374
|
|
|
63114
|
-
},{"../Decorators":
|
|
64375
|
+
},{"../Decorators":254,"../Token":279,"../misc/Interval":366}],378:[function(require,module,exports){
|
|
63115
64376
|
"use strict";
|
|
63116
64377
|
/*!
|
|
63117
64378
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -63355,7 +64616,7 @@ __decorate([
|
|
|
63355
64616
|
], Trees, "getRootOfSubtreeEnclosingRegion", null);
|
|
63356
64617
|
exports.Trees = Trees;
|
|
63357
64618
|
|
|
63358
|
-
},{"../CommonToken":
|
|
64619
|
+
},{"../CommonToken":250,"../Decorators":254,"../Parser":267,"../ParserRuleContext":270,"../Token":279,"../atn/ATN":287,"../misc/Utils":373,"./ErrorNode":374,"./RuleNode":376,"./TerminalNode":377}],379:[function(require,module,exports){
|
|
63359
64620
|
"use strict";
|
|
63360
64621
|
/*!
|
|
63361
64622
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -63379,7 +64640,7 @@ class Chunk {
|
|
|
63379
64640
|
}
|
|
63380
64641
|
exports.Chunk = Chunk;
|
|
63381
64642
|
|
|
63382
|
-
},{}],
|
|
64643
|
+
},{}],380:[function(require,module,exports){
|
|
63383
64644
|
"use strict";
|
|
63384
64645
|
/*!
|
|
63385
64646
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -63559,7 +64820,7 @@ ParseTreeMatch = __decorate([
|
|
|
63559
64820
|
], ParseTreeMatch);
|
|
63560
64821
|
exports.ParseTreeMatch = ParseTreeMatch;
|
|
63561
64822
|
|
|
63562
|
-
},{"../../Decorators":
|
|
64823
|
+
},{"../../Decorators":254}],381:[function(require,module,exports){
|
|
63563
64824
|
"use strict";
|
|
63564
64825
|
/*!
|
|
63565
64826
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -63717,7 +64978,7 @@ ParseTreePattern = __decorate([
|
|
|
63717
64978
|
], ParseTreePattern);
|
|
63718
64979
|
exports.ParseTreePattern = ParseTreePattern;
|
|
63719
64980
|
|
|
63720
|
-
},{"../../Decorators":
|
|
64981
|
+
},{"../../Decorators":254,"../xpath/XPath":387}],382:[function(require,module,exports){
|
|
63721
64982
|
"use strict";
|
|
63722
64983
|
/*!
|
|
63723
64984
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64195,7 +65456,7 @@ exports.ParseTreePatternMatcher = ParseTreePatternMatcher;
|
|
|
64195
65456
|
ParseTreePatternMatcher.StartRuleDoesNotConsumeFullPattern = StartRuleDoesNotConsumeFullPattern;
|
|
64196
65457
|
})(ParseTreePatternMatcher = exports.ParseTreePatternMatcher || (exports.ParseTreePatternMatcher = {}));
|
|
64197
65458
|
|
|
64198
|
-
},{"../../BailErrorStrategy":
|
|
65459
|
+
},{"../../BailErrorStrategy":244,"../../CharStreams":247,"../../CommonTokenStream":252,"../../Decorators":254,"../../ListTokenSource":265,"../../ParserInterpreter":269,"../../ParserRuleContext":270,"../../RecognitionException":273,"../../Token":279,"../../misc/MultiMap":368,"../../misc/ParseCancellationException":371,"../RuleNode":376,"../TerminalNode":377,"./ParseTreeMatch":380,"./ParseTreePattern":381,"./RuleTagToken":383,"./TagChunk":384,"./TextChunk":385,"./TokenTagToken":386}],383:[function(require,module,exports){
|
|
64199
65460
|
"use strict";
|
|
64200
65461
|
/*!
|
|
64201
65462
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64393,7 +65654,7 @@ RuleTagToken = __decorate([
|
|
|
64393
65654
|
], RuleTagToken);
|
|
64394
65655
|
exports.RuleTagToken = RuleTagToken;
|
|
64395
65656
|
|
|
64396
|
-
},{"../../Decorators":
|
|
65657
|
+
},{"../../Decorators":254,"../../Token":279}],384:[function(require,module,exports){
|
|
64397
65658
|
"use strict";
|
|
64398
65659
|
/*!
|
|
64399
65660
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64480,7 +65741,7 @@ __decorate([
|
|
|
64480
65741
|
], TagChunk.prototype, "toString", null);
|
|
64481
65742
|
exports.TagChunk = TagChunk;
|
|
64482
65743
|
|
|
64483
|
-
},{"../../Decorators":
|
|
65744
|
+
},{"../../Decorators":254,"./Chunk":379}],385:[function(require,module,exports){
|
|
64484
65745
|
"use strict";
|
|
64485
65746
|
/*!
|
|
64486
65747
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64550,7 +65811,7 @@ TextChunk = __decorate([
|
|
|
64550
65811
|
], TextChunk);
|
|
64551
65812
|
exports.TextChunk = TextChunk;
|
|
64552
65813
|
|
|
64553
|
-
},{"../../Decorators":
|
|
65814
|
+
},{"../../Decorators":254,"./Chunk":379}],386:[function(require,module,exports){
|
|
64554
65815
|
"use strict";
|
|
64555
65816
|
/*!
|
|
64556
65817
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64645,7 +65906,7 @@ TokenTagToken = __decorate([
|
|
|
64645
65906
|
], TokenTagToken);
|
|
64646
65907
|
exports.TokenTagToken = TokenTagToken;
|
|
64647
65908
|
|
|
64648
|
-
},{"../../CommonToken":
|
|
65909
|
+
},{"../../CommonToken":250,"../../Decorators":254}],387:[function(require,module,exports){
|
|
64649
65910
|
"use strict";
|
|
64650
65911
|
/*!
|
|
64651
65912
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64842,7 +66103,7 @@ exports.XPath = XPath;
|
|
|
64842
66103
|
XPath.WILDCARD = "*"; // word not operator/separator
|
|
64843
66104
|
XPath.NOT = "!"; // word for invert operator
|
|
64844
66105
|
|
|
64845
|
-
},{"../../CharStreams":
|
|
66106
|
+
},{"../../CharStreams":247,"../../CommonTokenStream":252,"../../LexerNoViableAltException":264,"../../ParserRuleContext":270,"../../Token":279,"./XPathLexer":389,"./XPathLexerErrorListener":390,"./XPathRuleAnywhereElement":391,"./XPathRuleElement":392,"./XPathTokenAnywhereElement":393,"./XPathTokenElement":394,"./XPathWildcardAnywhereElement":395,"./XPathWildcardElement":396}],388:[function(require,module,exports){
|
|
64846
66107
|
"use strict";
|
|
64847
66108
|
/*!
|
|
64848
66109
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64877,7 +66138,7 @@ __decorate([
|
|
|
64877
66138
|
], XPathElement.prototype, "toString", null);
|
|
64878
66139
|
exports.XPathElement = XPathElement;
|
|
64879
66140
|
|
|
64880
|
-
},{"../../Decorators":
|
|
66141
|
+
},{"../../Decorators":254}],389:[function(require,module,exports){
|
|
64881
66142
|
"use strict";
|
|
64882
66143
|
// Generated from XPathLexer.g4 by ANTLR 4.9.0-SNAPSHOT
|
|
64883
66144
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -65352,7 +66613,7 @@ XPathLexer._serializedATN = Utils.join([
|
|
|
65352
66613
|
XPathLexer._serializedATNSegment1,
|
|
65353
66614
|
], "");
|
|
65354
66615
|
|
|
65355
|
-
},{"../../Lexer":
|
|
66616
|
+
},{"../../Lexer":262,"../../VocabularyImpl":285,"../../atn/ATNDeserializer":291,"../../atn/LexerATNSimulator":312,"../../misc/Utils":373}],390:[function(require,module,exports){
|
|
65356
66617
|
"use strict";
|
|
65357
66618
|
/*!
|
|
65358
66619
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65377,7 +66638,7 @@ __decorate([
|
|
|
65377
66638
|
], XPathLexerErrorListener.prototype, "syntaxError", null);
|
|
65378
66639
|
exports.XPathLexerErrorListener = XPathLexerErrorListener;
|
|
65379
66640
|
|
|
65380
|
-
},{"../../Decorators":
|
|
66641
|
+
},{"../../Decorators":254}],391:[function(require,module,exports){
|
|
65381
66642
|
"use strict";
|
|
65382
66643
|
/*!
|
|
65383
66644
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65411,7 +66672,7 @@ __decorate([
|
|
|
65411
66672
|
], XPathRuleAnywhereElement.prototype, "evaluate", null);
|
|
65412
66673
|
exports.XPathRuleAnywhereElement = XPathRuleAnywhereElement;
|
|
65413
66674
|
|
|
65414
|
-
},{"../../Decorators":
|
|
66675
|
+
},{"../../Decorators":254,"../Trees":378,"./XPathElement":388}],392:[function(require,module,exports){
|
|
65415
66676
|
"use strict";
|
|
65416
66677
|
/*!
|
|
65417
66678
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65454,7 +66715,7 @@ __decorate([
|
|
|
65454
66715
|
], XPathRuleElement.prototype, "evaluate", null);
|
|
65455
66716
|
exports.XPathRuleElement = XPathRuleElement;
|
|
65456
66717
|
|
|
65457
|
-
},{"../../Decorators":
|
|
66718
|
+
},{"../../Decorators":254,"../../ParserRuleContext":270,"../Trees":378,"./XPathElement":388}],393:[function(require,module,exports){
|
|
65458
66719
|
"use strict";
|
|
65459
66720
|
/*!
|
|
65460
66721
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65486,7 +66747,7 @@ __decorate([
|
|
|
65486
66747
|
], XPathTokenAnywhereElement.prototype, "evaluate", null);
|
|
65487
66748
|
exports.XPathTokenAnywhereElement = XPathTokenAnywhereElement;
|
|
65488
66749
|
|
|
65489
|
-
},{"../../Decorators":
|
|
66750
|
+
},{"../../Decorators":254,"../Trees":378,"./XPathElement":388}],394:[function(require,module,exports){
|
|
65490
66751
|
"use strict";
|
|
65491
66752
|
/*!
|
|
65492
66753
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65529,7 +66790,7 @@ __decorate([
|
|
|
65529
66790
|
], XPathTokenElement.prototype, "evaluate", null);
|
|
65530
66791
|
exports.XPathTokenElement = XPathTokenElement;
|
|
65531
66792
|
|
|
65532
|
-
},{"../../Decorators":
|
|
66793
|
+
},{"../../Decorators":254,"../TerminalNode":377,"../Trees":378,"./XPathElement":388}],395:[function(require,module,exports){
|
|
65533
66794
|
"use strict";
|
|
65534
66795
|
/*!
|
|
65535
66796
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65565,7 +66826,7 @@ __decorate([
|
|
|
65565
66826
|
], XPathWildcardAnywhereElement.prototype, "evaluate", null);
|
|
65566
66827
|
exports.XPathWildcardAnywhereElement = XPathWildcardAnywhereElement;
|
|
65567
66828
|
|
|
65568
|
-
},{"../../Decorators":
|
|
66829
|
+
},{"../../Decorators":254,"../Trees":378,"./XPath":387,"./XPathElement":388}],396:[function(require,module,exports){
|
|
65569
66830
|
"use strict";
|
|
65570
66831
|
/*!
|
|
65571
66832
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65605,7 +66866,7 @@ __decorate([
|
|
|
65605
66866
|
], XPathWildcardElement.prototype, "evaluate", null);
|
|
65606
66867
|
exports.XPathWildcardElement = XPathWildcardElement;
|
|
65607
66868
|
|
|
65608
|
-
},{"../../Decorators":
|
|
66869
|
+
},{"../../Decorators":254,"../Trees":378,"./XPath":387,"./XPathElement":388}],397:[function(require,module,exports){
|
|
65609
66870
|
(function (global){(function (){
|
|
65610
66871
|
'use strict';
|
|
65611
66872
|
|
|
@@ -66115,7 +67376,7 @@ var objectKeys = Object.keys || function (obj) {
|
|
|
66115
67376
|
};
|
|
66116
67377
|
|
|
66117
67378
|
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
66118
|
-
},{"object.assign/polyfill":
|
|
67379
|
+
},{"object.assign/polyfill":454,"util/":400}],398:[function(require,module,exports){
|
|
66119
67380
|
if (typeof Object.create === 'function') {
|
|
66120
67381
|
// implementation from standard node.js 'util' module
|
|
66121
67382
|
module.exports = function inherits(ctor, superCtor) {
|
|
@@ -66140,14 +67401,14 @@ if (typeof Object.create === 'function') {
|
|
|
66140
67401
|
}
|
|
66141
67402
|
}
|
|
66142
67403
|
|
|
66143
|
-
},{}],
|
|
67404
|
+
},{}],399:[function(require,module,exports){
|
|
66144
67405
|
module.exports = function isBuffer(arg) {
|
|
66145
67406
|
return arg && typeof arg === 'object'
|
|
66146
67407
|
&& typeof arg.copy === 'function'
|
|
66147
67408
|
&& typeof arg.fill === 'function'
|
|
66148
67409
|
&& typeof arg.readUInt8 === 'function';
|
|
66149
67410
|
}
|
|
66150
|
-
},{}],
|
|
67411
|
+
},{}],400:[function(require,module,exports){
|
|
66151
67412
|
(function (process,global){(function (){
|
|
66152
67413
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
66153
67414
|
//
|
|
@@ -66737,7 +67998,7 @@ function hasOwnProperty(obj, prop) {
|
|
|
66737
67998
|
}
|
|
66738
67999
|
|
|
66739
68000
|
}).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
66740
|
-
},{"./support/isBuffer":
|
|
68001
|
+
},{"./support/isBuffer":399,"_process":456,"inherits":398}],401:[function(require,module,exports){
|
|
66741
68002
|
(function (global){(function (){
|
|
66742
68003
|
'use strict';
|
|
66743
68004
|
|
|
@@ -66758,7 +68019,7 @@ module.exports = function availableTypedArrays() {
|
|
|
66758
68019
|
};
|
|
66759
68020
|
|
|
66760
68021
|
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
66761
|
-
},{"possible-typed-array-names":
|
|
68022
|
+
},{"possible-typed-array-names":455}],402:[function(require,module,exports){
|
|
66762
68023
|
(function (process,global){(function (){
|
|
66763
68024
|
module.exports = process.hrtime || hrtime
|
|
66764
68025
|
|
|
@@ -66789,7 +68050,7 @@ function hrtime(previousTimestamp){
|
|
|
66789
68050
|
return [seconds,nanoseconds]
|
|
66790
68051
|
}
|
|
66791
68052
|
}).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
66792
|
-
},{"_process":
|
|
68053
|
+
},{"_process":456}],403:[function(require,module,exports){
|
|
66793
68054
|
'use strict';
|
|
66794
68055
|
|
|
66795
68056
|
var bind = require('function-bind');
|
|
@@ -66801,7 +68062,7 @@ var $reflectApply = require('./reflectApply');
|
|
|
66801
68062
|
/** @type {import('./actualApply')} */
|
|
66802
68063
|
module.exports = $reflectApply || bind.call($call, $apply);
|
|
66803
68064
|
|
|
66804
|
-
},{"./functionApply":
|
|
68065
|
+
},{"./functionApply":405,"./functionCall":406,"./reflectApply":408,"function-bind":424}],404:[function(require,module,exports){
|
|
66805
68066
|
'use strict';
|
|
66806
68067
|
|
|
66807
68068
|
var bind = require('function-bind');
|
|
@@ -66813,19 +68074,19 @@ module.exports = function applyBind() {
|
|
|
66813
68074
|
return actualApply(bind, $apply, arguments);
|
|
66814
68075
|
};
|
|
66815
68076
|
|
|
66816
|
-
},{"./actualApply":
|
|
68077
|
+
},{"./actualApply":403,"./functionApply":405,"function-bind":424}],405:[function(require,module,exports){
|
|
66817
68078
|
'use strict';
|
|
66818
68079
|
|
|
66819
68080
|
/** @type {import('./functionApply')} */
|
|
66820
68081
|
module.exports = Function.prototype.apply;
|
|
66821
68082
|
|
|
66822
|
-
},{}],
|
|
68083
|
+
},{}],406:[function(require,module,exports){
|
|
66823
68084
|
'use strict';
|
|
66824
68085
|
|
|
66825
68086
|
/** @type {import('./functionCall')} */
|
|
66826
68087
|
module.exports = Function.prototype.call;
|
|
66827
68088
|
|
|
66828
|
-
},{}],
|
|
68089
|
+
},{}],407:[function(require,module,exports){
|
|
66829
68090
|
'use strict';
|
|
66830
68091
|
|
|
66831
68092
|
var bind = require('function-bind');
|
|
@@ -66842,13 +68103,13 @@ module.exports = function callBindBasic(args) {
|
|
|
66842
68103
|
return $actualApply(bind, $call, args);
|
|
66843
68104
|
};
|
|
66844
68105
|
|
|
66845
|
-
},{"./actualApply":
|
|
68106
|
+
},{"./actualApply":403,"./functionCall":406,"es-errors/type":419,"function-bind":424}],408:[function(require,module,exports){
|
|
66846
68107
|
'use strict';
|
|
66847
68108
|
|
|
66848
68109
|
/** @type {import('./reflectApply')} */
|
|
66849
68110
|
module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
66850
68111
|
|
|
66851
|
-
},{}],
|
|
68112
|
+
},{}],409:[function(require,module,exports){
|
|
66852
68113
|
'use strict';
|
|
66853
68114
|
|
|
66854
68115
|
var setFunctionLength = require('set-function-length');
|
|
@@ -66874,7 +68135,7 @@ if ($defineProperty) {
|
|
|
66874
68135
|
module.exports.apply = applyBind;
|
|
66875
68136
|
}
|
|
66876
68137
|
|
|
66877
|
-
},{"call-bind-apply-helpers":
|
|
68138
|
+
},{"call-bind-apply-helpers":407,"call-bind-apply-helpers/applyBind":404,"es-define-property":413,"set-function-length":458}],410:[function(require,module,exports){
|
|
66878
68139
|
'use strict';
|
|
66879
68140
|
|
|
66880
68141
|
var GetIntrinsic = require('get-intrinsic');
|
|
@@ -66895,7 +68156,7 @@ module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
|
66895
68156
|
return intrinsic;
|
|
66896
68157
|
};
|
|
66897
68158
|
|
|
66898
|
-
},{"call-bind-apply-helpers":
|
|
68159
|
+
},{"call-bind-apply-helpers":407,"get-intrinsic":425}],411:[function(require,module,exports){
|
|
66899
68160
|
'use strict';
|
|
66900
68161
|
|
|
66901
68162
|
var $defineProperty = require('es-define-property');
|
|
@@ -66953,7 +68214,7 @@ module.exports = function defineDataProperty(
|
|
|
66953
68214
|
}
|
|
66954
68215
|
};
|
|
66955
68216
|
|
|
66956
|
-
},{"es-define-property":
|
|
68217
|
+
},{"es-define-property":413,"es-errors/syntax":418,"es-errors/type":419,"gopd":430}],412:[function(require,module,exports){
|
|
66957
68218
|
'use strict';
|
|
66958
68219
|
|
|
66959
68220
|
var callBind = require('call-bind-apply-helpers');
|
|
@@ -66985,7 +68246,7 @@ module.exports = desc && typeof desc.get === 'function'
|
|
|
66985
68246
|
}
|
|
66986
68247
|
: false;
|
|
66987
68248
|
|
|
66988
|
-
},{"call-bind-apply-helpers":
|
|
68249
|
+
},{"call-bind-apply-helpers":407,"gopd":430}],413:[function(require,module,exports){
|
|
66989
68250
|
'use strict';
|
|
66990
68251
|
|
|
66991
68252
|
/** @type {import('.')} */
|
|
@@ -67001,55 +68262,55 @@ if ($defineProperty) {
|
|
|
67001
68262
|
|
|
67002
68263
|
module.exports = $defineProperty;
|
|
67003
68264
|
|
|
67004
|
-
},{}],
|
|
68265
|
+
},{}],414:[function(require,module,exports){
|
|
67005
68266
|
'use strict';
|
|
67006
68267
|
|
|
67007
68268
|
/** @type {import('./eval')} */
|
|
67008
68269
|
module.exports = EvalError;
|
|
67009
68270
|
|
|
67010
|
-
},{}],
|
|
68271
|
+
},{}],415:[function(require,module,exports){
|
|
67011
68272
|
'use strict';
|
|
67012
68273
|
|
|
67013
68274
|
/** @type {import('.')} */
|
|
67014
68275
|
module.exports = Error;
|
|
67015
68276
|
|
|
67016
|
-
},{}],
|
|
68277
|
+
},{}],416:[function(require,module,exports){
|
|
67017
68278
|
'use strict';
|
|
67018
68279
|
|
|
67019
68280
|
/** @type {import('./range')} */
|
|
67020
68281
|
module.exports = RangeError;
|
|
67021
68282
|
|
|
67022
|
-
},{}],
|
|
68283
|
+
},{}],417:[function(require,module,exports){
|
|
67023
68284
|
'use strict';
|
|
67024
68285
|
|
|
67025
68286
|
/** @type {import('./ref')} */
|
|
67026
68287
|
module.exports = ReferenceError;
|
|
67027
68288
|
|
|
67028
|
-
},{}],
|
|
68289
|
+
},{}],418:[function(require,module,exports){
|
|
67029
68290
|
'use strict';
|
|
67030
68291
|
|
|
67031
68292
|
/** @type {import('./syntax')} */
|
|
67032
68293
|
module.exports = SyntaxError;
|
|
67033
68294
|
|
|
67034
|
-
},{}],
|
|
68295
|
+
},{}],419:[function(require,module,exports){
|
|
67035
68296
|
'use strict';
|
|
67036
68297
|
|
|
67037
68298
|
/** @type {import('./type')} */
|
|
67038
68299
|
module.exports = TypeError;
|
|
67039
68300
|
|
|
67040
|
-
},{}],
|
|
68301
|
+
},{}],420:[function(require,module,exports){
|
|
67041
68302
|
'use strict';
|
|
67042
68303
|
|
|
67043
68304
|
/** @type {import('./uri')} */
|
|
67044
68305
|
module.exports = URIError;
|
|
67045
68306
|
|
|
67046
|
-
},{}],
|
|
68307
|
+
},{}],421:[function(require,module,exports){
|
|
67047
68308
|
'use strict';
|
|
67048
68309
|
|
|
67049
68310
|
/** @type {import('.')} */
|
|
67050
68311
|
module.exports = Object;
|
|
67051
68312
|
|
|
67052
|
-
},{}],
|
|
68313
|
+
},{}],422:[function(require,module,exports){
|
|
67053
68314
|
'use strict';
|
|
67054
68315
|
|
|
67055
68316
|
var isCallable = require('is-callable');
|
|
@@ -67120,7 +68381,7 @@ module.exports = function forEach(list, iterator, thisArg) {
|
|
|
67120
68381
|
}
|
|
67121
68382
|
};
|
|
67122
68383
|
|
|
67123
|
-
},{"is-callable":
|
|
68384
|
+
},{"is-callable":438}],423:[function(require,module,exports){
|
|
67124
68385
|
'use strict';
|
|
67125
68386
|
|
|
67126
68387
|
/* eslint no-invalid-this: 1 */
|
|
@@ -67206,14 +68467,14 @@ module.exports = function bind(that) {
|
|
|
67206
68467
|
return bound;
|
|
67207
68468
|
};
|
|
67208
68469
|
|
|
67209
|
-
},{}],
|
|
68470
|
+
},{}],424:[function(require,module,exports){
|
|
67210
68471
|
'use strict';
|
|
67211
68472
|
|
|
67212
68473
|
var implementation = require('./implementation');
|
|
67213
68474
|
|
|
67214
68475
|
module.exports = Function.prototype.bind || implementation;
|
|
67215
68476
|
|
|
67216
|
-
},{"./implementation":
|
|
68477
|
+
},{"./implementation":423}],425:[function(require,module,exports){
|
|
67217
68478
|
'use strict';
|
|
67218
68479
|
|
|
67219
68480
|
var undefined;
|
|
@@ -67593,7 +68854,7 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
|
|
67593
68854
|
return value;
|
|
67594
68855
|
};
|
|
67595
68856
|
|
|
67596
|
-
},{"call-bind-apply-helpers/functionApply":
|
|
68857
|
+
},{"call-bind-apply-helpers/functionApply":405,"call-bind-apply-helpers/functionCall":406,"es-define-property":413,"es-errors":415,"es-errors/eval":414,"es-errors/range":416,"es-errors/ref":417,"es-errors/syntax":418,"es-errors/type":419,"es-errors/uri":420,"es-object-atoms":421,"function-bind":424,"get-proto":428,"get-proto/Object.getPrototypeOf":426,"get-proto/Reflect.getPrototypeOf":427,"gopd":430,"has-symbols":432,"hasown":435,"math-intrinsics/abs":442,"math-intrinsics/floor":443,"math-intrinsics/max":445,"math-intrinsics/min":446,"math-intrinsics/pow":447,"math-intrinsics/round":448,"math-intrinsics/sign":449}],426:[function(require,module,exports){
|
|
67597
68858
|
'use strict';
|
|
67598
68859
|
|
|
67599
68860
|
var $Object = require('es-object-atoms');
|
|
@@ -67601,13 +68862,13 @@ var $Object = require('es-object-atoms');
|
|
|
67601
68862
|
/** @type {import('./Object.getPrototypeOf')} */
|
|
67602
68863
|
module.exports = $Object.getPrototypeOf || null;
|
|
67603
68864
|
|
|
67604
|
-
},{"es-object-atoms":
|
|
68865
|
+
},{"es-object-atoms":421}],427:[function(require,module,exports){
|
|
67605
68866
|
'use strict';
|
|
67606
68867
|
|
|
67607
68868
|
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
67608
68869
|
module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
|
|
67609
68870
|
|
|
67610
|
-
},{}],
|
|
68871
|
+
},{}],428:[function(require,module,exports){
|
|
67611
68872
|
'use strict';
|
|
67612
68873
|
|
|
67613
68874
|
var reflectGetProto = require('./Reflect.getPrototypeOf');
|
|
@@ -67636,13 +68897,13 @@ module.exports = reflectGetProto
|
|
|
67636
68897
|
}
|
|
67637
68898
|
: null;
|
|
67638
68899
|
|
|
67639
|
-
},{"./Object.getPrototypeOf":
|
|
68900
|
+
},{"./Object.getPrototypeOf":426,"./Reflect.getPrototypeOf":427,"dunder-proto/get":412}],429:[function(require,module,exports){
|
|
67640
68901
|
'use strict';
|
|
67641
68902
|
|
|
67642
68903
|
/** @type {import('./gOPD')} */
|
|
67643
68904
|
module.exports = Object.getOwnPropertyDescriptor;
|
|
67644
68905
|
|
|
67645
|
-
},{}],
|
|
68906
|
+
},{}],430:[function(require,module,exports){
|
|
67646
68907
|
'use strict';
|
|
67647
68908
|
|
|
67648
68909
|
/** @type {import('.')} */
|
|
@@ -67659,7 +68920,7 @@ if ($gOPD) {
|
|
|
67659
68920
|
|
|
67660
68921
|
module.exports = $gOPD;
|
|
67661
68922
|
|
|
67662
|
-
},{"./gOPD":
|
|
68923
|
+
},{"./gOPD":429}],431:[function(require,module,exports){
|
|
67663
68924
|
'use strict';
|
|
67664
68925
|
|
|
67665
68926
|
var $defineProperty = require('es-define-property');
|
|
@@ -67683,7 +68944,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
|
|
|
67683
68944
|
|
|
67684
68945
|
module.exports = hasPropertyDescriptors;
|
|
67685
68946
|
|
|
67686
|
-
},{"es-define-property":
|
|
68947
|
+
},{"es-define-property":413}],432:[function(require,module,exports){
|
|
67687
68948
|
'use strict';
|
|
67688
68949
|
|
|
67689
68950
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
@@ -67699,7 +68960,7 @@ module.exports = function hasNativeSymbols() {
|
|
|
67699
68960
|
return hasSymbolSham();
|
|
67700
68961
|
};
|
|
67701
68962
|
|
|
67702
|
-
},{"./shams":
|
|
68963
|
+
},{"./shams":433}],433:[function(require,module,exports){
|
|
67703
68964
|
'use strict';
|
|
67704
68965
|
|
|
67705
68966
|
/** @type {import('./shams')} */
|
|
@@ -67746,7 +69007,7 @@ module.exports = function hasSymbols() {
|
|
|
67746
69007
|
return true;
|
|
67747
69008
|
};
|
|
67748
69009
|
|
|
67749
|
-
},{}],
|
|
69010
|
+
},{}],434:[function(require,module,exports){
|
|
67750
69011
|
'use strict';
|
|
67751
69012
|
|
|
67752
69013
|
var hasSymbols = require('has-symbols/shams');
|
|
@@ -67756,7 +69017,7 @@ module.exports = function hasToStringTagShams() {
|
|
|
67756
69017
|
return hasSymbols() && !!Symbol.toStringTag;
|
|
67757
69018
|
};
|
|
67758
69019
|
|
|
67759
|
-
},{"has-symbols/shams":
|
|
69020
|
+
},{"has-symbols/shams":433}],435:[function(require,module,exports){
|
|
67760
69021
|
'use strict';
|
|
67761
69022
|
|
|
67762
69023
|
var call = Function.prototype.call;
|
|
@@ -67766,7 +69027,7 @@ var bind = require('function-bind');
|
|
|
67766
69027
|
/** @type {import('.')} */
|
|
67767
69028
|
module.exports = bind.call(call, $hasOwn);
|
|
67768
69029
|
|
|
67769
|
-
},{"function-bind":
|
|
69030
|
+
},{"function-bind":424}],436:[function(require,module,exports){
|
|
67770
69031
|
if (typeof Object.create === 'function') {
|
|
67771
69032
|
// implementation from standard node.js 'util' module
|
|
67772
69033
|
module.exports = function inherits(ctor, superCtor) {
|
|
@@ -67795,7 +69056,7 @@ if (typeof Object.create === 'function') {
|
|
|
67795
69056
|
}
|
|
67796
69057
|
}
|
|
67797
69058
|
|
|
67798
|
-
},{}],
|
|
69059
|
+
},{}],437:[function(require,module,exports){
|
|
67799
69060
|
'use strict';
|
|
67800
69061
|
|
|
67801
69062
|
var hasToStringTag = require('has-tostringtag/shams')();
|
|
@@ -67841,7 +69102,7 @@ isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
|
|
|
67841
69102
|
/** @type {import('.')} */
|
|
67842
69103
|
module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
|
|
67843
69104
|
|
|
67844
|
-
},{"call-bound":
|
|
69105
|
+
},{"call-bound":410,"has-tostringtag/shams":434}],438:[function(require,module,exports){
|
|
67845
69106
|
'use strict';
|
|
67846
69107
|
|
|
67847
69108
|
var fnToStr = Function.prototype.toString;
|
|
@@ -67944,7 +69205,7 @@ module.exports = reflectApply
|
|
|
67944
69205
|
return tryFunctionObject(value);
|
|
67945
69206
|
};
|
|
67946
69207
|
|
|
67947
|
-
},{}],
|
|
69208
|
+
},{}],439:[function(require,module,exports){
|
|
67948
69209
|
'use strict';
|
|
67949
69210
|
|
|
67950
69211
|
var callBound = require('call-bound');
|
|
@@ -67993,7 +69254,7 @@ module.exports = function isGeneratorFunction(fn) {
|
|
|
67993
69254
|
return getProto(fn) === GeneratorFunction;
|
|
67994
69255
|
};
|
|
67995
69256
|
|
|
67996
|
-
},{"call-bound":
|
|
69257
|
+
},{"call-bound":410,"get-proto":428,"has-tostringtag/shams":434,"safe-regex-test":457}],440:[function(require,module,exports){
|
|
67997
69258
|
'use strict';
|
|
67998
69259
|
|
|
67999
69260
|
var callBound = require('call-bound');
|
|
@@ -68064,7 +69325,7 @@ if (hasToStringTag) {
|
|
|
68064
69325
|
|
|
68065
69326
|
module.exports = fn;
|
|
68066
69327
|
|
|
68067
|
-
},{"call-bound":
|
|
69328
|
+
},{"call-bound":410,"gopd":430,"has-tostringtag/shams":434,"hasown":435}],441:[function(require,module,exports){
|
|
68068
69329
|
'use strict';
|
|
68069
69330
|
|
|
68070
69331
|
var whichTypedArray = require('which-typed-array');
|
|
@@ -68074,19 +69335,19 @@ module.exports = function isTypedArray(value) {
|
|
|
68074
69335
|
return !!whichTypedArray(value);
|
|
68075
69336
|
};
|
|
68076
69337
|
|
|
68077
|
-
},{"which-typed-array":
|
|
69338
|
+
},{"which-typed-array":462}],442:[function(require,module,exports){
|
|
68078
69339
|
'use strict';
|
|
68079
69340
|
|
|
68080
69341
|
/** @type {import('./abs')} */
|
|
68081
69342
|
module.exports = Math.abs;
|
|
68082
69343
|
|
|
68083
|
-
},{}],
|
|
69344
|
+
},{}],443:[function(require,module,exports){
|
|
68084
69345
|
'use strict';
|
|
68085
69346
|
|
|
68086
69347
|
/** @type {import('./floor')} */
|
|
68087
69348
|
module.exports = Math.floor;
|
|
68088
69349
|
|
|
68089
|
-
},{}],
|
|
69350
|
+
},{}],444:[function(require,module,exports){
|
|
68090
69351
|
'use strict';
|
|
68091
69352
|
|
|
68092
69353
|
/** @type {import('./isNaN')} */
|
|
@@ -68094,31 +69355,31 @@ module.exports = Number.isNaN || function isNaN(a) {
|
|
|
68094
69355
|
return a !== a;
|
|
68095
69356
|
};
|
|
68096
69357
|
|
|
68097
|
-
},{}],
|
|
69358
|
+
},{}],445:[function(require,module,exports){
|
|
68098
69359
|
'use strict';
|
|
68099
69360
|
|
|
68100
69361
|
/** @type {import('./max')} */
|
|
68101
69362
|
module.exports = Math.max;
|
|
68102
69363
|
|
|
68103
|
-
},{}],
|
|
69364
|
+
},{}],446:[function(require,module,exports){
|
|
68104
69365
|
'use strict';
|
|
68105
69366
|
|
|
68106
69367
|
/** @type {import('./min')} */
|
|
68107
69368
|
module.exports = Math.min;
|
|
68108
69369
|
|
|
68109
|
-
},{}],
|
|
69370
|
+
},{}],447:[function(require,module,exports){
|
|
68110
69371
|
'use strict';
|
|
68111
69372
|
|
|
68112
69373
|
/** @type {import('./pow')} */
|
|
68113
69374
|
module.exports = Math.pow;
|
|
68114
69375
|
|
|
68115
|
-
},{}],
|
|
69376
|
+
},{}],448:[function(require,module,exports){
|
|
68116
69377
|
'use strict';
|
|
68117
69378
|
|
|
68118
69379
|
/** @type {import('./round')} */
|
|
68119
69380
|
module.exports = Math.round;
|
|
68120
69381
|
|
|
68121
|
-
},{}],
|
|
69382
|
+
},{}],449:[function(require,module,exports){
|
|
68122
69383
|
'use strict';
|
|
68123
69384
|
|
|
68124
69385
|
var $isNaN = require('./isNaN');
|
|
@@ -68131,7 +69392,7 @@ module.exports = function sign(number) {
|
|
|
68131
69392
|
return number < 0 ? -1 : +1;
|
|
68132
69393
|
};
|
|
68133
69394
|
|
|
68134
|
-
},{"./isNaN":
|
|
69395
|
+
},{"./isNaN":444}],450:[function(require,module,exports){
|
|
68135
69396
|
'use strict';
|
|
68136
69397
|
|
|
68137
69398
|
var keysShim;
|
|
@@ -68255,7 +69516,7 @@ if (!Object.keys) {
|
|
|
68255
69516
|
}
|
|
68256
69517
|
module.exports = keysShim;
|
|
68257
69518
|
|
|
68258
|
-
},{"./isArguments":
|
|
69519
|
+
},{"./isArguments":452}],451:[function(require,module,exports){
|
|
68259
69520
|
'use strict';
|
|
68260
69521
|
|
|
68261
69522
|
var slice = Array.prototype.slice;
|
|
@@ -68289,7 +69550,7 @@ keysShim.shim = function shimObjectKeys() {
|
|
|
68289
69550
|
|
|
68290
69551
|
module.exports = keysShim;
|
|
68291
69552
|
|
|
68292
|
-
},{"./implementation":
|
|
69553
|
+
},{"./implementation":450,"./isArguments":452}],452:[function(require,module,exports){
|
|
68293
69554
|
'use strict';
|
|
68294
69555
|
|
|
68295
69556
|
var toStr = Object.prototype.toString;
|
|
@@ -68308,7 +69569,7 @@ module.exports = function isArguments(value) {
|
|
|
68308
69569
|
return isArgs;
|
|
68309
69570
|
};
|
|
68310
69571
|
|
|
68311
|
-
},{}],
|
|
69572
|
+
},{}],453:[function(require,module,exports){
|
|
68312
69573
|
'use strict';
|
|
68313
69574
|
|
|
68314
69575
|
// modified from https://github.com/es-shims/es6-shim
|
|
@@ -68356,7 +69617,7 @@ module.exports = function assign(target, source1) {
|
|
|
68356
69617
|
return to; // step 4
|
|
68357
69618
|
};
|
|
68358
69619
|
|
|
68359
|
-
},{"call-bound":
|
|
69620
|
+
},{"call-bound":410,"es-object-atoms":421,"has-symbols/shams":433,"object-keys":451}],454:[function(require,module,exports){
|
|
68360
69621
|
'use strict';
|
|
68361
69622
|
|
|
68362
69623
|
var implementation = require('./implementation');
|
|
@@ -68413,7 +69674,7 @@ module.exports = function getPolyfill() {
|
|
|
68413
69674
|
return Object.assign;
|
|
68414
69675
|
};
|
|
68415
69676
|
|
|
68416
|
-
},{"./implementation":
|
|
69677
|
+
},{"./implementation":453}],455:[function(require,module,exports){
|
|
68417
69678
|
'use strict';
|
|
68418
69679
|
|
|
68419
69680
|
/** @type {import('.')} */
|
|
@@ -68432,7 +69693,7 @@ module.exports = [
|
|
|
68432
69693
|
'BigUint64Array'
|
|
68433
69694
|
];
|
|
68434
69695
|
|
|
68435
|
-
},{}],
|
|
69696
|
+
},{}],456:[function(require,module,exports){
|
|
68436
69697
|
// shim for using process in browser
|
|
68437
69698
|
var process = module.exports = {};
|
|
68438
69699
|
|
|
@@ -68618,7 +69879,7 @@ process.chdir = function (dir) {
|
|
|
68618
69879
|
};
|
|
68619
69880
|
process.umask = function() { return 0; };
|
|
68620
69881
|
|
|
68621
|
-
},{}],
|
|
69882
|
+
},{}],457:[function(require,module,exports){
|
|
68622
69883
|
'use strict';
|
|
68623
69884
|
|
|
68624
69885
|
var callBound = require('call-bound');
|
|
@@ -68637,7 +69898,7 @@ module.exports = function regexTester(regex) {
|
|
|
68637
69898
|
};
|
|
68638
69899
|
};
|
|
68639
69900
|
|
|
68640
|
-
},{"call-bound":
|
|
69901
|
+
},{"call-bound":410,"es-errors/type":419,"is-regex":440}],458:[function(require,module,exports){
|
|
68641
69902
|
'use strict';
|
|
68642
69903
|
|
|
68643
69904
|
var GetIntrinsic = require('get-intrinsic');
|
|
@@ -68681,9 +69942,9 @@ module.exports = function setFunctionLength(fn, length) {
|
|
|
68681
69942
|
return fn;
|
|
68682
69943
|
};
|
|
68683
69944
|
|
|
68684
|
-
},{"define-data-property":
|
|
68685
|
-
arguments[4][
|
|
68686
|
-
},{"dup":
|
|
69945
|
+
},{"define-data-property":411,"es-errors/type":419,"get-intrinsic":425,"gopd":430,"has-property-descriptors":431}],459:[function(require,module,exports){
|
|
69946
|
+
arguments[4][399][0].apply(exports,arguments)
|
|
69947
|
+
},{"dup":399}],460:[function(require,module,exports){
|
|
68687
69948
|
// Currently in sync with Node.js lib/internal/util/types.js
|
|
68688
69949
|
// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9
|
|
68689
69950
|
|
|
@@ -69019,7 +70280,7 @@ exports.isAnyArrayBuffer = isAnyArrayBuffer;
|
|
|
69019
70280
|
});
|
|
69020
70281
|
});
|
|
69021
70282
|
|
|
69022
|
-
},{"is-arguments":
|
|
70283
|
+
},{"is-arguments":437,"is-generator-function":439,"is-typed-array":441,"which-typed-array":462}],461:[function(require,module,exports){
|
|
69023
70284
|
(function (process){(function (){
|
|
69024
70285
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
69025
70286
|
//
|
|
@@ -69738,7 +70999,7 @@ function callbackify(original) {
|
|
|
69738
70999
|
exports.callbackify = callbackify;
|
|
69739
71000
|
|
|
69740
71001
|
}).call(this)}).call(this,require('_process'))
|
|
69741
|
-
},{"./support/isBuffer":
|
|
71002
|
+
},{"./support/isBuffer":459,"./support/types":460,"_process":456,"inherits":436}],462:[function(require,module,exports){
|
|
69742
71003
|
(function (global){(function (){
|
|
69743
71004
|
'use strict';
|
|
69744
71005
|
|
|
@@ -69859,5 +71120,5 @@ module.exports = function whichTypedArray(value) {
|
|
|
69859
71120
|
};
|
|
69860
71121
|
|
|
69861
71122
|
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
69862
|
-
},{"available-typed-arrays":
|
|
71123
|
+
},{"available-typed-arrays":401,"call-bind":409,"call-bound":410,"for-each":422,"get-proto":428,"gopd":430,"has-tostringtag/shams":434}]},{},[134])(134)
|
|
69863
71124
|
});
|