@designliquido/delegua 0.34.2 → 0.35.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/index.d.ts +1 -0
- package/analisador-semantico/index.d.ts.map +1 -1
- package/analisador-semantico/index.js +1 -0
- package/analisador-semantico/index.js.map +1 -1
- package/avaliador-sintatico/dialetos/index.d.ts +0 -1
- package/avaliador-sintatico/dialetos/index.d.ts.map +1 -1
- package/avaliador-sintatico/dialetos/index.js +0 -1
- package/avaliador-sintatico/dialetos/index.js.map +1 -1
- package/bibliotecas/biblioteca-global.d.ts +157 -3
- package/bibliotecas/biblioteca-global.d.ts.map +1 -1
- package/bibliotecas/biblioteca-global.js +488 -308
- package/bibliotecas/biblioteca-global.js.map +1 -1
- package/bin/package.json +4 -3
- package/estruturas/funcao-padrao.d.ts +0 -1
- package/estruturas/funcao-padrao.d.ts.map +1 -1
- package/estruturas/funcao-padrao.js +1 -4
- package/estruturas/funcao-padrao.js.map +1 -1
- package/interpretador/comum.d.ts +3 -0
- package/interpretador/comum.d.ts.map +1 -0
- package/interpretador/comum.js +53 -0
- package/interpretador/comum.js.map +1 -0
- package/interpretador/dialetos/index.d.ts +0 -1
- package/interpretador/dialetos/index.d.ts.map +1 -1
- package/interpretador/dialetos/index.js +0 -1
- package/interpretador/dialetos/index.js.map +1 -1
- package/interpretador/interpretador-base.d.ts +2 -2
- package/interpretador/interpretador-base.d.ts.map +1 -1
- package/interpretador/interpretador-base.js +7 -7
- package/interpretador/interpretador-base.js.map +1 -1
- package/interpretador/pilha-escopos-execucao.d.ts.map +1 -1
- package/interpretador/pilha-escopos-execucao.js +2 -0
- package/interpretador/pilha-escopos-execucao.js.map +1 -1
- package/lexador/dialetos/index.d.ts +0 -2
- package/lexador/dialetos/index.d.ts.map +1 -1
- package/lexador/dialetos/index.js +0 -2
- package/lexador/dialetos/index.js.map +1 -1
- package/package.json +4 -3
- package/umd/delegua.js +934 -1911
- package/analisador-semantico/dialetos/analisador-semantico-mapler.d.ts +0 -30
- package/analisador-semantico/dialetos/analisador-semantico-mapler.d.ts.map +0 -1
- package/analisador-semantico/dialetos/analisador-semantico-mapler.js +0 -104
- package/analisador-semantico/dialetos/analisador-semantico-mapler.js.map +0 -1
- package/analisador-semantico/dialetos/index.d.ts +0 -2
- package/analisador-semantico/dialetos/index.d.ts.map +0 -1
- package/analisador-semantico/dialetos/index.js +0 -18
- package/analisador-semantico/dialetos/index.js.map +0 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-mapler.d.ts +0 -62
- package/avaliador-sintatico/dialetos/avaliador-sintatico-mapler.d.ts.map +0 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-mapler.js +0 -486
- package/avaliador-sintatico/dialetos/avaliador-sintatico-mapler.js.map +0 -1
- package/interpretador/dialetos/mapler/comum.d.ts +0 -11
- package/interpretador/dialetos/mapler/comum.d.ts.map +0 -1
- package/interpretador/dialetos/mapler/comum.js +0 -138
- package/interpretador/dialetos/mapler/comum.js.map +0 -1
- package/interpretador/dialetos/mapler/index.d.ts +0 -3
- package/interpretador/dialetos/mapler/index.d.ts.map +0 -1
- package/interpretador/dialetos/mapler/index.js +0 -19
- package/interpretador/dialetos/mapler/index.js.map +0 -1
- package/interpretador/dialetos/mapler/interpretador-mapler-com-depuracao.d.ts +0 -48
- package/interpretador/dialetos/mapler/interpretador-mapler-com-depuracao.d.ts.map +0 -1
- package/interpretador/dialetos/mapler/interpretador-mapler-com-depuracao.js +0 -152
- package/interpretador/dialetos/mapler/interpretador-mapler-com-depuracao.js.map +0 -1
- package/interpretador/dialetos/mapler/interpretador-mapler.d.ts +0 -47
- package/interpretador/dialetos/mapler/interpretador-mapler.d.ts.map +0 -1
- package/interpretador/dialetos/mapler/interpretador-mapler.js +0 -136
- package/interpretador/dialetos/mapler/interpretador-mapler.js.map +0 -1
- package/lexador/dialetos/lexador-mapler.d.ts +0 -11
- package/lexador/dialetos/lexador-mapler.d.ts.map +0 -1
- package/lexador/dialetos/lexador-mapler.js +0 -205
- package/lexador/dialetos/lexador-mapler.js.map +0 -1
- package/lexador/dialetos/lexador-potigol.d.ts +0 -18
- package/lexador/dialetos/lexador-potigol.d.ts.map +0 -1
- package/lexador/dialetos/lexador-potigol.js +0 -295
- package/lexador/dialetos/lexador-potigol.js.map +0 -1
- package/lexador/dialetos/palavras-reservadas/mapler.d.ts +0 -31
- package/lexador/dialetos/palavras-reservadas/mapler.d.ts.map +0 -1
- package/lexador/dialetos/palavras-reservadas/mapler.js +0 -38
- package/lexador/dialetos/palavras-reservadas/mapler.js.map +0 -1
- package/lexador/dialetos/palavras-reservadas/potigol.d.ts +0 -45
- package/lexador/dialetos/palavras-reservadas/potigol.d.ts.map +0 -1
- package/lexador/dialetos/palavras-reservadas/potigol.js +0 -52
- package/lexador/dialetos/palavras-reservadas/potigol.js.map +0 -1
- package/tipos-de-simbolos/mapler.d.ts +0 -56
- package/tipos-de-simbolos/mapler.d.ts.map +0 -1
- package/tipos-de-simbolos/mapler.js +0 -57
- package/tipos-de-simbolos/mapler.js.map +0 -1
- package/tipos-de-simbolos/potigol.d.ts +0 -66
- package/tipos-de-simbolos/potigol.d.ts.map +0 -1
- package/tipos-de-simbolos/potigol.js +0 -67
- package/tipos-de-simbolos/potigol.js.map +0 -1
- package/tipos-de-simbolos/visualg.d.ts +0 -81
- package/tipos-de-simbolos/visualg.d.ts.map +0 -1
- package/tipos-de-simbolos/visualg.js +0 -82
- package/tipos-de-simbolos/visualg.js.map +0 -1
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Atribuir } from '../../construtos';
|
|
2
|
-
import { Declaracao, Expressao, Retorna, Var } from '../../declaracoes';
|
|
3
|
-
import { SimboloInterface } from '../../interfaces';
|
|
4
|
-
import { DiagnosticoAnalisadorSemantico } from '../../interfaces/erros';
|
|
5
|
-
import { FuncaoHipoteticaInterface } from '../../interfaces/funcao-hipotetica-interface';
|
|
6
|
-
import { RetornoAnalisadorSemantico } from '../../interfaces/retornos/retorno-analisador-semantico';
|
|
7
|
-
import { VariavelHipoteticaInterface } from '../../interfaces/variavel-hipotetica-interface';
|
|
8
|
-
import { RetornoQuebra } from '../../quebras';
|
|
9
|
-
import { AnalisadorSemanticoBase } from '../analisador-semantico-base';
|
|
10
|
-
import { PilhaVariaveis } from './../pilha-variaveis';
|
|
11
|
-
export declare class AnalisadorSemanticoMapler extends AnalisadorSemanticoBase {
|
|
12
|
-
pilhaVariaveis: PilhaVariaveis;
|
|
13
|
-
variaveis: {
|
|
14
|
-
[nomeVariavel: string]: VariavelHipoteticaInterface;
|
|
15
|
-
};
|
|
16
|
-
funcoes: {
|
|
17
|
-
[nomeFuncao: string]: FuncaoHipoteticaInterface;
|
|
18
|
-
};
|
|
19
|
-
atual: number;
|
|
20
|
-
diagnosticos: DiagnosticoAnalisadorSemantico[];
|
|
21
|
-
constructor();
|
|
22
|
-
erro(simbolo: SimboloInterface, mensagem: string): void;
|
|
23
|
-
aviso(simbolo: SimboloInterface, mensagem: string): void;
|
|
24
|
-
visitarExpressaoDeAtribuicao(expressao: Atribuir): Promise<void>;
|
|
25
|
-
visitarDeclaracaoDeExpressao(declaracao: Expressao): any;
|
|
26
|
-
visitarDeclaracaoVar(declaracao: Var): Promise<any>;
|
|
27
|
-
visitarExpressaoRetornar(declaracao: Retorna): Promise<RetornoQuebra>;
|
|
28
|
-
analisar(declaracoes: Declaracao[]): RetornoAnalisadorSemantico;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=analisador-semantico-mapler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analisador-semantico-mapler.d.ts","sourceRoot":"","sources":["../../../fontes/analisador-semantico/dialetos/analisador-semantico-mapler.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EAYX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAQH,UAAU,EAKV,SAAS,EAST,OAAO,EAIP,GAAG,EAEN,MAAM,mBAAmB,CAA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ineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnalisadorSemanticoMapler = void 0;
|
|
4
|
-
const construtos_1 = require("../../construtos");
|
|
5
|
-
const erros_1 = require("../../interfaces/erros");
|
|
6
|
-
const analisador_semantico_base_1 = require("../analisador-semantico-base");
|
|
7
|
-
const pilha_variaveis_1 = require("./../pilha-variaveis");
|
|
8
|
-
class AnalisadorSemanticoMapler extends analisador_semantico_base_1.AnalisadorSemanticoBase {
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
this.pilhaVariaveis = new pilha_variaveis_1.PilhaVariaveis();
|
|
12
|
-
this.variaveis = {};
|
|
13
|
-
this.funcoes = {};
|
|
14
|
-
this.atual = 0;
|
|
15
|
-
this.diagnosticos = [];
|
|
16
|
-
}
|
|
17
|
-
erro(simbolo, mensagem) {
|
|
18
|
-
this.diagnosticos.push({
|
|
19
|
-
simbolo: simbolo,
|
|
20
|
-
mensagem: mensagem,
|
|
21
|
-
hashArquivo: simbolo.hashArquivo,
|
|
22
|
-
linha: simbolo.linha,
|
|
23
|
-
severidade: erros_1.DiagnosticoSeveridade.ERRO,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
aviso(simbolo, mensagem) {
|
|
27
|
-
this.diagnosticos.push({
|
|
28
|
-
simbolo: simbolo,
|
|
29
|
-
mensagem: mensagem,
|
|
30
|
-
hashArquivo: simbolo.hashArquivo,
|
|
31
|
-
linha: simbolo.linha,
|
|
32
|
-
severidade: erros_1.DiagnosticoSeveridade.AVISO,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
visitarExpressaoDeAtribuicao(expressao) {
|
|
36
|
-
let valor = this.variaveis[expressao.simbolo.lexema];
|
|
37
|
-
if (!valor) {
|
|
38
|
-
this.erro(expressao.simbolo, `Variável ${expressao.simbolo.lexema} ainda não foi declarada até este ponto.`);
|
|
39
|
-
return Promise.resolve();
|
|
40
|
-
}
|
|
41
|
-
if (valor.tipo) {
|
|
42
|
-
if (expressao.valor instanceof construtos_1.Literal && valor.tipo.includes('[]')) {
|
|
43
|
-
this.erro(expressao.simbolo, `Atribuição inválida, esperado tipo '${valor.tipo}' na atribuição.`);
|
|
44
|
-
return Promise.resolve();
|
|
45
|
-
}
|
|
46
|
-
if (expressao.valor instanceof construtos_1.Vetor && !valor.tipo.includes('[]')) {
|
|
47
|
-
this.erro(expressao.simbolo, `Atribuição inválida, esperado tipo '${valor.tipo}' na atribuição.`);
|
|
48
|
-
return Promise.resolve();
|
|
49
|
-
}
|
|
50
|
-
if (expressao.valor instanceof construtos_1.Literal) {
|
|
51
|
-
let valorLiteral = typeof expressao.valor.valor;
|
|
52
|
-
if (!['qualquer'].includes(valor.tipo)) {
|
|
53
|
-
if (valorLiteral === 'string') {
|
|
54
|
-
if (valor.tipo != 'texto') {
|
|
55
|
-
this.erro(expressao.simbolo, `Esperado tipo '${valor.tipo}' na atribuição.`);
|
|
56
|
-
return Promise.resolve();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (valorLiteral === 'number') {
|
|
60
|
-
if (!['inteiro', 'real'].includes(valor.tipo)) {
|
|
61
|
-
this.erro(expressao.simbolo, `Esperado tipo '${valor.tipo}' na atribuição.`);
|
|
62
|
-
return Promise.resolve();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (this.variaveis[expressao.simbolo.lexema]) {
|
|
69
|
-
this.variaveis[expressao.simbolo.lexema].valor = expressao.valor;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
visitarDeclaracaoDeExpressao(declaracao) {
|
|
73
|
-
return declaracao.expressao.aceitar(this);
|
|
74
|
-
}
|
|
75
|
-
visitarDeclaracaoVar(declaracao) {
|
|
76
|
-
this.variaveis[declaracao.simbolo.lexema] = {
|
|
77
|
-
imutavel: false,
|
|
78
|
-
tipo: declaracao.tipo,
|
|
79
|
-
valor: declaracao.inicializador !== null
|
|
80
|
-
? declaracao.inicializador.valor !== undefined
|
|
81
|
-
? declaracao.inicializador.valor
|
|
82
|
-
: declaracao.inicializador
|
|
83
|
-
: undefined,
|
|
84
|
-
};
|
|
85
|
-
return Promise.resolve();
|
|
86
|
-
}
|
|
87
|
-
visitarExpressaoRetornar(declaracao) {
|
|
88
|
-
return Promise.resolve(null);
|
|
89
|
-
}
|
|
90
|
-
analisar(declaracoes) {
|
|
91
|
-
this.variaveis = {};
|
|
92
|
-
this.atual = 0;
|
|
93
|
-
this.diagnosticos = [];
|
|
94
|
-
while (this.atual < declaracoes.length) {
|
|
95
|
-
declaracoes[this.atual].aceitar(this);
|
|
96
|
-
this.atual++;
|
|
97
|
-
}
|
|
98
|
-
return {
|
|
99
|
-
diagnosticos: this.diagnosticos,
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
exports.AnalisadorSemanticoMapler = AnalisadorSemanticoMapler;
|
|
104
|
-
//# sourceMappingURL=analisador-semantico-mapler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analisador-semantico-mapler.js","sourceRoot":"","sources":["../../../fontes/analisador-semantico/dialetos/analisador-semantico-mapler.ts"],"names":[],"mappings":";;;AAAA,iDAa0B;AAgC1B,kDAA+F;AAK/F,4EAAuE;AACvE,0DAAsD;AAEtD,MAAa,yBAA0B,SAAQ,mDAAuB;IAOlE;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,cAAc,GAAG,IAAI,gCAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;IAC3B,CAAC;IAED,IAAI,CAAC,OAAyB,EAAE,QAAgB;QAC5C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;YACnB,OAAO,EAAE,OAAO;YAChB,Q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AAC,GAAG;YACxC,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,KAAK,EACD,UAAU,CAAC,aAAa,KAAK,IAAI;gBAC7B,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,KAAK,SAAS;oBAC1C,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK;oBAChC,CAAC,CAAC,UAAU,CAAC,aAAa;gBAC9B,CAAC,CAAC,SAAS;SACtB,CAAC;QAEF,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,wBAAwB,CAAC,UAAmB;QACxC,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,QAAQ,CAAC,WAAyB;QAC9B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QAEvB,OAAO,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,MAAM,EAAE;YACpC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACtC,IAAI,CAAC,KAAK,EAAE,CAAC;SAChB;QAED,OAAO;YACH,YAAY,EAAE,IAAI,CAAC,YAAY;SACJ,CAAC;IACpC,CAAC;CACJ;AAtHD,8DAsHC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../fontes/analisador-semantico/dialetos/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./analisador-semantico-mapler"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fontes/analisador-semantico/dialetos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { RetornoLexador, RetornoAvaliadorSintatico } from '../../interfaces/retornos';
|
|
2
|
-
import { AvaliadorSintaticoBase } from '../avaliador-sintatico-base';
|
|
3
|
-
import { Declaracao, Enquanto, Escolha, Escreva, EscrevaMesmaLinha, Fazer, Leia, Para, Se } from '../../declaracoes';
|
|
4
|
-
import { Construto, FuncaoConstruto } from '../../construtos';
|
|
5
|
-
import { SimboloInterface } from '../../interfaces';
|
|
6
|
-
export declare class AvaliadorSintaticoMapler extends AvaliadorSintaticoBase {
|
|
7
|
-
private criarVetorNDimensional;
|
|
8
|
-
private validarDimensoesVetor;
|
|
9
|
-
private logicaComumParametroMapler;
|
|
10
|
-
/**
|
|
11
|
-
* Validação do segmento de declaração de variáveis (opcional).
|
|
12
|
-
* @returns Vetor de Construtos para inicialização de variáveis.
|
|
13
|
-
*/
|
|
14
|
-
private validarSegmentoVariaveis;
|
|
15
|
-
estaNoFinal(): boolean;
|
|
16
|
-
primario(): Construto;
|
|
17
|
-
comparacaoIgualdade(): Construto;
|
|
18
|
-
ou(): Construto;
|
|
19
|
-
/**
|
|
20
|
-
* Método que resolve atribuições.
|
|
21
|
-
* @returns Um construto do tipo `Atribuir`, `Conjunto` ou `AtribuicaoPorIndice`.
|
|
22
|
-
*/
|
|
23
|
-
atribuir(): Construto;
|
|
24
|
-
expressao(): Construto;
|
|
25
|
-
blocoEscopo(): any[];
|
|
26
|
-
chamar(): Construto;
|
|
27
|
-
corpoDaFuncao(tipo: any): FuncaoConstruto;
|
|
28
|
-
declaracaoEnquanto(): Enquanto;
|
|
29
|
-
declaracaoEscolha(): Escolha;
|
|
30
|
-
private logicaComumEscreva;
|
|
31
|
-
declaracaoEscreva(): Escreva;
|
|
32
|
-
declaracaoEscrevaMesmaLinha(): EscrevaMesmaLinha;
|
|
33
|
-
/**
|
|
34
|
-
* Criação de declaração "repita".
|
|
35
|
-
* @returns Um construto do tipo Fazer
|
|
36
|
-
*/
|
|
37
|
-
declaracaoFazer(): Fazer;
|
|
38
|
-
/**
|
|
39
|
-
* Criação de declaração "interrompa".
|
|
40
|
-
* Em Mapler, "sustar" é chamada de "interrompa".
|
|
41
|
-
* @returns Uma declaração do tipo Sustar.
|
|
42
|
-
*/
|
|
43
|
-
private declaracaoInterrompa;
|
|
44
|
-
/**
|
|
45
|
-
* Análise de uma declaração `leia()`. No Mapler, `leia()` aceita 1..N argumentos.
|
|
46
|
-
* @returns Uma declaração `Leia`.
|
|
47
|
-
*/
|
|
48
|
-
declaracaoLeia(): Leia;
|
|
49
|
-
declaracaoPara(): Para;
|
|
50
|
-
/**
|
|
51
|
-
* Procedimentos nada mais são do que funções que não retornam valor.
|
|
52
|
-
*/
|
|
53
|
-
declaracaoSe(): Se;
|
|
54
|
-
resolverDeclaracaoForaDeBloco(): Declaracao | Declaracao[] | Construto | Construto[] | any;
|
|
55
|
-
/**
|
|
56
|
-
* No Mapler, há uma determinada cadência de validação de símbolos.
|
|
57
|
-
* @param retornoLexador Os símbolos entendidos pelo Lexador.
|
|
58
|
-
* @param hashArquivo Obrigatório por interface mas não usado aqui.
|
|
59
|
-
*/
|
|
60
|
-
analisar(retornoLexador: RetornoLexador<SimboloInterface>, hashArquivo: number): RetornoAvaliadorSintatico<Declaracao>;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=avaliador-sintatico-mapler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avaliador-sintatico-mapler.d.ts","sourceRoot":"","sources":["../../../fontes/avaliador-sintatico/dialetos/avaliador-sintatico-mapler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAEH,UAAU,EACV,QAAQ,EACR,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,EAAE,EAGL,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAOH,SAAS,EAET,eAAe,EAIlB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIpD,qBAAa,wBAAyB,SAAQ,sBAAsB;IAChE,OAAO,CAAC,sBAAsB;IAc9B,OAAO,CAAC,qBAAqB;IAyB7B,OAAO,CAAC,0BAA0B;IAmClC;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAkGhC,WAAW,IAAI,OAAO;IAItB,QAAQ,IAAI,SAAS;IAsCrB,mBAAmB,IAAI,SAAS;IAYhC,EAAE,IAAI,SAAS;IAYf;;;OAGG;IACH,QAAQ,IAAI,SAAS;IA0BrB,SAAS,IAAI,SAAS;IAKtB,WAAW,IAAI,GAAG,EAAE;IAiBpB,MAAM,IAAI,SAAS;IA0BnB,aAAa,CAAC,IAAI,EAAE,GAAG,GAAG,eA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