@designliquido/delegua 0.8.1 → 0.9.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/bin/package.json +1 -1
- package/fontes/avaliador-sintatico/avaliador-sintatico-base.d.ts +4 -3
- package/fontes/avaliador-sintatico/avaliador-sintatico-base.js +4 -1
- package/fontes/avaliador-sintatico/avaliador-sintatico-base.js.map +1 -1
- package/fontes/avaliador-sintatico/avaliador-sintatico.d.ts +4 -3
- package/fontes/avaliador-sintatico/avaliador-sintatico.js +17 -3
- package/fontes/avaliador-sintatico/avaliador-sintatico.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.d.ts +4 -3
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.js +6 -3
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.d.ts +4 -3
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.js +15 -3
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-visualg.d.ts +2 -2
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-visualg.js +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-visualg.js.map +1 -1
- package/fontes/avaliador-sintatico/retornos/retorno-declaracao.d.ts +2 -2
- package/fontes/avaliador-sintatico/retornos/retorno-primario.d.ts +2 -2
- package/fontes/bibliotecas/biblioteca-global.js +352 -178
- package/fontes/bibliotecas/biblioteca-global.js.map +1 -1
- package/fontes/construtos/acesso-indice-variavel.d.ts +1 -1
- package/fontes/construtos/acesso-indice-variavel.js +44 -1
- package/fontes/construtos/acesso-indice-variavel.js.map +1 -1
- package/fontes/construtos/acesso-metodo.d.ts +1 -1
- package/fontes/construtos/acesso-metodo.js +44 -1
- package/fontes/construtos/acesso-metodo.js.map +1 -1
- package/fontes/construtos/agrupamento.d.ts +1 -1
- package/fontes/construtos/agrupamento.js +44 -1
- package/fontes/construtos/agrupamento.js.map +1 -1
- package/fontes/construtos/atribuicao-sobrescrita.d.ts +2 -1
- package/fontes/construtos/atribuicao-sobrescrita.js +44 -1
- package/fontes/construtos/atribuicao-sobrescrita.js.map +1 -1
- package/fontes/construtos/atribuir.d.ts +1 -1
- package/fontes/construtos/atribuir.js +44 -1
- package/fontes/construtos/atribuir.js.map +1 -1
- package/fontes/construtos/binario.d.ts +1 -1
- package/fontes/construtos/binario.js +44 -1
- package/fontes/construtos/binario.js.map +1 -1
- package/fontes/construtos/chamada.d.ts +1 -1
- package/fontes/construtos/chamada.js +44 -1
- package/fontes/construtos/chamada.js.map +1 -1
- package/fontes/construtos/construto.d.ts +1 -1
- package/fontes/construtos/{conjunto.d.ts → definir-valor.d.ts} +3 -2
- package/fontes/construtos/definir-valor.js +61 -0
- package/fontes/construtos/definir-valor.js.map +1 -0
- package/fontes/construtos/dicionario.d.ts +2 -1
- package/fontes/construtos/dicionario.js +44 -1
- package/fontes/construtos/dicionario.js.map +1 -1
- package/fontes/construtos/funcao.d.ts +2 -2
- package/fontes/construtos/funcao.js +47 -7
- package/fontes/construtos/funcao.js.map +1 -1
- package/fontes/construtos/index.d.ts +1 -1
- package/fontes/construtos/index.js +1 -1
- package/fontes/construtos/index.js.map +1 -1
- package/fontes/construtos/isto.d.ts +2 -1
- package/fontes/construtos/isto.js +41 -1
- package/fontes/construtos/isto.js.map +1 -1
- package/fontes/construtos/literal.d.ts +1 -1
- package/fontes/construtos/literal.js +41 -1
- package/fontes/construtos/literal.js.map +1 -1
- package/fontes/construtos/logico.d.ts +2 -1
- package/fontes/construtos/logico.js +44 -1
- package/fontes/construtos/logico.js.map +1 -1
- package/fontes/construtos/super.d.ts +2 -2
- package/fontes/construtos/super.js +41 -1
- package/fontes/construtos/super.js.map +1 -1
- package/fontes/construtos/unario.d.ts +2 -1
- package/fontes/construtos/unario.js +44 -1
- package/fontes/construtos/unario.js.map +1 -1
- package/fontes/construtos/variavel.d.ts +1 -1
- package/fontes/construtos/variavel.js +41 -1
- package/fontes/construtos/variavel.js.map +1 -1
- package/fontes/construtos/vetor.d.ts +2 -1
- package/fontes/construtos/vetor.js +44 -1
- package/fontes/construtos/vetor.js.map +1 -1
- package/fontes/declaracoes/bloco.d.ts +1 -1
- package/fontes/declaracoes/bloco.js +44 -1
- package/fontes/declaracoes/bloco.js.map +1 -1
- package/fontes/declaracoes/classe.d.ts +2 -2
- package/fontes/declaracoes/classe.js +44 -1
- package/fontes/declaracoes/classe.js.map +1 -1
- package/fontes/declaracoes/continua.d.ts +2 -2
- package/fontes/declaracoes/continua.js +41 -1
- package/fontes/declaracoes/continua.js.map +1 -1
- package/fontes/declaracoes/declaracao.d.ts +2 -1
- package/fontes/declaracoes/declaracao.js +41 -1
- package/fontes/declaracoes/declaracao.js.map +1 -1
- package/fontes/declaracoes/enquanto.d.ts +2 -1
- package/fontes/declaracoes/enquanto.js +44 -1
- package/fontes/declaracoes/enquanto.js.map +1 -1
- package/fontes/declaracoes/escolha.d.ts +2 -1
- package/fontes/declaracoes/escolha.js +44 -1
- package/fontes/declaracoes/escolha.js.map +1 -1
- package/fontes/declaracoes/escreva.d.ts +1 -1
- package/fontes/declaracoes/escreva.js +44 -1
- package/fontes/declaracoes/escreva.js.map +1 -1
- package/fontes/declaracoes/expressao.d.ts +1 -1
- package/fontes/declaracoes/expressao.js +44 -1
- package/fontes/declaracoes/expressao.js.map +1 -1
- package/fontes/declaracoes/fazer.d.ts +2 -1
- package/fontes/declaracoes/fazer.js +44 -1
- package/fontes/declaracoes/fazer.js.map +1 -1
- package/fontes/declaracoes/funcao.d.ts +2 -2
- package/fontes/declaracoes/funcao.js +48 -8
- package/fontes/declaracoes/funcao.js.map +1 -1
- package/fontes/declaracoes/importar.d.ts +2 -1
- package/fontes/declaracoes/importar.js +44 -1
- package/fontes/declaracoes/importar.js.map +1 -1
- package/fontes/declaracoes/leia.d.ts +1 -1
- package/fontes/declaracoes/leia.js +44 -1
- package/fontes/declaracoes/leia.js.map +1 -1
- package/fontes/declaracoes/para.d.ts +2 -1
- package/fontes/declaracoes/para.js +44 -1
- package/fontes/declaracoes/para.js.map +1 -1
- package/fontes/declaracoes/retorna.d.ts +1 -1
- package/fontes/declaracoes/retorna.js +44 -1
- package/fontes/declaracoes/retorna.js.map +1 -1
- package/fontes/declaracoes/se.d.ts +1 -1
- package/fontes/declaracoes/se.js +44 -1
- package/fontes/declaracoes/se.js.map +1 -1
- package/fontes/declaracoes/sustar.d.ts +1 -1
- package/fontes/declaracoes/sustar.js +41 -1
- package/fontes/declaracoes/sustar.js.map +1 -1
- package/fontes/declaracoes/tente.d.ts +1 -1
- package/fontes/declaracoes/tente.js +44 -1
- package/fontes/declaracoes/tente.js.map +1 -1
- package/fontes/declaracoes/var.d.ts +1 -1
- package/fontes/declaracoes/var.js +44 -1
- package/fontes/declaracoes/var.js.map +1 -1
- package/fontes/delegua.d.ts +3 -3
- package/fontes/delegua.js +138 -63
- package/fontes/delegua.js.map +1 -1
- package/fontes/depuracao/servidor-depuracao.d.ts +4 -4
- package/fontes/depuracao/servidor-depuracao.js +121 -47
- package/fontes/depuracao/servidor-depuracao.js.map +1 -1
- package/fontes/estruturas/delegua-classe.d.ts +1 -1
- package/fontes/estruturas/{funcao.d.ts → delegua-funcao.d.ts} +4 -4
- package/fontes/estruturas/delegua-funcao.js +126 -0
- package/fontes/estruturas/delegua-funcao.js.map +1 -0
- package/fontes/estruturas/funcao-padrao.d.ts +1 -1
- package/fontes/estruturas/funcao-padrao.js +46 -2
- package/fontes/estruturas/funcao-padrao.js.map +1 -1
- package/fontes/estruturas/index.d.ts +1 -1
- package/fontes/estruturas/index.js +1 -1
- package/fontes/estruturas/index.js.map +1 -1
- package/fontes/interfaces/avaliador-sintatico-interface.d.ts +7 -6
- package/fontes/interfaces/delegua-interface.d.ts +2 -2
- package/fontes/interfaces/interpretador-com-depuracao-interface.d.ts +3 -4
- package/fontes/interfaces/interpretador-interface.d.ts +10 -9
- package/fontes/interfaces/resolvedor-interface.d.ts +1 -1
- package/fontes/interpretador/dialetos/egua-classico.d.ts +35 -33
- package/fontes/interpretador/dialetos/egua-classico.js +911 -474
- package/fontes/interpretador/dialetos/egua-classico.js.map +1 -1
- package/fontes/interpretador/interpretador-com-depuracao.d.ts +6 -6
- package/fontes/interpretador/interpretador-com-depuracao.js +280 -155
- package/fontes/interpretador/interpretador-com-depuracao.js.map +1 -1
- package/fontes/interpretador/interpretador.d.ts +41 -36
- package/fontes/interpretador/interpretador.js +1034 -536
- package/fontes/interpretador/interpretador.js.map +1 -1
- package/fontes/lexador/lexador.js +2 -2
- package/fontes/lexador/lexador.js.map +1 -1
- package/fontes/lexador/palavras-reservadas.d.ts +22 -21
- package/fontes/lexador/palavras-reservadas.js +22 -21
- package/fontes/lexador/palavras-reservadas.js.map +1 -1
- package/fontes/resolvedor/dialetos/egua-classico.d.ts +27 -4
- package/fontes/resolvedor/dialetos/egua-classico.js +42 -1
- package/fontes/resolvedor/dialetos/egua-classico.js.map +1 -1
- package/fontes/tipos-de-simbolos/delegua.d.ts +2 -1
- package/fontes/tipos-de-simbolos/delegua.js +2 -1
- package/fontes/tipos-de-simbolos/delegua.js.map +1 -1
- package/fontes/tipos-de-simbolos/eguap.d.ts +1 -0
- package/fontes/tipos-de-simbolos/eguap.js +1 -0
- package/fontes/tipos-de-simbolos/eguap.js.map +1 -1
- package/package.json +1 -1
- package/testes/biblioteca-global.test.js +424 -181
- package/testes/biblioteca-global.test.js.map +1 -1
- package/testes/egua-classico/interpretador.test.js +380 -164
- package/testes/egua-classico/interpretador.test.js.map +1 -1
- package/testes/eguap/interpretador.test.js +388 -172
- package/testes/eguap/interpretador.test.js.map +1 -1
- package/testes/interpretador.test.js +877 -400
- package/testes/interpretador.test.js.map +1 -1
- package/fontes/construtos/conjunto.js +0 -18
- package/fontes/construtos/conjunto.js.map +0 -1
- package/fontes/estruturas/funcao.js +0 -80
- package/fontes/estruturas/funcao.js.map +0 -1
|
@@ -22,6 +22,42 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
+
function step(op) {
|
|
39
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
+
while (_) try {
|
|
41
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
+
switch (op[0]) {
|
|
44
|
+
case 0: case 1: t = op; break;
|
|
45
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
+
default:
|
|
49
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
+
if (t[2]) _.ops.pop();
|
|
54
|
+
_.trys.pop(); continue;
|
|
55
|
+
}
|
|
56
|
+
op = body.call(thisArg, _);
|
|
57
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
+
}
|
|
60
|
+
};
|
|
25
61
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
62
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
63
|
};
|
|
@@ -45,15 +81,24 @@ var ServidorDepuracao = /** @class */ (function () {
|
|
|
45
81
|
}
|
|
46
82
|
return { sucesso: true, hashArquivo: hashArquivo, linha: linha };
|
|
47
83
|
};
|
|
48
|
-
this.comandoAdentrarEscopo = function (conexao) {
|
|
49
|
-
var linhasResposta
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
84
|
+
this.comandoAdentrarEscopo = function (conexao) { return __awaiter(_this, void 0, void 0, function () {
|
|
85
|
+
var linhasResposta;
|
|
86
|
+
return __generator(this, function (_a) {
|
|
87
|
+
switch (_a.label) {
|
|
88
|
+
case 0:
|
|
89
|
+
linhasResposta = '';
|
|
90
|
+
linhasResposta += "Recebido comando 'adentrar-escopo'\n";
|
|
91
|
+
linhasResposta += '--- adentrar-escopo-resposta ---\n';
|
|
92
|
+
this.interpretador.comandoAdentrarEscopo = true;
|
|
93
|
+
this.interpretador.pontoDeParadaAtivo = false;
|
|
94
|
+
return [4 /*yield*/, this.interpretador.interpretacaoApenasUmaInstrucao()];
|
|
95
|
+
case 1:
|
|
96
|
+
_a.sent();
|
|
97
|
+
conexao.write(linhasResposta);
|
|
98
|
+
return [2 /*return*/];
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}); };
|
|
57
102
|
this.comandoAdicionarPontoParada = function (comando, conexao) {
|
|
58
103
|
conexao.write("Recebido comando 'adicionar-ponto-parada'\n");
|
|
59
104
|
if (comando.length < 3) {
|
|
@@ -68,34 +113,54 @@ var ServidorDepuracao = /** @class */ (function () {
|
|
|
68
113
|
});
|
|
69
114
|
}
|
|
70
115
|
};
|
|
71
|
-
this.comandoAvaliar = function (comando, conexao) {
|
|
72
|
-
var linhasResposta
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
116
|
+
this.comandoAvaliar = function (comando, conexao) { return __awaiter(_this, void 0, void 0, function () {
|
|
117
|
+
var linhasResposta, expressaoAvaliar, retornoInterpretacao, textoInterpretacao, erro_1;
|
|
118
|
+
return __generator(this, function (_a) {
|
|
119
|
+
switch (_a.label) {
|
|
120
|
+
case 0:
|
|
121
|
+
linhasResposta = '';
|
|
122
|
+
comando.shift();
|
|
123
|
+
expressaoAvaliar = comando.join(' ');
|
|
124
|
+
_a.label = 1;
|
|
125
|
+
case 1:
|
|
126
|
+
_a.trys.push([1, 3, , 4]);
|
|
127
|
+
return [4 /*yield*/, this.instanciaDelegua.executarUmaLinha(expressaoAvaliar)];
|
|
128
|
+
case 2:
|
|
129
|
+
retornoInterpretacao =
|
|
130
|
+
_a.sent();
|
|
131
|
+
textoInterpretacao = retornoInterpretacao.resultado;
|
|
132
|
+
return [3 /*break*/, 4];
|
|
133
|
+
case 3:
|
|
134
|
+
erro_1 = _a.sent();
|
|
135
|
+
textoInterpretacao = [String(erro_1)];
|
|
136
|
+
return [3 /*break*/, 4];
|
|
137
|
+
case 4:
|
|
138
|
+
linhasResposta += "Recebido comando 'avaliar'\n";
|
|
139
|
+
linhasResposta += '--- avaliar-resposta ---\n';
|
|
140
|
+
linhasResposta += textoInterpretacao.join('\n') + '\n';
|
|
141
|
+
linhasResposta += '--- fim-avaliar-resposta ---\n';
|
|
142
|
+
conexao.write(linhasResposta);
|
|
143
|
+
return [2 /*return*/];
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}); };
|
|
147
|
+
this.comandoContinuar = function (conexao) { return __awaiter(_this, void 0, void 0, function () {
|
|
148
|
+
var linhasResposta;
|
|
149
|
+
return __generator(this, function (_a) {
|
|
150
|
+
switch (_a.label) {
|
|
151
|
+
case 0:
|
|
152
|
+
linhasResposta = '';
|
|
153
|
+
linhasResposta += "Recebido comando 'continuar'\n";
|
|
154
|
+
this.interpretador.pontoDeParadaAtivo = false;
|
|
155
|
+
return [4 /*yield*/, this.interpretador.continuarInterpretacao()];
|
|
156
|
+
case 1:
|
|
157
|
+
_a.sent();
|
|
158
|
+
linhasResposta += '--- continuar-resposta ---\n';
|
|
159
|
+
conexao.write(linhasResposta);
|
|
160
|
+
return [2 /*return*/];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}); };
|
|
99
164
|
this.comandoPilhaExecucao = function (conexao) {
|
|
100
165
|
var linhasResposta = '';
|
|
101
166
|
linhasResposta += "Recebido comando 'pilha-execucao'\n";
|
|
@@ -139,16 +204,25 @@ var ServidorDepuracao = /** @class */ (function () {
|
|
|
139
204
|
}
|
|
140
205
|
conexao.write(linhasResposta);
|
|
141
206
|
};
|
|
142
|
-
this.comandoProximo = function (conexao) {
|
|
143
|
-
var linhasResposta
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
207
|
+
this.comandoProximo = function (conexao) { return __awaiter(_this, void 0, void 0, function () {
|
|
208
|
+
var linhasResposta;
|
|
209
|
+
return __generator(this, function (_a) {
|
|
210
|
+
switch (_a.label) {
|
|
211
|
+
case 0:
|
|
212
|
+
linhasResposta = '';
|
|
213
|
+
linhasResposta += "Recebido comando 'proximo'\n";
|
|
214
|
+
linhasResposta += '--- proximo-resposta ---\n';
|
|
215
|
+
this.interpretador.comandoProximo = true;
|
|
216
|
+
this.interpretador.pontoDeParadaAtivo = false;
|
|
217
|
+
return [4 /*yield*/, this.interpretador.interpretacaoApenasUmaInstrucao()];
|
|
218
|
+
case 1:
|
|
219
|
+
_a.sent();
|
|
220
|
+
this.interpretador.comandoProximo = false;
|
|
221
|
+
conexao.write(linhasResposta);
|
|
222
|
+
return [2 /*return*/];
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
}); };
|
|
152
226
|
this.comandoRemoverPontoParada = function (comando, conexao) {
|
|
153
227
|
var linhasResposta = '';
|
|
154
228
|
linhasResposta += "Recebido comando 'remover-ponto-parada'\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"servidor-depuracao.js","sourceRoot":"","sources":["../../../fontes/depuracao/servidor-depuracao.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"servidor-depuracao.js","sourceRoot":"","sources":["../../../fontes/depuracao/servidor-depuracao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA2B;AAS3B,oDAA8B;AAG9B;IAOI,2BAAY,iBAAmC;QAA/C,i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EAAqB,CAAC;IACtD,CAAC;IAED,0DAA8B,GAA9B,UAA+B,QAAgB;QAA/C,iBAQC;QAPG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAC,KAAK;YACrC,KAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CACtB,sDAAsD;gBAClD,QAAQ;gBACR,IAAI,CACX,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;IAED,sDAA0B,GAA1B;QAAA,iBAOC;QANG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAC,KAAK;YACrC,KAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;YACpD,KAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IACL,wBAAC;AAAD,CAAC,AAzXD,IAyXC;AAzXY,8CAAiB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InterpretadorInterface } from '../interfaces';
|
|
2
2
|
import { Chamavel } from './chamavel';
|
|
3
|
-
import { DeleguaFuncao } from './funcao';
|
|
3
|
+
import { DeleguaFuncao } from './delegua-funcao';
|
|
4
4
|
import { ObjetoDeleguaClasse } from './objeto-delegua-classe';
|
|
5
5
|
export declare class DeleguaClasse extends Chamavel {
|
|
6
6
|
nome: string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Chamavel } from './chamavel';
|
|
2
2
|
import { InterpretadorInterface } from '../interfaces';
|
|
3
3
|
import { ObjetoDeleguaClasse } from './objeto-delegua-classe';
|
|
4
|
-
import {
|
|
4
|
+
import { FuncaoConstruto } from '../construtos';
|
|
5
5
|
export declare class DeleguaFuncao extends Chamavel {
|
|
6
6
|
nome: string;
|
|
7
|
-
declaracao:
|
|
7
|
+
declaracao: FuncaoConstruto;
|
|
8
8
|
eInicializador: boolean;
|
|
9
9
|
instancia: ObjetoDeleguaClasse;
|
|
10
|
-
constructor(nome: string, declaracao:
|
|
10
|
+
constructor(nome: string, declaracao: FuncaoConstruto, instancia?: ObjetoDeleguaClasse, eInicializador?: boolean);
|
|
11
11
|
aridade(): number;
|
|
12
12
|
paraTexto(): string;
|
|
13
|
-
chamar(interpretador: InterpretadorInterface, argumentos: any): any
|
|
13
|
+
chamar(interpretador: InterpretadorInterface, argumentos: any): Promise<any>;
|
|
14
14
|
definirInstancia(instancia: ObjetoDeleguaClasse): DeleguaFuncao;
|
|
15
15
|
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.DeleguaFuncao = void 0;
|
|
55
|
+
var chamavel_1 = require("./chamavel");
|
|
56
|
+
var espaco_variaveis_1 = require("../espaco-variaveis");
|
|
57
|
+
var quebras_1 = require("../quebras");
|
|
58
|
+
var DeleguaFuncao = /** @class */ (function (_super) {
|
|
59
|
+
__extends(DeleguaFuncao, _super);
|
|
60
|
+
function DeleguaFuncao(nome, declaracao, instancia, eInicializador) {
|
|
61
|
+
if (instancia === void 0) { instancia = undefined; }
|
|
62
|
+
if (eInicializador === void 0) { eInicializador = false; }
|
|
63
|
+
var _this = _super.call(this) || this;
|
|
64
|
+
_this.nome = nome;
|
|
65
|
+
_this.declaracao = declaracao;
|
|
66
|
+
_this.instancia = instancia;
|
|
67
|
+
_this.eInicializador = eInicializador;
|
|
68
|
+
return _this;
|
|
69
|
+
}
|
|
70
|
+
DeleguaFuncao.prototype.aridade = function () {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
return ((_b = (_a = this.declaracao) === null || _a === void 0 ? void 0 : _a.parametros) === null || _b === void 0 ? void 0 : _b.length) || 0;
|
|
73
|
+
};
|
|
74
|
+
DeleguaFuncao.prototype.paraTexto = function () {
|
|
75
|
+
if (this.nome === null)
|
|
76
|
+
return '<função>';
|
|
77
|
+
return "<fun\u00E7\u00E3o ".concat(this.nome, ">");
|
|
78
|
+
};
|
|
79
|
+
DeleguaFuncao.prototype.chamar = function (interpretador, argumentos) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
81
|
+
var ambiente, parametros, i, parametro, nome, valor, retornoBloco;
|
|
82
|
+
return __generator(this, function (_a) {
|
|
83
|
+
switch (_a.label) {
|
|
84
|
+
case 0:
|
|
85
|
+
ambiente = new espaco_variaveis_1.EspacoVariaveis();
|
|
86
|
+
parametros = this.declaracao.parametros;
|
|
87
|
+
if (parametros && parametros.length) {
|
|
88
|
+
for (i = 0; i < parametros.length; i++) {
|
|
89
|
+
parametro = parametros[i];
|
|
90
|
+
nome = parametro['nome'].lexema;
|
|
91
|
+
valor = argumentos[i];
|
|
92
|
+
if (argumentos[i] === null) {
|
|
93
|
+
valor = parametro['padrao']
|
|
94
|
+
? parametro['padrao'].valor
|
|
95
|
+
: null;
|
|
96
|
+
}
|
|
97
|
+
ambiente.valores[nome] = valor;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (this.instancia !== undefined) {
|
|
101
|
+
ambiente.valores['isto'] = {
|
|
102
|
+
valor: this.instancia,
|
|
103
|
+
tipo: 'objeto',
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
return [4 /*yield*/, interpretador.executarBloco(this.declaracao.corpo, ambiente)];
|
|
107
|
+
case 1:
|
|
108
|
+
retornoBloco = _a.sent();
|
|
109
|
+
if (retornoBloco instanceof quebras_1.RetornoQuebra) {
|
|
110
|
+
return [2 /*return*/, retornoBloco.valor];
|
|
111
|
+
}
|
|
112
|
+
if (this.eInicializador) {
|
|
113
|
+
return [2 /*return*/, this.instancia];
|
|
114
|
+
}
|
|
115
|
+
return [2 /*return*/, retornoBloco];
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
DeleguaFuncao.prototype.definirInstancia = function (instancia) {
|
|
121
|
+
return new DeleguaFuncao(this.nome, this.declaracao, instancia, this.eInicializador);
|
|
122
|
+
};
|
|
123
|
+
return DeleguaFuncao;
|
|
124
|
+
}(chamavel_1.Chamavel));
|
|
125
|
+
exports.DeleguaFuncao = DeleguaFuncao;
|
|
126
|
+
//# sourceMappingURL=delegua-funcao.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleg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C,CAAC,CAAC,CAAC;gCAC1B,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;oCACxB,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC;wCACvB,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,KAAK;wCAC3B,CAAC,CAAC,IAAI,CAAC;iCACd;gCAED,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;6BAClC;yBACJ;wBAED,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;4BAC9B,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG;gCACvB,KAAK,EAAE,IAAI,CAAC,SAAS;gCACrB,IAAI,EAAE,QAAQ;6BACjB,CAAC;yBACL;wBAEyB,qBAAM,aAAa,CAAC,aAAa,CACvD,IAAI,CAAC,UAAU,CAAC,KAAK,EACrB,QAAQ,CACX,EAAA;;wBAHK,YAAY,GAAQ,SAGzB;wBACD,IAAI,YAAY,YAAY,uBAAa,EAAE;4BACvC,sBAAO,YAAY,CAAC,KAAK,EAAC;yBAC7B;wBAED,IAAI,IAAI,CAAC,cAAc,EAAE;4BACrB,sBAAO,IAAI,CAAC,SAAS,EAAC;yBACzB;wBAED,sBAAO,YAAY,EAAC;;;;KACvB;IAED,wCAAgB,GAAhB,UAAiB,SAA8B;QAC3C,OAAO,IAAI,aAAa,CACpB,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,UAAU,EACf,SAAS,EACT,IAAI,CAAC,cAAc,CACtB,CAAC;IACN,CAAC;IACL,oBAAC;AAAD,CAAC,AA9ED,CAAmC,mBAAQ,GA8E1C;AA9EY,sCAAa"}
|
|
@@ -7,6 +7,6 @@ export declare class FuncaoPadrao extends Chamavel {
|
|
|
7
7
|
funcao: Function;
|
|
8
8
|
simbolo: any;
|
|
9
9
|
constructor(valorAridade: number, funcao: Function);
|
|
10
|
-
chamar(argumentos: any[], simbolo: any): any
|
|
10
|
+
chamar(argumentos: any[], simbolo: any): Promise<any>;
|
|
11
11
|
paraTexto(): string;
|
|
12
12
|
}
|
|
@@ -14,6 +14,42 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
17
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
54
|
exports.FuncaoPadrao = void 0;
|
|
19
55
|
var chamavel_1 = require("./chamavel");
|
|
@@ -29,8 +65,16 @@ var FuncaoPadrao = /** @class */ (function (_super) {
|
|
|
29
65
|
return _this;
|
|
30
66
|
}
|
|
31
67
|
FuncaoPadrao.prototype.chamar = function (argumentos, simbolo) {
|
|
32
|
-
this
|
|
33
|
-
|
|
68
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
69
|
+
return __generator(this, function (_a) {
|
|
70
|
+
switch (_a.label) {
|
|
71
|
+
case 0:
|
|
72
|
+
this.simbolo = simbolo;
|
|
73
|
+
return [4 /*yield*/, this.funcao.apply(this, argumentos)];
|
|
74
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
34
78
|
};
|
|
35
79
|
FuncaoPadrao.prototype.paraTexto = function () {
|
|
36
80
|
return '<função>';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"funcao-padrao.js","sourceRoot":"","sources":["../../../fontes/estruturas/funcao-padrao.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"funcao-padrao.js","sourceRoot":"","sources":["../../../fontes/estruturas/funcao-padrao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAsC;AAEtC;;GAEG;AACH;IAAkC,gCAAQ;IAKtC,sBAAY,YAAoB,EAAE,MAAgB;QAAlD,YACI,iBAAO,SAGV;QAFG,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IAEK,6BAAM,GAAZ,UAAa,UAAiB,EAAE,OAAY;;;;;wBACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;wBAChB,qBAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,EAAA;4BAAhD,sBAAO,SAAyC,EAAC;;;;KACpD;IAED,gCAAS,GAAT;QACI,OAAO,UAAU,CAAC;IACtB,CAAC;IACL,mBAAC;AAAD,CAAC,AAnBD,CAAkC,mBAAQ,GAmBzC;AAnBY,oCAAY"}
|
|
@@ -2,7 +2,7 @@ export * from './chamavel';
|
|
|
2
2
|
export * from './classe-padrao';
|
|
3
3
|
export * from './delegua-classe';
|
|
4
4
|
export * from './funcao-padrao';
|
|
5
|
-
export * from './funcao';
|
|
5
|
+
export * from './delegua-funcao';
|
|
6
6
|
export * from './metodo-primitiva';
|
|
7
7
|
export * from './modulo';
|
|
8
8
|
export * from './objeto-delegua-classe';
|
|
@@ -18,7 +18,7 @@ __exportStar(require("./chamavel"), exports);
|
|
|
18
18
|
__exportStar(require("./classe-padrao"), exports);
|
|
19
19
|
__exportStar(require("./delegua-classe"), exports);
|
|
20
20
|
__exportStar(require("./funcao-padrao"), exports);
|
|
21
|
-
__exportStar(require("./funcao"), exports);
|
|
21
|
+
__exportStar(require("./delegua-funcao"), exports);
|
|
22
22
|
__exportStar(require("./metodo-primitiva"), exports);
|
|
23
23
|
__exportStar(require("./modulo"), exports);
|
|
24
24
|
__exportStar(require("./objeto-delegua-classe"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fontes/estruturas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,kDAAgC;AAChC,mDAAiC;AACjC,kDAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fontes/estruturas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,kDAAgC;AAChC,mDAAiC;AACjC,kDAAgC;AAChC,mDAAiC;AACjC,qDAAmC;AACnC,2CAAyB;AACzB,0DAAwC;AACxC,kDAAgC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ErroAvaliadorSintatico } from '../avaliador-sintatico/erro-avaliador-sintatico';
|
|
2
2
|
import { RetornoAvaliadorSintatico } from './retornos/retorno-avaliador-sintatico';
|
|
3
|
-
import { Construto,
|
|
4
|
-
import { Classe, Continua, Enquanto, Escolha, Escreva, Expressao, Fazer,
|
|
3
|
+
import { Construto, FuncaoConstruto } from '../construtos';
|
|
4
|
+
import { Classe, Continua, Enquanto, Escolha, Escreva, Expressao, Fazer, FuncaoDeclaracao as FuncaoDeclaracao, Importar, Leia, Para, Retorna, Se, Sustar, Tente, Var } from '../declaracoes';
|
|
5
5
|
import { RetornoLexador } from './retornos/retorno-lexador';
|
|
6
6
|
import { SimboloInterface } from './simbolo-interface';
|
|
7
7
|
export interface AvaliadorSintaticoInterface {
|
|
@@ -32,13 +32,14 @@ export interface AvaliadorSintaticoInterface {
|
|
|
32
32
|
e(): Construto;
|
|
33
33
|
ou(): Construto;
|
|
34
34
|
atribuir(): Construto;
|
|
35
|
+
blocoEscopo(): any[];
|
|
35
36
|
expressao(): Construto;
|
|
37
|
+
declaracaoEnquanto(): Enquanto;
|
|
36
38
|
declaracaoEscreva(): Escreva;
|
|
37
39
|
declaracaoExpressao(): Expressao;
|
|
38
|
-
|
|
39
|
-
declaracaoSe(): Se;
|
|
40
|
-
declaracaoEnquanto(): Enquanto;
|
|
40
|
+
declaracaoLeia(): Leia;
|
|
41
41
|
declaracaoPara(): Para;
|
|
42
|
+
declaracaoSe(): Se;
|
|
42
43
|
declaracaoSustar(): Sustar;
|
|
43
44
|
declaracaoContinua(): Continua;
|
|
44
45
|
declaracaoRetorna(): Retorna;
|
|
@@ -49,7 +50,7 @@ export interface AvaliadorSintaticoInterface {
|
|
|
49
50
|
resolverDeclaracao(): any;
|
|
50
51
|
declaracaoDeVariavel(): Var;
|
|
51
52
|
funcao(tipo: string): FuncaoDeclaracao;
|
|
52
|
-
corpoDaFuncao(tipo: string):
|
|
53
|
+
corpoDaFuncao(tipo: string): FuncaoConstruto;
|
|
53
54
|
declaracaoDeClasse(): Classe;
|
|
54
55
|
declaracao(): any;
|
|
55
56
|
analisar(retornoLexador: RetornoLexador, hashArquivo?: number): RetornoAvaliadorSintatico;
|
|
@@ -15,8 +15,8 @@ export interface DeleguaInterface {
|
|
|
15
15
|
importador: ImportadorInterface;
|
|
16
16
|
versao(): string;
|
|
17
17
|
carregarArquivo(caminhoRelativoArquivo: string): void;
|
|
18
|
-
executar(retornoImportador: RetornoImportador): RetornoExecucaoInterface
|
|
19
|
-
executarUmaLinha(linha: string): RetornoExecucaoInterface
|
|
18
|
+
executar(retornoImportador: RetornoImportador): Promise<RetornoExecucaoInterface>;
|
|
19
|
+
executarUmaLinha(linha: string): Promise<RetornoExecucaoInterface>;
|
|
20
20
|
reportar(linha: number, onde: any, mensagem: string): void;
|
|
21
21
|
erro(simbolo: SimboloInterface, mensagemDeErro: string): void;
|
|
22
22
|
erroEmTempoDeExecucao(erro: any): void;
|
|
@@ -6,9 +6,8 @@ export interface InterpretadorComDepuracaoInterface extends InterpretadorInterfa
|
|
|
6
6
|
comandoProximo: boolean;
|
|
7
7
|
pontoDeParadaAtivo: boolean;
|
|
8
8
|
pontosParada: PontoParada[];
|
|
9
|
-
interpretacaoApenasUmaInstrucao():
|
|
10
|
-
continuarInterpretacao():
|
|
11
|
-
|
|
12
|
-
proximoESair(): void;
|
|
9
|
+
interpretacaoApenasUmaInstrucao(): Promise<any>;
|
|
10
|
+
continuarInterpretacao(): Promise<any>;
|
|
11
|
+
proximoESair(): Promise<any>;
|
|
13
12
|
prepararParaDepuracao(declaracoes: Declaracao[]): void;
|
|
14
13
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EspacoVariaveis } from '../espaco-variaveis';
|
|
2
2
|
import { Atribuir, Literal, Super } from '../construtos';
|
|
3
|
-
import { Bloco, Classe, Continua, Declaracao, Enquanto, Escolha, Escreva, Expressao, Fazer,
|
|
3
|
+
import { Bloco, Classe, Continua, Declaracao, Enquanto, Escolha, Escreva, Expressao, Fazer, FuncaoDeclaracao, Importar, Leia, Para, Retorna, Se, Sustar, Tente, Var } from '../declaracoes';
|
|
4
4
|
import { ContinuarQuebra, RetornoQuebra, SustarQuebra } from '../quebras';
|
|
5
5
|
import { PilhaEscoposExecucaoInterface } from './pilha-escopos-execucao-interface';
|
|
6
6
|
import { RetornoInterpretador } from './retornos/retorno-interpretador';
|
|
@@ -9,6 +9,7 @@ export interface InterpretadorInterface {
|
|
|
9
9
|
diretorioBase: any;
|
|
10
10
|
funcaoDeRetorno: Function;
|
|
11
11
|
pilhaEscoposExecucao: PilhaEscoposExecucaoInterface;
|
|
12
|
+
interfaceEntradaSaida: any;
|
|
12
13
|
visitarExpressaoLiteral(expressao: Literal): any;
|
|
13
14
|
avaliar(expressao: any): any;
|
|
14
15
|
visitarExpressaoAgrupamento(expressao: any): any;
|
|
@@ -33,17 +34,17 @@ export interface InterpretadorInterface {
|
|
|
33
34
|
visitarExpressaoEnquanto(declaracao: Enquanto): any;
|
|
34
35
|
visitarExpressaoImportar(declaracao: Importar): any;
|
|
35
36
|
visitarExpressaoEscreva(declaracao: Escreva): any;
|
|
36
|
-
executarBloco(declaracoes: Declaracao[], ambiente?: EspacoVariaveis):
|
|
37
|
-
visitarExpressaoBloco(declaracao: Bloco):
|
|
38
|
-
visitarExpressaoVar(declaracao: Var):
|
|
37
|
+
executarBloco(declaracoes: Declaracao[], ambiente?: EspacoVariaveis): Promise<any>;
|
|
38
|
+
visitarExpressaoBloco(declaracao: Bloco): Promise<any>;
|
|
39
|
+
visitarExpressaoVar(declaracao: Var): Promise<any>;
|
|
39
40
|
visitarExpressaoContinua(declaracao?: Continua): ContinuarQuebra;
|
|
40
41
|
visitarExpressaoSustar(declaracao?: Sustar): SustarQuebra;
|
|
41
|
-
visitarExpressaoRetornar(declaracao: Retorna): RetornoQuebra
|
|
42
|
+
visitarExpressaoRetornar(declaracao: Retorna): Promise<RetornoQuebra>;
|
|
42
43
|
visitarExpressaoDeleguaFuncao(expressao: any): any;
|
|
43
|
-
visitarExpressaoAtribuicaoSobrescrita(expressao: any):
|
|
44
|
+
visitarExpressaoAtribuicaoSobrescrita(expressao: any): Promise<any>;
|
|
44
45
|
visitarExpressaoAcessoIndiceVariavel(expressao: any): any;
|
|
45
|
-
|
|
46
|
-
visitarExpressaoFuncao(declaracao:
|
|
46
|
+
visitarExpressaoDefinirValor(expressao: any): any;
|
|
47
|
+
visitarExpressaoFuncao(declaracao: FuncaoDeclaracao): any;
|
|
47
48
|
visitarExpressaoClasse(declaracao: Classe): any;
|
|
48
49
|
visitarExpressaoAcessoMetodo(expressao: any): any;
|
|
49
50
|
visitarExpressaoIsto(expressao: any): any;
|
|
@@ -52,5 +53,5 @@ export interface InterpretadorInterface {
|
|
|
52
53
|
visitarExpressaoSuper(expressao: Super): any;
|
|
53
54
|
paraTexto(objeto: any): any;
|
|
54
55
|
executar(declaracao: Declaracao, mostrarResultado: boolean): any;
|
|
55
|
-
interpretar(declaracoes: Declaracao[], manterAmbiente?: boolean): RetornoInterpretador
|
|
56
|
+
interpretar(declaracoes: Declaracao[], manterAmbiente?: boolean): Promise<RetornoInterpretador>;
|
|
56
57
|
}
|
|
@@ -48,6 +48,6 @@ export interface ResolvedorInterface {
|
|
|
48
48
|
visitarExpressaoLiteral(expressao?: any): any;
|
|
49
49
|
visitarExpressaoLogica(expressao?: any): any;
|
|
50
50
|
visitarExpressaoUnaria(expressao?: any): any;
|
|
51
|
-
|
|
51
|
+
visitarExpressaoDefinirValor(expressao?: any): any;
|
|
52
52
|
visitarExpressaoIsto(expressao?: any): any;
|
|
53
53
|
}
|