@designliquido/delegua 0.22.6 → 0.23.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/README.md +1 -1
- package/bin/package.json +2 -2
- package/fontes/avaliador-sintatico/dialetos/{avaliador-sintatico-eguap.d.ts → avaliador-sintatico-pitugues.d.ts} +1 -1
- package/fontes/avaliador-sintatico/dialetos/{avaliador-sintatico-eguap.js → avaliador-sintatico-pitugues.js} +131 -131
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.js.map +1 -0
- package/fontes/avaliador-sintatico/dialetos/index.d.ts +1 -1
- package/fontes/avaliador-sintatico/dialetos/index.js +1 -1
- package/fontes/avaliador-sintatico/dialetos/index.js.map +1 -1
- package/fontes/bibliotecas/biblioteca-global.js +1 -1
- package/fontes/bibliotecas/biblioteca-global.js.map +1 -1
- package/fontes/lexador/dialetos/index.d.ts +1 -1
- package/fontes/lexador/dialetos/index.js +1 -1
- package/fontes/lexador/dialetos/index.js.map +1 -1
- package/fontes/lexador/dialetos/lexador-birl.js +0 -10
- package/fontes/lexador/dialetos/lexador-birl.js.map +1 -1
- package/fontes/lexador/dialetos/{lexador-eguap.d.ts → lexador-pitugues.d.ts} +1 -1
- package/fontes/lexador/dialetos/{lexador-eguap.js → lexador-pitugues.js} +40 -40
- package/fontes/lexador/dialetos/lexador-pitugues.js.map +1 -0
- package/fontes/tipos-de-simbolos/{eguap.js → pitugues.js} +1 -1
- package/fontes/tipos-de-simbolos/pitugues.js.map +1 -0
- package/fontes/tradutores/tradutor-assemblyscript.d.ts +88 -0
- package/fontes/tradutores/tradutor-assemblyscript.js +575 -0
- package/fontes/tradutores/tradutor-assemblyscript.js.map +1 -0
- package/package.json +2 -2
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.js.map +0 -1
- package/fontes/lexador/dialetos/lexador-eguap.js.map +0 -1
- package/fontes/tipos-de-simbolos/eguap.js.map +0 -1
- /package/fontes/tipos-de-simbolos/{eguap.d.ts → pitugues.d.ts} +0 -0
|
@@ -3,12 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.AvaliadorSintaticoPitugues = void 0;
|
|
7
7
|
const browser_process_hrtime_1 = __importDefault(require("browser-process-hrtime"));
|
|
8
8
|
const construtos_1 = require("../../construtos");
|
|
9
9
|
const declaracoes_1 = require("../../declaracoes");
|
|
10
10
|
const erro_avaliador_sintatico_1 = require("../erro-avaliador-sintatico");
|
|
11
|
-
const
|
|
11
|
+
const pitugues_1 = __importDefault(require("../../tipos-de-simbolos/pitugues"));
|
|
12
12
|
const lexador_1 = require("../../lexador");
|
|
13
13
|
/**
|
|
14
14
|
* O avaliador sintático (_Parser_) é responsável por transformar os símbolos do Lexador em estruturas de alto nível.
|
|
@@ -18,7 +18,7 @@ const lexador_1 = require("../../lexador");
|
|
|
18
18
|
* A grande diferença entre este avaliador e os demais é a forma como são entendidos os blocos de escopo.
|
|
19
19
|
* Este avaliador espera uma estrutura de pragmas, que explica quantos espaços há na frente de cada linha.
|
|
20
20
|
*/
|
|
21
|
-
class
|
|
21
|
+
class AvaliadorSintaticoPitugues {
|
|
22
22
|
constructor(performance = false) {
|
|
23
23
|
this.atual = 0;
|
|
24
24
|
this.blocos = 0;
|
|
@@ -35,42 +35,42 @@ class AvaliadorSintaticoEguaP {
|
|
|
35
35
|
const identificadores = [];
|
|
36
36
|
let retorno = [];
|
|
37
37
|
do {
|
|
38
|
-
identificadores.push(this.consumir(
|
|
39
|
-
} while (this.verificarSeSimboloAtualEIgualA(
|
|
40
|
-
if (!this.verificarSeSimboloAtualEIgualA(
|
|
38
|
+
identificadores.push(this.consumir(pitugues_1.default.IDENTIFICADOR, 'Esperado nome de variável.'));
|
|
39
|
+
} while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.VIRGULA));
|
|
40
|
+
if (!this.verificarSeSimboloAtualEIgualA(pitugues_1.default.IGUAL)) {
|
|
41
41
|
for (let [indice, identificador] of identificadores.entries()) {
|
|
42
42
|
retorno.push(new declaracoes_1.Var(identificador, null));
|
|
43
43
|
}
|
|
44
|
-
this.verificarSeSimboloAtualEIgualA(
|
|
44
|
+
this.verificarSeSimboloAtualEIgualA(pitugues_1.default.PONTO_E_VIRGULA);
|
|
45
45
|
return retorno;
|
|
46
46
|
}
|
|
47
47
|
//this.consumir(tiposDeSimbolos.IGUAL, "Esperado '=' após identificador em instrução 'var'.");
|
|
48
48
|
const inicializadores = [];
|
|
49
49
|
do {
|
|
50
50
|
inicializadores.push(this.expressao());
|
|
51
|
-
} while (this.verificarSeSimboloAtualEIgualA(
|
|
51
|
+
} while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.VIRGULA));
|
|
52
52
|
if (identificadores.length !== inicializadores.length) {
|
|
53
53
|
throw this.erro(this.simboloAtual(), "Quantidade de identificadores à esquerda do igual é diferente da quantidade de valores à direita.");
|
|
54
54
|
}
|
|
55
55
|
for (let [indice, identificador] of identificadores.entries()) {
|
|
56
56
|
retorno.push(new declaracoes_1.Var(identificador, inicializadores[indice]));
|
|
57
57
|
}
|
|
58
|
-
this.verificarSeSimboloAtualEIgualA(
|
|
58
|
+
this.verificarSeSimboloAtualEIgualA(pitugues_1.default.PONTO_E_VIRGULA);
|
|
59
59
|
return retorno;
|
|
60
60
|
}
|
|
61
61
|
sincronizar() {
|
|
62
62
|
this.avancarEDevolverAnterior();
|
|
63
63
|
while (!this.estaNoFinal()) {
|
|
64
64
|
switch (this.simboloAtual().tipo) {
|
|
65
|
-
case
|
|
66
|
-
case
|
|
67
|
-
case
|
|
68
|
-
case
|
|
69
|
-
case
|
|
70
|
-
case
|
|
71
|
-
case
|
|
72
|
-
case
|
|
73
|
-
case
|
|
65
|
+
case pitugues_1.default.CLASSE:
|
|
66
|
+
case pitugues_1.default.FUNCAO:
|
|
67
|
+
case pitugues_1.default.FUNÇÃO:
|
|
68
|
+
case pitugues_1.default.VARIAVEL:
|
|
69
|
+
case pitugues_1.default.PARA:
|
|
70
|
+
case pitugues_1.default.SE:
|
|
71
|
+
case pitugues_1.default.ENQUANTO:
|
|
72
|
+
case pitugues_1.default.ESCREVA:
|
|
73
|
+
case pitugues_1.default.RETORNA:
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
76
|
this.avancarEDevolverAnterior();
|
|
@@ -124,94 +124,94 @@ class AvaliadorSintaticoEguaP {
|
|
|
124
124
|
return false;
|
|
125
125
|
}
|
|
126
126
|
primario() {
|
|
127
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
127
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.SUPER)) {
|
|
128
128
|
const simboloChave = this.simboloAnterior();
|
|
129
|
-
this.consumir(
|
|
130
|
-
const metodo = this.consumir(
|
|
129
|
+
this.consumir(pitugues_1.default.PONTO, "Esperado '.' após 'super'.");
|
|
130
|
+
const metodo = this.consumir(pitugues_1.default.IDENTIFICADOR, 'Esperado nome do método da Superclasse.');
|
|
131
131
|
return new construtos_1.Super(this.hashArquivo, simboloChave, metodo);
|
|
132
132
|
}
|
|
133
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
133
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.COLCHETE_ESQUERDO)) {
|
|
134
134
|
const valores = [];
|
|
135
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
135
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.COLCHETE_DIREITO)) {
|
|
136
136
|
return new construtos_1.Vetor(this.hashArquivo, 0, []);
|
|
137
137
|
}
|
|
138
|
-
while (!this.verificarSeSimboloAtualEIgualA(
|
|
138
|
+
while (!this.verificarSeSimboloAtualEIgualA(pitugues_1.default.COLCHETE_DIREITO)) {
|
|
139
139
|
const valor = this.atribuir();
|
|
140
140
|
valores.push(valor);
|
|
141
|
-
if (this.simboloAtual().tipo !==
|
|
142
|
-
this.consumir(
|
|
141
|
+
if (this.simboloAtual().tipo !== pitugues_1.default.COLCHETE_DIREITO) {
|
|
142
|
+
this.consumir(pitugues_1.default.VIRGULA, 'Esperado vírgula antes da próxima expressão.');
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
return new construtos_1.Vetor(this.hashArquivo, 0, valores);
|
|
146
146
|
}
|
|
147
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
147
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.CHAVE_ESQUERDA)) {
|
|
148
148
|
const chaves = [];
|
|
149
149
|
const valores = [];
|
|
150
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
150
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.CHAVE_DIREITA)) {
|
|
151
151
|
return new construtos_1.Dicionario(this.hashArquivo, 0, [], []);
|
|
152
152
|
}
|
|
153
|
-
while (!this.verificarSeSimboloAtualEIgualA(
|
|
153
|
+
while (!this.verificarSeSimboloAtualEIgualA(pitugues_1.default.CHAVE_DIREITA)) {
|
|
154
154
|
const chave = this.atribuir();
|
|
155
|
-
this.consumir(
|
|
155
|
+
this.consumir(pitugues_1.default.DOIS_PONTOS, "Esperado ':' entre chave e valor.");
|
|
156
156
|
const valor = this.atribuir();
|
|
157
157
|
chaves.push(chave);
|
|
158
158
|
valores.push(valor);
|
|
159
|
-
if (this.simboloAtual().tipo !==
|
|
160
|
-
this.consumir(
|
|
159
|
+
if (this.simboloAtual().tipo !== pitugues_1.default.CHAVE_DIREITA) {
|
|
160
|
+
this.consumir(pitugues_1.default.VIRGULA, 'Esperado vírgula antes da próxima expressão.');
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
return new construtos_1.Dicionario(this.hashArquivo, 0, chaves, valores);
|
|
164
164
|
}
|
|
165
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
165
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.FALSO))
|
|
166
166
|
return new construtos_1.Literal(this.hashArquivo, 0, false);
|
|
167
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
167
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.VERDADEIRO))
|
|
168
168
|
return new construtos_1.Literal(this.hashArquivo, 0, true);
|
|
169
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
169
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.NULO))
|
|
170
170
|
return new construtos_1.Literal(this.hashArquivo, 0, null);
|
|
171
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
171
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.ISTO))
|
|
172
172
|
return new construtos_1.Isto(this.hashArquivo, 0, this.simboloAnterior());
|
|
173
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
173
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.NUMERO, pitugues_1.default.TEXTO)) {
|
|
174
174
|
const simboloAnterior = this.simboloAnterior();
|
|
175
175
|
return new construtos_1.Literal(this.hashArquivo, Number(simboloAnterior.linha), simboloAnterior.literal);
|
|
176
176
|
}
|
|
177
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
177
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.IDENTIFICADOR)) {
|
|
178
178
|
return new construtos_1.Variavel(this.hashArquivo, this.simboloAnterior());
|
|
179
179
|
}
|
|
180
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
180
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.PARENTESE_ESQUERDO)) {
|
|
181
181
|
const expressao = this.expressao();
|
|
182
|
-
this.consumir(
|
|
182
|
+
this.consumir(pitugues_1.default.PARENTESE_DIREITO, "Esperado ')' após a expressão.");
|
|
183
183
|
return new construtos_1.Agrupamento(this.hashArquivo, 0, expressao);
|
|
184
184
|
}
|
|
185
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
185
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.IMPORTAR))
|
|
186
186
|
return this.declaracaoImportar();
|
|
187
187
|
throw this.erro(this.simboloAtual(), 'Esperado expressão.');
|
|
188
188
|
}
|
|
189
189
|
finalizarChamada(entidadeChamada) {
|
|
190
190
|
const argumentos = [];
|
|
191
|
-
if (!this.verificarTipoSimboloAtual(
|
|
191
|
+
if (!this.verificarTipoSimboloAtual(pitugues_1.default.PARENTESE_DIREITO)) {
|
|
192
192
|
do {
|
|
193
193
|
if (argumentos.length >= 255) {
|
|
194
194
|
throw this.erro(this.simboloAtual(), 'Não pode haver mais de 255 argumentos.');
|
|
195
195
|
}
|
|
196
196
|
argumentos.push(this.expressao());
|
|
197
|
-
} while (this.verificarSeSimboloAtualEIgualA(
|
|
197
|
+
} while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.VIRGULA));
|
|
198
198
|
}
|
|
199
|
-
const parenteseDireito = this.consumir(
|
|
199
|
+
const parenteseDireito = this.consumir(pitugues_1.default.PARENTESE_DIREITO, "Esperado ')' após os argumentos.");
|
|
200
200
|
return new construtos_1.Chamada(this.hashArquivo, entidadeChamada, parenteseDireito, argumentos);
|
|
201
201
|
}
|
|
202
202
|
chamar() {
|
|
203
203
|
let expressao = this.primario();
|
|
204
204
|
while (true) {
|
|
205
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
205
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.PARENTESE_ESQUERDO)) {
|
|
206
206
|
expressao = this.finalizarChamada(expressao);
|
|
207
207
|
}
|
|
208
|
-
else if (this.verificarSeSimboloAtualEIgualA(
|
|
209
|
-
const nome = this.consumir(
|
|
208
|
+
else if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.PONTO)) {
|
|
209
|
+
const nome = this.consumir(pitugues_1.default.IDENTIFICADOR, "Esperado nome do método após '.'.");
|
|
210
210
|
expressao = new construtos_1.AcessoMetodo(this.hashArquivo, expressao, nome);
|
|
211
211
|
}
|
|
212
|
-
else if (this.verificarSeSimboloAtualEIgualA(
|
|
212
|
+
else if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.COLCHETE_ESQUERDO)) {
|
|
213
213
|
const indice = this.expressao();
|
|
214
|
-
const simboloFechamento = this.consumir(
|
|
214
|
+
const simboloFechamento = this.consumir(pitugues_1.default.COLCHETE_DIREITO, "Esperado ']' após escrita do indice.");
|
|
215
215
|
expressao = new construtos_1.AcessoIndiceVariavel(this.hashArquivo, expressao, indice, simboloFechamento);
|
|
216
216
|
}
|
|
217
217
|
else {
|
|
@@ -221,7 +221,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
221
221
|
return expressao;
|
|
222
222
|
}
|
|
223
223
|
unario() {
|
|
224
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
224
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.NEGACAO, pitugues_1.default.SUBTRACAO, pitugues_1.default.BIT_NOT)) {
|
|
225
225
|
const operador = this.simboloAnterior();
|
|
226
226
|
const direito = this.unario();
|
|
227
227
|
return new construtos_1.Unario(this.hashArquivo, operador, direito);
|
|
@@ -230,7 +230,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
230
230
|
}
|
|
231
231
|
exponenciacao() {
|
|
232
232
|
let expressao = this.unario();
|
|
233
|
-
while (this.verificarSeSimboloAtualEIgualA(
|
|
233
|
+
while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.EXPONENCIACAO)) {
|
|
234
234
|
const operador = this.simboloAnterior();
|
|
235
235
|
const direito = this.unario();
|
|
236
236
|
expressao = new construtos_1.Binario(this.hashArquivo, expressao, operador, direito);
|
|
@@ -239,7 +239,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
239
239
|
}
|
|
240
240
|
multiplicar() {
|
|
241
241
|
let expressao = this.exponenciacao();
|
|
242
|
-
while (this.verificarSeSimboloAtualEIgualA(
|
|
242
|
+
while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.DIVISAO, pitugues_1.default.DIVISAO_INTEIRA, pitugues_1.default.MULTIPLICACAO, pitugues_1.default.MODULO)) {
|
|
243
243
|
const operador = this.simboloAnterior();
|
|
244
244
|
const direito = this.exponenciacao();
|
|
245
245
|
expressao = new construtos_1.Binario(this.hashArquivo, expressao, operador, direito);
|
|
@@ -248,7 +248,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
248
248
|
}
|
|
249
249
|
adicaoOuSubtracao() {
|
|
250
250
|
let expressao = this.multiplicar();
|
|
251
|
-
while (this.verificarSeSimboloAtualEIgualA(
|
|
251
|
+
while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.SUBTRACAO, pitugues_1.default.ADICAO)) {
|
|
252
252
|
const operador = this.simboloAnterior();
|
|
253
253
|
const direito = this.multiplicar();
|
|
254
254
|
expressao = new construtos_1.Binario(this.hashArquivo, expressao, operador, direito);
|
|
@@ -257,7 +257,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
257
257
|
}
|
|
258
258
|
bitShift() {
|
|
259
259
|
let expressao = this.adicaoOuSubtracao();
|
|
260
|
-
while (this.verificarSeSimboloAtualEIgualA(
|
|
260
|
+
while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.MENOR_MENOR, pitugues_1.default.MAIOR_MAIOR)) {
|
|
261
261
|
const operador = this.simboloAnterior();
|
|
262
262
|
const direito = this.adicaoOuSubtracao();
|
|
263
263
|
expressao = new construtos_1.Binario(this.hashArquivo, expressao, operador, direito);
|
|
@@ -266,7 +266,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
266
266
|
}
|
|
267
267
|
bitE() {
|
|
268
268
|
let expressao = this.bitShift();
|
|
269
|
-
while (this.verificarSeSimboloAtualEIgualA(
|
|
269
|
+
while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.BIT_AND)) {
|
|
270
270
|
const operador = this.simboloAnterior();
|
|
271
271
|
const direito = this.bitShift();
|
|
272
272
|
expressao = new construtos_1.Binario(this.hashArquivo, expressao, operador, direito);
|
|
@@ -275,7 +275,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
275
275
|
}
|
|
276
276
|
bitOu() {
|
|
277
277
|
let expressao = this.bitE();
|
|
278
|
-
while (this.verificarSeSimboloAtualEIgualA(
|
|
278
|
+
while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.BIT_OR, pitugues_1.default.BIT_XOR)) {
|
|
279
279
|
const operador = this.simboloAnterior();
|
|
280
280
|
const direito = this.bitE();
|
|
281
281
|
expressao = new construtos_1.Binario(this.hashArquivo, expressao, operador, direito);
|
|
@@ -284,7 +284,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
284
284
|
}
|
|
285
285
|
comparar() {
|
|
286
286
|
let expressao = this.bitOu();
|
|
287
|
-
while (this.verificarSeSimboloAtualEIgualA(
|
|
287
|
+
while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.MAIOR, pitugues_1.default.MAIOR_IGUAL, pitugues_1.default.MENOR, pitugues_1.default.MENOR_IGUAL)) {
|
|
288
288
|
const operador = this.simboloAnterior();
|
|
289
289
|
const direito = this.bitOu();
|
|
290
290
|
expressao = new construtos_1.Binario(this.hashArquivo, expressao, operador, direito);
|
|
@@ -293,7 +293,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
293
293
|
}
|
|
294
294
|
comparacaoIgualdade() {
|
|
295
295
|
let expressao = this.comparar();
|
|
296
|
-
while (this.verificarSeSimboloAtualEIgualA(
|
|
296
|
+
while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.DIFERENTE, pitugues_1.default.IGUAL_IGUAL)) {
|
|
297
297
|
const operador = this.simboloAnterior();
|
|
298
298
|
const direito = this.comparar();
|
|
299
299
|
expressao = new construtos_1.Binario(this.hashArquivo, expressao, operador, direito);
|
|
@@ -302,7 +302,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
302
302
|
}
|
|
303
303
|
em() {
|
|
304
304
|
let expressao = this.comparacaoIgualdade();
|
|
305
|
-
while (this.verificarSeSimboloAtualEIgualA(
|
|
305
|
+
while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.EM)) {
|
|
306
306
|
const operador = this.simboloAnterior();
|
|
307
307
|
const direito = this.comparacaoIgualdade();
|
|
308
308
|
expressao = new construtos_1.Logico(this.hashArquivo, expressao, operador, direito);
|
|
@@ -311,7 +311,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
311
311
|
}
|
|
312
312
|
e() {
|
|
313
313
|
let expressao = this.em();
|
|
314
|
-
while (this.verificarSeSimboloAtualEIgualA(
|
|
314
|
+
while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.E)) {
|
|
315
315
|
const operador = this.simboloAnterior();
|
|
316
316
|
const direito = this.em();
|
|
317
317
|
expressao = new construtos_1.Logico(this.hashArquivo, expressao, operador, direito);
|
|
@@ -320,7 +320,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
320
320
|
}
|
|
321
321
|
ou() {
|
|
322
322
|
let expressao = this.e();
|
|
323
|
-
while (this.verificarSeSimboloAtualEIgualA(
|
|
323
|
+
while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.OU)) {
|
|
324
324
|
const operador = this.simboloAnterior();
|
|
325
325
|
const direito = this.e();
|
|
326
326
|
expressao = new construtos_1.Logico(this.hashArquivo, expressao, operador, direito);
|
|
@@ -329,8 +329,8 @@ class AvaliadorSintaticoEguaP {
|
|
|
329
329
|
}
|
|
330
330
|
atribuir() {
|
|
331
331
|
const expressao = this.ou();
|
|
332
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
333
|
-
this.verificarSeSimboloAtualEIgualA(
|
|
332
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.IGUAL) ||
|
|
333
|
+
this.verificarSeSimboloAtualEIgualA(pitugues_1.default.MAIS_IGUAL)) {
|
|
334
334
|
const igual = this.simboloAnterior();
|
|
335
335
|
const valor = this.atribuir();
|
|
336
336
|
if (expressao instanceof construtos_1.Variavel) {
|
|
@@ -348,18 +348,18 @@ class AvaliadorSintaticoEguaP {
|
|
|
348
348
|
return expressao;
|
|
349
349
|
}
|
|
350
350
|
expressao() {
|
|
351
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
351
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.LEIA))
|
|
352
352
|
return this.declaracaoLeia();
|
|
353
353
|
return this.atribuir();
|
|
354
354
|
}
|
|
355
355
|
declaracaoEscreva() {
|
|
356
356
|
const simboloAtual = this.simboloAtual();
|
|
357
|
-
this.consumir(
|
|
357
|
+
this.consumir(pitugues_1.default.PARENTESE_ESQUERDO, "Esperado '(' antes dos valores em escreva.");
|
|
358
358
|
const argumentos = [];
|
|
359
359
|
do {
|
|
360
360
|
argumentos.push(this.expressao());
|
|
361
|
-
} while (this.verificarSeSimboloAtualEIgualA(
|
|
362
|
-
this.consumir(
|
|
361
|
+
} while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.VIRGULA));
|
|
362
|
+
this.consumir(pitugues_1.default.PARENTESE_DIREITO, "Esperado ')' após os valores em escreva.");
|
|
363
363
|
return new declaracoes_1.Escreva(Number(simboloAtual.linha), simboloAtual.hashArquivo, argumentos);
|
|
364
364
|
}
|
|
365
365
|
declaracaoExpressao() {
|
|
@@ -368,12 +368,12 @@ class AvaliadorSintaticoEguaP {
|
|
|
368
368
|
}
|
|
369
369
|
declaracaoLeia() {
|
|
370
370
|
const simboloAtual = this.simbolos[this.atual];
|
|
371
|
-
this.consumir(
|
|
371
|
+
this.consumir(pitugues_1.default.PARENTESE_ESQUERDO, "Esperado '(' antes dos valores em leia.");
|
|
372
372
|
const argumentos = [];
|
|
373
373
|
do {
|
|
374
374
|
argumentos.push(this.expressao());
|
|
375
|
-
} while (this.verificarSeSimboloAtualEIgualA(
|
|
376
|
-
this.consumir(
|
|
375
|
+
} while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.VIRGULA));
|
|
376
|
+
this.consumir(pitugues_1.default.PARENTESE_DIREITO, "Esperado ')' após os valores em leia.");
|
|
377
377
|
return new declaracoes_1.Leia(simboloAtual.hashArquivo, Number(simboloAtual.linha), argumentos);
|
|
378
378
|
}
|
|
379
379
|
blocoEscopo() {
|
|
@@ -439,18 +439,18 @@ class AvaliadorSintaticoEguaP {
|
|
|
439
439
|
try {
|
|
440
440
|
this.blocos += 1;
|
|
441
441
|
const condicao = this.expressao();
|
|
442
|
-
this.consumir(
|
|
442
|
+
this.consumir(pitugues_1.default.DOIS_PONTOS, "Esperado ':' após 'escolha'.");
|
|
443
443
|
const caminhos = [];
|
|
444
444
|
let caminhoPadrao = null;
|
|
445
445
|
while (!this.estaNoFinal() &&
|
|
446
|
-
[
|
|
447
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
446
|
+
[pitugues_1.default.CASO, pitugues_1.default.PADRAO].includes(this.simbolos[this.atual].tipo)) {
|
|
447
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.CASO)) {
|
|
448
448
|
const caminhoCondicoes = [this.expressao()];
|
|
449
|
-
this.consumir(
|
|
450
|
-
while (this.verificarTipoSimboloAtual(
|
|
451
|
-
this.consumir(
|
|
449
|
+
this.consumir(pitugues_1.default.DOIS_PONTOS, "Esperado ':' após o 'caso'.");
|
|
450
|
+
while (this.verificarTipoSimboloAtual(pitugues_1.default.CASO)) {
|
|
451
|
+
this.consumir(pitugues_1.default.CASO, null);
|
|
452
452
|
caminhoCondicoes.push(this.expressao());
|
|
453
|
-
this.consumir(
|
|
453
|
+
this.consumir(pitugues_1.default.DOIS_PONTOS, "Esperado ':' após declaração do 'caso'.");
|
|
454
454
|
}
|
|
455
455
|
// Como dois-pontos é um símbolo usado para conferir se há um início de bloco,
|
|
456
456
|
// não podemos simplesmente chamar `this.resolverDeclaracao()` porque o dois-pontos já
|
|
@@ -463,13 +463,13 @@ class AvaliadorSintaticoEguaP {
|
|
|
463
463
|
declaracoes,
|
|
464
464
|
});
|
|
465
465
|
}
|
|
466
|
-
else if (this.verificarSeSimboloAtualEIgualA(
|
|
466
|
+
else if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.PADRAO)) {
|
|
467
467
|
if (caminhoPadrao !== null) {
|
|
468
468
|
const excecao = new erro_avaliador_sintatico_1.ErroAvaliadorSintatico(this.simboloAtual(), "Você só pode ter um caminho padrão em cada declaração de 'escolha'.");
|
|
469
469
|
this.erros.push(excecao);
|
|
470
470
|
throw excecao;
|
|
471
471
|
}
|
|
472
|
-
this.consumir(
|
|
472
|
+
this.consumir(pitugues_1.default.DOIS_PONTOS, "Esperado ':' após declaração do 'padrao'.");
|
|
473
473
|
// Como dois-pontos é um símbolo usado para conferir se há um início de bloco,
|
|
474
474
|
// não podemos simplesmente chamar `this.resolverDeclaracao()` porque o dois-pontos já
|
|
475
475
|
// foi consumido na verificação.
|
|
@@ -492,21 +492,21 @@ class AvaliadorSintaticoEguaP {
|
|
|
492
492
|
const simboloPara = this.simboloAnterior();
|
|
493
493
|
this.blocos += 1;
|
|
494
494
|
let inicializador;
|
|
495
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
495
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.PONTO_E_VIRGULA)) {
|
|
496
496
|
inicializador = null;
|
|
497
497
|
}
|
|
498
|
-
else if (this.verificarSeSimboloAtualEIgualA(
|
|
498
|
+
else if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.VARIAVEL)) {
|
|
499
499
|
inicializador = this.declaracaoDeVariaveis();
|
|
500
500
|
}
|
|
501
501
|
else {
|
|
502
502
|
inicializador = this.declaracaoExpressao();
|
|
503
503
|
}
|
|
504
504
|
let condicao = null;
|
|
505
|
-
if (!this.verificarTipoSimboloAtual(
|
|
505
|
+
if (!this.verificarTipoSimboloAtual(pitugues_1.default.PONTO_E_VIRGULA)) {
|
|
506
506
|
condicao = this.expressao();
|
|
507
507
|
}
|
|
508
508
|
let incrementar = null;
|
|
509
|
-
if (this.simbolos[this.atual].tipo !==
|
|
509
|
+
if (this.simbolos[this.atual].tipo !== pitugues_1.default.DOIS_PONTOS) {
|
|
510
510
|
incrementar = this.expressao();
|
|
511
511
|
}
|
|
512
512
|
const corpo = this.resolverDeclaracao();
|
|
@@ -545,7 +545,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
545
545
|
this.verificarSeSimboloAtualEIgualA(tiposDeSimbolos.ESPACO_INDENTACAO);
|
|
546
546
|
} */
|
|
547
547
|
let caminhoSenao = null;
|
|
548
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
548
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.SENAO, pitugues_1.default.SENÃO)) {
|
|
549
549
|
caminhoSenao = this.resolverDeclaracao();
|
|
550
550
|
}
|
|
551
551
|
return new declaracoes_1.Se(condicao, caminhoEntao, [], caminhoSenao);
|
|
@@ -565,34 +565,34 @@ class AvaliadorSintaticoEguaP {
|
|
|
565
565
|
declaracaoRetorna() {
|
|
566
566
|
const palavraChave = this.simboloAnterior();
|
|
567
567
|
let valor = null;
|
|
568
|
-
if (!this.verificarTipoSimboloAtual(
|
|
568
|
+
if (!this.verificarTipoSimboloAtual(pitugues_1.default.PONTO_E_VIRGULA)) {
|
|
569
569
|
valor = this.expressao();
|
|
570
570
|
}
|
|
571
571
|
return new declaracoes_1.Retorna(palavraChave, valor);
|
|
572
572
|
}
|
|
573
573
|
declaracaoImportar() {
|
|
574
|
-
this.consumir(
|
|
574
|
+
this.consumir(pitugues_1.default.PARENTESE_ESQUERDO, "Esperado '(' após declaração.");
|
|
575
575
|
const caminho = this.expressao();
|
|
576
|
-
const simboloFechamento = this.consumir(
|
|
576
|
+
const simboloFechamento = this.consumir(pitugues_1.default.PARENTESE_DIREITO, "Esperado ')' após declaração.");
|
|
577
577
|
return new declaracoes_1.Importar(caminho, simboloFechamento);
|
|
578
578
|
}
|
|
579
579
|
declaracaoTente() {
|
|
580
580
|
const simboloTente = this.simboloAnterior();
|
|
581
|
-
this.consumir(
|
|
581
|
+
this.consumir(pitugues_1.default.DOIS_PONTOS, "Esperado ':' após a declaração 'tente'.");
|
|
582
582
|
const blocoTente = this.blocoEscopo();
|
|
583
583
|
let blocoPegue = null;
|
|
584
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
585
|
-
this.consumir(
|
|
584
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.PEGUE)) {
|
|
585
|
+
this.consumir(pitugues_1.default.DOIS_PONTOS, "Esperado ':' após a declaração 'pegue'.");
|
|
586
586
|
blocoPegue = this.blocoEscopo();
|
|
587
587
|
}
|
|
588
588
|
let blocoSenao = null;
|
|
589
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
590
|
-
this.consumir(
|
|
589
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.SENAO, pitugues_1.default.SENÃO)) {
|
|
590
|
+
this.consumir(pitugues_1.default.DOIS_PONTOS, "Esperado ':' após a declaração 'senão'.");
|
|
591
591
|
blocoSenao = this.blocoEscopo();
|
|
592
592
|
}
|
|
593
593
|
let blocoFinalmente = null;
|
|
594
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
595
|
-
this.consumir(
|
|
594
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.FINALMENTE)) {
|
|
595
|
+
this.consumir(pitugues_1.default.DOIS_PONTOS, "Esperado ':' após a declaração 'pegue'.");
|
|
596
596
|
blocoFinalmente = this.blocoEscopo();
|
|
597
597
|
}
|
|
598
598
|
return new declaracoes_1.Tente(simboloTente.hashArquivo, Number(simboloTente.linha), blocoTente, blocoPegue, blocoSenao, blocoFinalmente);
|
|
@@ -602,7 +602,7 @@ class AvaliadorSintaticoEguaP {
|
|
|
602
602
|
try {
|
|
603
603
|
this.blocos += 1;
|
|
604
604
|
const declaracaoOuBlocoFazer = this.resolverDeclaracao();
|
|
605
|
-
this.consumir(
|
|
605
|
+
this.consumir(pitugues_1.default.ENQUANTO, "Esperado declaração do 'enquanto' após o escopo da declaração 'fazer'.");
|
|
606
606
|
const condicaoEnquanto = this.expressao();
|
|
607
607
|
return new declaracoes_1.Fazer(simboloFazer.hashArquivo, Number(simboloFazer.linha), declaracaoOuBlocoFazer, condicaoEnquanto);
|
|
608
608
|
}
|
|
@@ -611,28 +611,28 @@ class AvaliadorSintaticoEguaP {
|
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
resolverDeclaracao() {
|
|
614
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
614
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.FAZER))
|
|
615
615
|
return this.declaracaoFazer();
|
|
616
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
616
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.TENTE))
|
|
617
617
|
return this.declaracaoTente();
|
|
618
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
618
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.ESCOLHA))
|
|
619
619
|
return this.declaracaoEscolha();
|
|
620
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
620
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.RETORNA))
|
|
621
621
|
return this.declaracaoRetorna();
|
|
622
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
622
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.CONTINUA))
|
|
623
623
|
return this.declaracaoContinua();
|
|
624
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
625
|
-
this.verificarSeSimboloAtualEIgualA(
|
|
624
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.SUSTAR) ||
|
|
625
|
+
this.verificarSeSimboloAtualEIgualA(pitugues_1.default.PAUSA))
|
|
626
626
|
return this.declaracaoSustar();
|
|
627
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
627
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.PARA))
|
|
628
628
|
return this.declaracaoPara();
|
|
629
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
629
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.ENQUANTO))
|
|
630
630
|
return this.declaracaoEnquanto();
|
|
631
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
631
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.SE))
|
|
632
632
|
return this.declaracaoSe();
|
|
633
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
633
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.ESCREVA))
|
|
634
634
|
return this.declaracaoEscreva();
|
|
635
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
635
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.DOIS_PONTOS)) {
|
|
636
636
|
const simboloInicioBloco = this.simboloAnterior();
|
|
637
637
|
return new declaracoes_1.Bloco(simboloInicioBloco.hashArquivo, Number(simboloInicioBloco.linha), this.blocoEscopo());
|
|
638
638
|
}
|
|
@@ -640,8 +640,8 @@ class AvaliadorSintaticoEguaP {
|
|
|
640
640
|
}
|
|
641
641
|
funcao(tipo, construtor) {
|
|
642
642
|
const simbolo = !construtor
|
|
643
|
-
? this.consumir(
|
|
644
|
-
: new lexador_1.Simbolo(
|
|
643
|
+
? this.consumir(pitugues_1.default.IDENTIFICADOR, `Esperado nome ${tipo}.`)
|
|
644
|
+
: new lexador_1.Simbolo(pitugues_1.default.CONSTRUTOR, 'construtor', null, -1, -1);
|
|
645
645
|
return new declaracoes_1.FuncaoDeclaracao(simbolo, this.corpoDaFuncao(tipo));
|
|
646
646
|
}
|
|
647
647
|
logicaComumParametros() {
|
|
@@ -651,46 +651,46 @@ class AvaliadorSintaticoEguaP {
|
|
|
651
651
|
this.erro(this.simboloAtual(), 'Não pode haver mais de 255 parâmetros');
|
|
652
652
|
}
|
|
653
653
|
const parametro = {};
|
|
654
|
-
if (this.simboloAtual().tipo ===
|
|
655
|
-
this.consumir(
|
|
654
|
+
if (this.simboloAtual().tipo === pitugues_1.default.MULTIPLICACAO) {
|
|
655
|
+
this.consumir(pitugues_1.default.MULTIPLICACAO, null);
|
|
656
656
|
parametro['tipo'] = 'multiplo';
|
|
657
657
|
}
|
|
658
658
|
else {
|
|
659
659
|
parametro['tipo'] = 'padrao';
|
|
660
660
|
}
|
|
661
|
-
parametro['nome'] = this.consumir(
|
|
662
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
661
|
+
parametro['nome'] = this.consumir(pitugues_1.default.IDENTIFICADOR, 'Esperado nome do parâmetro.');
|
|
662
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.IGUAL)) {
|
|
663
663
|
parametro['valorPadrao'] = this.primario();
|
|
664
664
|
}
|
|
665
665
|
parametros.push(parametro);
|
|
666
666
|
if (parametro['tipo'] === 'multiplo')
|
|
667
667
|
break;
|
|
668
|
-
} while (this.verificarSeSimboloAtualEIgualA(
|
|
668
|
+
} while (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.VIRGULA));
|
|
669
669
|
return parametros;
|
|
670
670
|
}
|
|
671
671
|
corpoDaFuncao(tipo) {
|
|
672
|
-
this.consumir(
|
|
672
|
+
this.consumir(pitugues_1.default.PARENTESE_ESQUERDO, `Esperado '(' após o nome ${tipo}.`);
|
|
673
673
|
let parametros = [];
|
|
674
|
-
if (!this.verificarTipoSimboloAtual(
|
|
674
|
+
if (!this.verificarTipoSimboloAtual(pitugues_1.default.PARENTESE_DIREITO)) {
|
|
675
675
|
parametros = this.logicaComumParametros();
|
|
676
676
|
}
|
|
677
|
-
this.consumir(
|
|
678
|
-
this.consumir(
|
|
677
|
+
this.consumir(pitugues_1.default.PARENTESE_DIREITO, "Esperado ')' após parâmetros.");
|
|
678
|
+
this.consumir(pitugues_1.default.DOIS_PONTOS, `Esperado ':' antes do escopo do ${tipo}.`);
|
|
679
679
|
const corpo = this.blocoEscopo();
|
|
680
680
|
return new construtos_1.FuncaoConstruto(this.hashArquivo, 0, parametros, corpo);
|
|
681
681
|
}
|
|
682
682
|
declaracaoDeClasse() {
|
|
683
|
-
const simbolo = this.consumir(
|
|
683
|
+
const simbolo = this.consumir(pitugues_1.default.IDENTIFICADOR, 'Esperado nome da classe.');
|
|
684
684
|
let superClasse = null;
|
|
685
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
686
|
-
this.consumir(
|
|
685
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.HERDA)) {
|
|
686
|
+
this.consumir(pitugues_1.default.IDENTIFICADOR, 'Esperado nome da Superclasse.');
|
|
687
687
|
superClasse = new construtos_1.Variavel(this.hashArquivo, this.simboloAnterior());
|
|
688
688
|
}
|
|
689
|
-
this.consumir(
|
|
689
|
+
this.consumir(pitugues_1.default.DOIS_PONTOS, "Esperado ':' antes do escopo da classe.");
|
|
690
690
|
const metodos = [];
|
|
691
691
|
while (!this.estaNoFinal() &&
|
|
692
|
-
this.verificarSeSimboloAtualEIgualA(
|
|
693
|
-
metodos.push(this.funcao('método', this.simbolos[this.atual - 1].tipo ===
|
|
692
|
+
this.verificarSeSimboloAtualEIgualA(pitugues_1.default.CONSTRUTOR, pitugues_1.default.FUNCAO, pitugues_1.default.FUNÇÃO)) {
|
|
693
|
+
metodos.push(this.funcao('método', this.simbolos[this.atual - 1].tipo === pitugues_1.default.CONSTRUTOR));
|
|
694
694
|
}
|
|
695
695
|
return new declaracoes_1.Classe(simbolo, superClasse, metodos);
|
|
696
696
|
}
|
|
@@ -701,15 +701,15 @@ class AvaliadorSintaticoEguaP {
|
|
|
701
701
|
*/
|
|
702
702
|
declaracao() {
|
|
703
703
|
try {
|
|
704
|
-
if ((this.verificarTipoSimboloAtual(
|
|
705
|
-
this.verificarTipoSimboloAtual(
|
|
706
|
-
this.verificarTipoProximoSimbolo(
|
|
704
|
+
if ((this.verificarTipoSimboloAtual(pitugues_1.default.FUNCAO) ||
|
|
705
|
+
this.verificarTipoSimboloAtual(pitugues_1.default.FUNÇÃO)) &&
|
|
706
|
+
this.verificarTipoProximoSimbolo(pitugues_1.default.IDENTIFICADOR)) {
|
|
707
707
|
this.avancarEDevolverAnterior();
|
|
708
708
|
return this.funcao('funcao');
|
|
709
709
|
}
|
|
710
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
710
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.VARIAVEL))
|
|
711
711
|
return this.declaracaoDeVariaveis();
|
|
712
|
-
if (this.verificarSeSimboloAtualEIgualA(
|
|
712
|
+
if (this.verificarSeSimboloAtualEIgualA(pitugues_1.default.CLASSE))
|
|
713
713
|
return this.declaracaoDeClasse();
|
|
714
714
|
return this.resolverDeclaracao();
|
|
715
715
|
}
|
|
@@ -747,5 +747,5 @@ class AvaliadorSintaticoEguaP {
|
|
|
747
747
|
};
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
exports.
|
|
751
|
-
//# sourceMappingURL=avaliador-sintatico-
|
|
750
|
+
exports.AvaliadorSintaticoPitugues = AvaliadorSintaticoPitugues;
|
|
751
|
+
//# sourceMappingURL=avaliador-sintatico-pitugues.js.map
|