@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
|
@@ -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.Sustar = void 0;
|
|
19
55
|
var declaracao_1 = require("./declaracao");
|
|
@@ -23,7 +59,11 @@ var Sustar = /** @class */ (function (_super) {
|
|
|
23
59
|
return _super.call(this, Number(simbolo.linha), simbolo.hashArquivo) || this;
|
|
24
60
|
}
|
|
25
61
|
Sustar.prototype.aceitar = function (visitante) {
|
|
26
|
-
return
|
|
62
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
return [2 /*return*/, Promise.resolve(visitante.visitarExpressaoSustar(this))];
|
|
65
|
+
});
|
|
66
|
+
});
|
|
27
67
|
};
|
|
28
68
|
return Sustar;
|
|
29
69
|
}(declaracao_1.Declaracao));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sustar.js","sourceRoot":"","sources":["../../../fontes/declaracoes/sustar.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sustar.js","sourceRoot":"","sources":["../../../fontes/declaracoes/sustar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAE1C;IAA4B,0BAAU;IAClC,gBAAY,OAAyB;eACjC,kBAAM,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;IACrD,CAAC;IAEK,wBAAO,GAAb,UAAc,SAAiC;;;gBAC3C,sBAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,EAAC;;;KAClE;IACL,aAAC;AAAD,CAAC,AARD,CAA4B,uBAAU,GAQrC;AARY,wBAAM"}
|
|
@@ -6,5 +6,5 @@ export declare class Tente extends Declaracao {
|
|
|
6
6
|
caminhoSenao: any;
|
|
7
7
|
caminhoFinalmente: any;
|
|
8
8
|
constructor(hashArquivo: number, linha: number, caminhoTente: any, caminhoPegue: any, caminhoSenao: any, caminhoFinalmente: any);
|
|
9
|
-
aceitar(visitante: InterpretadorInterface): any
|
|
9
|
+
aceitar(visitante: InterpretadorInterface): Promise<any>;
|
|
10
10
|
}
|
|
@@ -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.Tente = void 0;
|
|
19
55
|
var declaracao_1 = require("./declaracao");
|
|
@@ -28,7 +64,14 @@ var Tente = /** @class */ (function (_super) {
|
|
|
28
64
|
return _this;
|
|
29
65
|
}
|
|
30
66
|
Tente.prototype.aceitar = function (visitante) {
|
|
31
|
-
return
|
|
67
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
+
return __generator(this, function (_a) {
|
|
69
|
+
switch (_a.label) {
|
|
70
|
+
case 0: return [4 /*yield*/, visitante.visitarExpressaoTente(this)];
|
|
71
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
});
|
|
32
75
|
};
|
|
33
76
|
return Tente;
|
|
34
77
|
}(declaracao_1.Declaracao));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tente.js","sourceRoot":"","sources":["../../../fontes/declaracoes/tente.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tente.js","sourceRoot":"","sources":["../../../fontes/declaracoes/tente.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAE1C;IAA2B,yBAAU;IAMjC,eACI,WAAmB,EACnB,KAAa,EACb,YAAiB,EACjB,YAAiB,EACjB,YAAiB,EACjB,iBAAsB;QAN1B,YAQI,kBAAM,KAAK,EAAE,WAAW,CAAC,SAK5B;QAJG,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;;IAC/C,CAAC;IAEK,uBAAO,GAAb,UAAc,SAAiC;;;;4BACpC,qBAAM,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAA;4BAAlD,sBAAO,SAA2C,EAAC;;;;KACtD;IACL,YAAC;AAAD,CAAC,AAxBD,CAA2B,uBAAU,GAwBpC;AAxBY,sBAAK"}
|
|
@@ -5,5 +5,5 @@ export declare class Var extends Declaracao {
|
|
|
5
5
|
simbolo: SimboloInterface;
|
|
6
6
|
inicializador: Construto;
|
|
7
7
|
constructor(simbolo: SimboloInterface, inicializador: Construto);
|
|
8
|
-
aceitar(visitante: InterpretadorInterface): any
|
|
8
|
+
aceitar(visitante: InterpretadorInterface): Promise<any>;
|
|
9
9
|
}
|
|
@@ -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.Var = void 0;
|
|
19
55
|
var declaracao_1 = require("./declaracao");
|
|
@@ -26,7 +62,14 @@ var Var = /** @class */ (function (_super) {
|
|
|
26
62
|
return _this;
|
|
27
63
|
}
|
|
28
64
|
Var.prototype.aceitar = function (visitante) {
|
|
29
|
-
return
|
|
65
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
66
|
+
return __generator(this, function (_a) {
|
|
67
|
+
switch (_a.label) {
|
|
68
|
+
case 0: return [4 /*yield*/, visitante.visitarExpressaoVar(this)];
|
|
69
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
30
73
|
};
|
|
31
74
|
return Var;
|
|
32
75
|
}(declaracao_1.Declaracao));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"var.js","sourceRoot":"","sources":["../../../fontes/declaracoes/var.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"var.js","sourceRoot":"","sources":["../../../fontes/declaracoes/var.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2CAA0C;AAE1C;IAAyB,uBAAU;IAI/B,aAAY,OAAyB,EAAE,aAAwB;QAA/D,YACI,kBAAM,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,SAGpD;QAFG,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,aAAa,GAAG,aAAa,CAAC;;IACvC,CAAC;IAEK,qBAAO,GAAb,UAAc,SAAiC;;;;4BACpC,qBAAM,SAAS,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAA;4BAAhD,sBAAO,SAAyC,EAAC;;;;KACpD;IACL,UAAC;AAAD,CAAC,AAbD,CAAyB,uBAAU,GAalC;AAbY,kBAAG"}
|
package/fontes/delegua.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare class Delegua implements DeleguaInterface {
|
|
|
34
34
|
* @param linha A linha a ser avaliada.
|
|
35
35
|
* @returns O resultado da execução, com os retornos e respectivos erros, se houverem.
|
|
36
36
|
*/
|
|
37
|
-
executarUmaLinha(linha: string): RetornoExecucaoInterface
|
|
37
|
+
executarUmaLinha(linha: string): Promise<RetornoExecucaoInterface>;
|
|
38
38
|
/**
|
|
39
39
|
* Instancia um servidor de depuração, normalmente recebendo requisições na porta 7777.
|
|
40
40
|
*/
|
|
@@ -55,7 +55,7 @@ export declare class Delegua implements DeleguaInterface {
|
|
|
55
55
|
* Execução por arquivo.
|
|
56
56
|
* @param caminhoRelativoArquivo O caminho no sistema operacional do arquivo a ser aberto.
|
|
57
57
|
*/
|
|
58
|
-
carregarArquivo(caminhoRelativoArquivo: string):
|
|
58
|
+
carregarArquivo(caminhoRelativoArquivo: string): Promise<any>;
|
|
59
59
|
/**
|
|
60
60
|
* A execução do código de fato.
|
|
61
61
|
* @param retornoImportador Dados retornados do Importador, como o retorno do Lexador, do Avaliador
|
|
@@ -64,7 +64,7 @@ export declare class Delegua implements DeleguaInterface {
|
|
|
64
64
|
* para LAIR, falso para execução por arquivo.
|
|
65
65
|
* @returns Um objeto com o resultado da execução.
|
|
66
66
|
*/
|
|
67
|
-
executar(retornoImportador: RetornoImportador, manterAmbiente?: boolean): RetornoExecucaoInterface
|
|
67
|
+
executar(retornoImportador: RetornoImportador, manterAmbiente?: boolean): Promise<RetornoExecucaoInterface>;
|
|
68
68
|
reportar(linha: number, onde: any, mensagem: string): void;
|
|
69
69
|
erro(simbolo: SimboloInterface, mensagemDeErro: string): void;
|
|
70
70
|
erroEmTempoDeExecucao(erro: any): void;
|
package/fontes/delegua.js
CHANGED
|
@@ -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
|
};
|
|
@@ -71,7 +107,7 @@ var Delegua = /** @class */ (function () {
|
|
|
71
107
|
this.avaliadorSintatico = new dialetos_1.AvaliadorSintaticoEguaClassico();
|
|
72
108
|
this.importador = new importador_1.Importador(this.lexador, this.avaliadorSintatico, this.arquivosAbertos, this.conteudoArquivosAbertos, depurador);
|
|
73
109
|
this.interpretador = new egua_classico_1.InterpretadorEguaClassico(this, new dialetos_2.ResolvedorEguaClassico(), process.cwd());
|
|
74
|
-
|
|
110
|
+
this.funcaoDeRetorno('Usando dialeto: Égua');
|
|
75
111
|
break;
|
|
76
112
|
case 'eguap':
|
|
77
113
|
this.lexador = new lexador_eguap_1.LexadorEguaP();
|
|
@@ -80,7 +116,7 @@ var Delegua = /** @class */ (function () {
|
|
|
80
116
|
this.interpretador = depurador
|
|
81
117
|
? new interpretador_com_depuracao_1.InterpretadorComDepuracao(this.importador, process.cwd(), funcaoDeRetorno)
|
|
82
118
|
: new interpretador_1.Interpretador(this.importador, process.cwd(), performance, funcaoDeRetorno);
|
|
83
|
-
|
|
119
|
+
this.funcaoDeRetorno('Usando dialeto: ÉguaP');
|
|
84
120
|
break;
|
|
85
121
|
case 'visualg':
|
|
86
122
|
this.lexador = new lexador_visualg_1.LexadorVisuAlg();
|
|
@@ -95,7 +131,7 @@ var Delegua = /** @class */ (function () {
|
|
|
95
131
|
this.interpretador = depurador
|
|
96
132
|
? new interpretador_com_depuracao_1.InterpretadorComDepuracao(this.importador, process.cwd(), funcaoDeRetorno)
|
|
97
133
|
: new interpretador_1.Interpretador(this.importador, process.cwd(), performance, funcaoDeRetorno);
|
|
98
|
-
|
|
134
|
+
this.funcaoDeRetorno('Usando dialeto: padrão');
|
|
99
135
|
break;
|
|
100
136
|
}
|
|
101
137
|
if (depurador) {
|
|
@@ -106,10 +142,10 @@ var Delegua = /** @class */ (function () {
|
|
|
106
142
|
try {
|
|
107
143
|
var manifesto = caminho.resolve('package.json');
|
|
108
144
|
return (JSON.parse(fs.readFileSync(manifesto, { encoding: 'utf8' }))
|
|
109
|
-
.version || '0.
|
|
145
|
+
.version || '0.9');
|
|
110
146
|
}
|
|
111
147
|
catch (error) {
|
|
112
|
-
return '0.
|
|
148
|
+
return '0.9 (desenvolvimento)';
|
|
113
149
|
}
|
|
114
150
|
};
|
|
115
151
|
/**
|
|
@@ -117,22 +153,32 @@ var Delegua = /** @class */ (function () {
|
|
|
117
153
|
* ou seja, esperando como entrada linhas de código fornecidas pelo usuário.
|
|
118
154
|
*/
|
|
119
155
|
Delegua.prototype.iniciarLairDelegua = function () {
|
|
156
|
+
var _this = this;
|
|
120
157
|
console.log("Console da Linguagem Del\u00E9gua v".concat(this.versao()));
|
|
121
158
|
console.log('Pressione Ctrl + C para sair');
|
|
122
|
-
var
|
|
159
|
+
var interfaceLeitura = readline.createInterface({
|
|
123
160
|
input: process.stdin,
|
|
124
161
|
output: process.stdout,
|
|
125
162
|
prompt: '\ndelegua> ',
|
|
126
163
|
});
|
|
127
164
|
var isto = this;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
165
|
+
this.interpretador.interfaceEntradaSaida = interfaceLeitura;
|
|
166
|
+
interfaceLeitura.prompt();
|
|
167
|
+
interfaceLeitura.on('line', function (linha) { return __awaiter(_this, void 0, void 0, function () {
|
|
168
|
+
var resultado;
|
|
169
|
+
return __generator(this, function (_a) {
|
|
170
|
+
switch (_a.label) {
|
|
171
|
+
case 0: return [4 /*yield*/, isto.executarUmaLinha(linha)];
|
|
172
|
+
case 1:
|
|
173
|
+
resultado = (_a.sent()).resultado;
|
|
174
|
+
if (resultado.length) {
|
|
175
|
+
isto.funcaoDeRetorno(resultado[0]);
|
|
176
|
+
}
|
|
177
|
+
interfaceLeitura.prompt();
|
|
178
|
+
return [2 /*return*/];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}); });
|
|
136
182
|
};
|
|
137
183
|
/**
|
|
138
184
|
* Executa uma linha. Usado pelo modo LAIR e pelo servidor de depuração, quando recebe um comando 'avaliar'.
|
|
@@ -140,18 +186,27 @@ var Delegua = /** @class */ (function () {
|
|
|
140
186
|
* @returns O resultado da execução, com os retornos e respectivos erros, se houverem.
|
|
141
187
|
*/
|
|
142
188
|
Delegua.prototype.executarUmaLinha = function (linha) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
189
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
190
|
+
var retornoLexador, retornoAvaliadorSintatico;
|
|
191
|
+
return __generator(this, function (_a) {
|
|
192
|
+
switch (_a.label) {
|
|
193
|
+
case 0:
|
|
194
|
+
retornoLexador = this.lexador.mapear([linha], -1);
|
|
195
|
+
retornoAvaliadorSintatico = this.avaliadorSintatico.analisar(retornoLexador);
|
|
196
|
+
if (this.afericaoErros({
|
|
197
|
+
retornoLexador: retornoLexador,
|
|
198
|
+
retornoAvaliadorSintatico: retornoAvaliadorSintatico,
|
|
199
|
+
})) {
|
|
200
|
+
return [2 /*return*/, { resultado: [] }];
|
|
201
|
+
}
|
|
202
|
+
return [4 /*yield*/, this.executar({
|
|
203
|
+
retornoLexador: retornoLexador,
|
|
204
|
+
retornoAvaliadorSintatico: retornoAvaliadorSintatico,
|
|
205
|
+
}, true)];
|
|
206
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
});
|
|
155
210
|
};
|
|
156
211
|
/**
|
|
157
212
|
* Instancia um servidor de depuração, normalmente recebendo requisições na porta 7777.
|
|
@@ -200,24 +255,35 @@ var Delegua = /** @class */ (function () {
|
|
|
200
255
|
* @param caminhoRelativoArquivo O caminho no sistema operacional do arquivo a ser aberto.
|
|
201
256
|
*/
|
|
202
257
|
Delegua.prototype.carregarArquivo = function (caminhoRelativoArquivo) {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
258
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
259
|
+
var retornoImportador, errosExecucao, erros;
|
|
260
|
+
return __generator(this, function (_a) {
|
|
261
|
+
switch (_a.label) {
|
|
262
|
+
case 0:
|
|
263
|
+
retornoImportador = this.importador.importar(caminhoRelativoArquivo);
|
|
264
|
+
if (this.afericaoErros(retornoImportador)) {
|
|
265
|
+
process.exit(65); // Código para erro de avaliação antes da execução
|
|
266
|
+
}
|
|
267
|
+
errosExecucao = {
|
|
268
|
+
lexador: [],
|
|
269
|
+
avaliadorSintatico: [],
|
|
270
|
+
interpretador: [],
|
|
271
|
+
};
|
|
272
|
+
if (!this.modoDepuracao) return [3 /*break*/, 1];
|
|
273
|
+
this.interpretador.prepararParaDepuracao(retornoImportador.retornoAvaliadorSintatico.declaracoes);
|
|
274
|
+
return [3 /*break*/, 3];
|
|
275
|
+
case 1: return [4 /*yield*/, this.executar(retornoImportador)];
|
|
276
|
+
case 2:
|
|
277
|
+
erros = (_a.sent()).erros;
|
|
278
|
+
errosExecucao = erros;
|
|
279
|
+
_a.label = 3;
|
|
280
|
+
case 3:
|
|
281
|
+
if (errosExecucao.length > 0)
|
|
282
|
+
process.exit(70); // Código com exceções não tratadas
|
|
283
|
+
return [2 /*return*/];
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
});
|
|
221
287
|
};
|
|
222
288
|
/**
|
|
223
289
|
* A execução do código de fato.
|
|
@@ -229,26 +295,35 @@ var Delegua = /** @class */ (function () {
|
|
|
229
295
|
*/
|
|
230
296
|
Delegua.prototype.executar = function (retornoImportador, manterAmbiente) {
|
|
231
297
|
if (manterAmbiente === void 0) { manterAmbiente = false; }
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
298
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
299
|
+
var retornoInterpretador, _i, _a, erroInterpretador, erroEmJavaScript;
|
|
300
|
+
return __generator(this, function (_b) {
|
|
301
|
+
switch (_b.label) {
|
|
302
|
+
case 0: return [4 /*yield*/, this.interpretador.interpretar(retornoImportador.retornoAvaliadorSintatico.declaracoes, manterAmbiente)];
|
|
303
|
+
case 1:
|
|
304
|
+
retornoInterpretador = _b.sent();
|
|
305
|
+
if (retornoInterpretador.erros.length > 0) {
|
|
306
|
+
for (_i = 0, _a = retornoInterpretador.erros; _i < _a.length; _i++) {
|
|
307
|
+
erroInterpretador = _a[_i];
|
|
308
|
+
if (erroInterpretador.simbolo) {
|
|
309
|
+
this.erroEmTempoDeExecucao(erroInterpretador);
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
erroEmJavaScript = erroInterpretador;
|
|
313
|
+
console.error(chalk_1.default.red("Erro em JavaScript: ") +
|
|
314
|
+
"".concat(erroEmJavaScript.message));
|
|
315
|
+
console.error(chalk_1.default.red("Pilha de execu\u00E7\u00E3o: ") +
|
|
316
|
+
"".concat(erroEmJavaScript.stack));
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return [2 /*return*/, {
|
|
321
|
+
erros: retornoInterpretador.erros,
|
|
322
|
+
resultado: retornoInterpretador.resultado,
|
|
323
|
+
}];
|
|
245
324
|
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
return {
|
|
249
|
-
erros: retornoInterpretador.erros,
|
|
250
|
-
resultado: retornoInterpretador.resultado,
|
|
251
|
-
};
|
|
325
|
+
});
|
|
326
|
+
});
|
|
252
327
|
};
|
|
253
328
|
Delegua.prototype.reportar = function (linha, onde, mensagem) {
|
|
254
329
|
// TODO: Voltar isso após revisar pragmas de Lexador.
|
package/fontes/delegua.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegua.js","sourceRoot":"","sources":["../../fontes/delegua.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delegua.js","sourceRoot":"","sources":["../../fontes/delegua.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,4CAAgC;AAChC,iDAAqC;AACrC,gDAA0B;AAE1B,6CAA4C;AAC5C,iFAA+E;AAC/E,+DAA8D;AAC9D,wEAA0D;AAY1D,wEAAmF;AACnF,kFAA+E;AAC/E,kEAAgE;AAChE,sGAAmG;AACnG,2DAAgF;AAChF,yCAAgD;AAGhD,2CAA6D;AAC7D,2FAAwF;AACxF,kDAA+D;AAC/D,sEAAoE;AACpE,0GAAuG;AAEvG;;;;GAIG;AACH;IAcI,iBACI,OAAmB,EACnB,WAAmB,EACnB,SAAiB,EACjB,eAAgC;QAHhC,wBAAA,EAAA,mBAAmB;QACnB,4BAAA,EAAA,mBAAmB;QACnB,0BAAA,EAAA,iBAAiB;QACjB,gCAAA,EAAA,sBAAgC;QAEhC,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,uBAAuB,GAAG,EAAE,CAAC;QAElC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC;QACtD,IAAI,CAAC,aAAa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CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;SACrE;aAAM;YACH,IAAI,CAAC,QAAQ,CACT,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EACrB,eAAQ,OAAO,CAAC,MAAM,MAAG,EACzB,cAAc,CACjB,CAAC;SACL;IACL,CAAC;IAED,uCAAqB,GAArB,UAAsB,IAAS;QAC3B,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;YAC5C,2DAA2D;YAC3D;;;;mBAIO;YACP,OAAO,CAAC,KAAK,CACT,eAAK,CAAC,GAAG,CAAC,wBAAiB,IAAI,CAAC,OAAO,CAAC,KAAK,MAAG,CAAC;gBAC7C,WAAI,IAAI,CAAC,QAAQ,CAAE,CAC1B,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CACT,eAAK,CAAC,GAAG,CAAC,wBAAiB,IAAI,CAAC,KAAK,IAAI,CAAC,MAAG,CAAC;gBAC1C,WAAI,IAAI,CAAC,QAAQ,CAAE,CAC1B,CAAC;SACL;IACL,CAAC;IACL,cAAC;AAAD,CAAC,AA1WD,IA0WC;AA1WY,0BAAO"}
|
|
@@ -11,13 +11,13 @@ export declare class ServidorDepuracao {
|
|
|
11
11
|
interpretador: InterpretadorComDepuracaoInterface;
|
|
12
12
|
constructor(_instanciaDelegua: DeleguaInterface);
|
|
13
13
|
validarPontoParada: (caminhoArquivo: string, linha: number, conexao: net.Socket) => any;
|
|
14
|
-
comandoAdentrarEscopo: (conexao: net.Socket) => any
|
|
14
|
+
comandoAdentrarEscopo: (conexao: net.Socket) => Promise<any>;
|
|
15
15
|
comandoAdicionarPontoParada: (comando: string[], conexao: net.Socket) => any;
|
|
16
|
-
comandoAvaliar: (comando: string[], conexao: net.Socket) => any
|
|
17
|
-
comandoContinuar: (conexao: net.Socket) => any
|
|
16
|
+
comandoAvaliar: (comando: string[], conexao: net.Socket) => Promise<any>;
|
|
17
|
+
comandoContinuar: (conexao: net.Socket) => Promise<any>;
|
|
18
18
|
comandoPilhaExecucao: (conexao: net.Socket) => any;
|
|
19
19
|
comandoPontosParada: (conexao: net.Socket) => any;
|
|
20
|
-
comandoProximo: (conexao: net.Socket) => any
|
|
20
|
+
comandoProximo: (conexao: net.Socket) => Promise<any>;
|
|
21
21
|
comandoRemoverPontoParada: (comando: string[], conexao: net.Socket) => any;
|
|
22
22
|
comandoSairEscopo: (conexao: net.Socket) => any;
|
|
23
23
|
comandoVariaveis: (conexao: net.Socket) => any;
|