@designliquido/delegua-node 1.3.15 → 1.3.17
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 +11 -11
- package/delegua.d.ts +21 -21
- package/delegua.js +74 -74
- package/delegua.js.map +1 -1
- package/depuracao/index.d.ts +1 -1
- package/depuracao/index.js +17 -17
- package/depuracao/servidor-depuracao.d.ts +41 -42
- package/depuracao/servidor-depuracao.d.ts.map +1 -1
- package/depuracao/servidor-depuracao.js +297 -297
- package/depuracao/servidor-depuracao.js.map +1 -1
- package/execucao.d.ts +1 -1
- package/execucao.js +48 -48
- package/execucao.js.map +1 -1
- package/formatadores/index.d.ts +6 -6
- package/formatadores/index.js +57 -57
- package/formatadores/index.js.map +1 -1
- package/importador/importador-javascript.d.ts +15 -15
- package/importador/importador-javascript.js +62 -62
- package/importador/importador-javascript.js.map +1 -1
- package/importador/importador.d.ts +28 -28
- package/importador/importador.js +81 -81
- package/importador/importador.js.map +1 -1
- package/importador/index.d.ts +2 -2
- package/importador/index.js +18 -18
- package/importador/retorno-importador.d.ts +9 -9
- package/importador/retorno-importador.js +2 -2
- package/index.d.ts +3 -3
- package/index.js +19 -19
- package/interfaces/delegua-interface.d.ts +6 -6
- package/interfaces/delegua-interface.js +2 -2
- package/interfaces/importador-interface.d.ts +8 -8
- package/interfaces/importador-interface.js +2 -2
- package/interfaces/index.d.ts +2 -2
- package/interfaces/index.js +18 -18
- package/interfaces/nucleo-execucao-interface.d.ts +12 -12
- package/interfaces/nucleo-execucao-interface.js +2 -2
- package/interpretador/index.d.ts +1 -1
- package/interpretador/index.js +17 -17
- package/interpretador/interpretador-com-depuracao-importacao.d.ts +15 -15
- package/interpretador/interpretador-com-depuracao-importacao.js +76 -76
- package/interpretador/interpretador-com-depuracao-importacao.js.map +1 -1
- package/interpretador/interpretador.d.ts +19 -19
- package/interpretador/interpretador.js +80 -80
- package/interpretador/interpretador.js.map +1 -1
- package/interpretador/mecanismo-importacao-bibliotecas.d.ts +2 -2
- package/interpretador/mecanismo-importacao-bibliotecas.js +131 -132
- package/interpretador/mecanismo-importacao-bibliotecas.js.map +1 -1
- package/lexador/lexador-json.d.ts +20 -20
- package/lexador/lexador-json.js +64 -64
- package/lexador/lexador-json.js.map +1 -1
- package/nucleo-comum.d.ts +12 -12
- package/nucleo-comum.js +48 -48
- package/nucleo-comum.js.map +1 -1
- package/nucleo-execucao.d.ts +72 -72
- package/nucleo-execucao.js +358 -358
- package/nucleo-execucao.js.map +1 -1
- package/nucleo-traducao.d.ts +36 -36
- package/nucleo-traducao.js +127 -127
- package/nucleo-traducao.js.map +1 -1
- package/package.json +11 -11
package/bin/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designliquido/delegua-node",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.16",
|
|
4
4
|
"description": "Linguagem Delégua com capacidades para ecossistema Node.js.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"empacotar": "yarn rimraf ./dist && tsc && yarn copyfiles -V ./bin/delegua ./bin/delegua.cmd ./dist && yarn copyfiles -V ./package.json ./dist/bin && yarn copyfiles -V ./README.md ./dist && yarn copyfiles -V ./LICENSE ./dist",
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"testes:servidor-depuracao": "ts-node ./fontes/depuracao/servidor-depuracao.ts"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@designliquido/birl": "^0.1.
|
|
16
|
-
"@designliquido/delegua": "0.36.
|
|
17
|
-
"@designliquido/mapler": "^0.1.
|
|
18
|
-
"@designliquido/portugol-studio": "^0.4.
|
|
19
|
-
"@designliquido/potigol": "^0.1.
|
|
20
|
-
"@designliquido/visualg": "^0.3.
|
|
15
|
+
"@designliquido/birl": "^0.1.7",
|
|
16
|
+
"@designliquido/delegua": "^0.36.2",
|
|
17
|
+
"@designliquido/mapler": "^0.1.8",
|
|
18
|
+
"@designliquido/portugol-studio": "^0.4.3",
|
|
19
|
+
"@designliquido/potigol": "^0.1.9",
|
|
20
|
+
"@designliquido/visualg": "^0.3.5",
|
|
21
21
|
"chalk": "4.1.2",
|
|
22
22
|
"commander": "^9.4.1",
|
|
23
23
|
"json-colorizer": "^2.2.2"
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"@designliquido/delegua-matematica": "^0.2.0",
|
|
31
31
|
"@designliquido/delegua-tempo": "^0.0.2",
|
|
32
32
|
"@types/estree": "^1.0.5",
|
|
33
|
-
"@types/jest": "^29.
|
|
34
|
-
"@types/node": "^
|
|
33
|
+
"@types/jest": "^29.5.13",
|
|
34
|
+
"@types/node": "^22.7.6",
|
|
35
35
|
"copyfiles": "^2.4.1",
|
|
36
|
-
"jest": "^29.
|
|
36
|
+
"jest": "^29.7.0",
|
|
37
37
|
"release-it": "^15.6.0",
|
|
38
38
|
"rimraf": "^4.1.2",
|
|
39
39
|
"ts-jest": "^29.0.5",
|
|
40
40
|
"ts-node": "^10.9.2",
|
|
41
41
|
"tsconfig-paths": "^4.2.0",
|
|
42
|
-
"typescript": "^
|
|
42
|
+
"typescript": "^5.6.3"
|
|
43
43
|
}
|
|
44
44
|
}
|
package/delegua.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { AvaliadorSintaticoInterface, LexadorInterface } from '@designliquido/delegua/interfaces';
|
|
2
|
-
import { DeleguaInterface, ImportadorInterface } from './interfaces';
|
|
3
|
-
/**
|
|
4
|
-
* O núcleo da linguagem.
|
|
5
|
-
*
|
|
6
|
-
* Responsável por avaliar a entrada fornecida, chamar o núcleo
|
|
7
|
-
* correspondente à operação solicitada e observar a execução.
|
|
8
|
-
*/
|
|
9
|
-
export declare class Delegua implements DeleguaInterface {
|
|
10
|
-
lexador: LexadorInterface<any> | undefined;
|
|
11
|
-
avaliadorSintatico: AvaliadorSintaticoInterface<any, any> | undefined;
|
|
12
|
-
importador: ImportadorInterface<any, any> | undefined;
|
|
13
|
-
funcaoDeRetorno: Function;
|
|
14
|
-
funcaoDeRetornoMesmaLinha: Function;
|
|
15
|
-
constructor(funcaoDeRetorno?: Function, funcaoDeRetornoMesmaLinha?: Function);
|
|
16
|
-
versao(): string;
|
|
17
|
-
executarCodigoComoArgumento(codigo: string, dialeto?: string, performance?: boolean): Promise<void>;
|
|
18
|
-
executarCodigoPorArquivo(caminhoRelativoArquivo: string, dialeto?: string, performance?: boolean): Promise<any>;
|
|
19
|
-
iniciarLair(dialeto?: string): Promise<void>;
|
|
20
|
-
traduzirArquivo(caminhoRelativoArquivo: string, comandoTraducao: string, gerarArquivoSaida?: boolean): void;
|
|
21
|
-
}
|
|
1
|
+
import { AvaliadorSintaticoInterface, LexadorInterface } from '@designliquido/delegua/interfaces';
|
|
2
|
+
import { DeleguaInterface, ImportadorInterface } from './interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* O núcleo da linguagem.
|
|
5
|
+
*
|
|
6
|
+
* Responsável por avaliar a entrada fornecida, chamar o núcleo
|
|
7
|
+
* correspondente à operação solicitada e observar a execução.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Delegua implements DeleguaInterface {
|
|
10
|
+
lexador: LexadorInterface<any> | undefined;
|
|
11
|
+
avaliadorSintatico: AvaliadorSintaticoInterface<any, any> | undefined;
|
|
12
|
+
importador: ImportadorInterface<any, any> | undefined;
|
|
13
|
+
funcaoDeRetorno: Function;
|
|
14
|
+
funcaoDeRetornoMesmaLinha: Function;
|
|
15
|
+
constructor(funcaoDeRetorno?: Function, funcaoDeRetornoMesmaLinha?: Function);
|
|
16
|
+
versao(): string;
|
|
17
|
+
executarCodigoComoArgumento(codigo: string, dialeto?: string, performance?: boolean): Promise<void>;
|
|
18
|
+
executarCodigoPorArquivo(caminhoRelativoArquivo: string, dialeto?: string, performance?: boolean): Promise<any>;
|
|
19
|
+
iniciarLair(dialeto?: string): Promise<void>;
|
|
20
|
+
traduzirArquivo(caminhoRelativoArquivo: string, comandoTraducao: string, gerarArquivoSaida?: boolean): void;
|
|
21
|
+
}
|
|
22
22
|
//# sourceMappingURL=delegua.d.ts.map
|
package/delegua.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Delegua = void 0;
|
|
27
|
-
const sistemaArquivos = __importStar(require("fs"));
|
|
28
|
-
const caminho = __importStar(require("path"));
|
|
29
|
-
const nucleo_execucao_1 = require("./nucleo-execucao");
|
|
30
|
-
const nucleo_traducao_1 = require("./nucleo-traducao");
|
|
31
|
-
/**
|
|
32
|
-
* O núcleo da linguagem.
|
|
33
|
-
*
|
|
34
|
-
* Responsável por avaliar a entrada fornecida, chamar o núcleo
|
|
35
|
-
* correspondente à operação solicitada e observar a execução.
|
|
36
|
-
*/
|
|
37
|
-
class Delegua {
|
|
38
|
-
constructor(funcaoDeRetorno, funcaoDeRetornoMesmaLinha) {
|
|
39
|
-
this.funcaoDeRetorno = funcaoDeRetorno || console.log;
|
|
40
|
-
// `process.stdout.write.bind(process.stdout)` é necessário por causa de
|
|
41
|
-
// https://stackoverflow.com/questions/28874665/node-js-cannot-read-property-defaultencoding-of-undefined
|
|
42
|
-
this.funcaoDeRetornoMesmaLinha = funcaoDeRetornoMesmaLinha || process.stdout.write.bind(process.stdout);
|
|
43
|
-
}
|
|
44
|
-
versao() {
|
|
45
|
-
try {
|
|
46
|
-
const manifesto = caminho.resolve(process.cwd(), 'package.json');
|
|
47
|
-
return JSON.parse(sistemaArquivos.readFileSync(manifesto, { encoding: 'utf8' })).version || '0.33';
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
return '0.35 (desenvolvimento)';
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
async executarCodigoComoArgumento(codigo, dialeto = 'delegua', performance = false) {
|
|
54
|
-
const nucleoExecucao = new nucleo_execucao_1.NucleoExecucao(this.versao(), this.funcaoDeRetorno, this.funcaoDeRetornoMesmaLinha);
|
|
55
|
-
nucleoExecucao.configurarDialeto(dialeto, performance);
|
|
56
|
-
return await nucleoExecucao.executarCodigoComoArgumento(codigo);
|
|
57
|
-
}
|
|
58
|
-
async executarCodigoPorArquivo(caminhoRelativoArquivo, dialeto = 'delegua', performance = false) {
|
|
59
|
-
const nucleoExecucao = new nucleo_execucao_1.NucleoExecucao(this.versao(), this.funcaoDeRetorno, this.funcaoDeRetornoMesmaLinha);
|
|
60
|
-
nucleoExecucao.configurarDialeto(dialeto, performance);
|
|
61
|
-
return await nucleoExecucao.carregarEExecutarArquivo(caminhoRelativoArquivo);
|
|
62
|
-
}
|
|
63
|
-
async iniciarLair(dialeto = 'delegua') {
|
|
64
|
-
const nucleoExecucao = new nucleo_execucao_1.NucleoExecucao(this.versao(), this.funcaoDeRetorno, this.funcaoDeRetornoMesmaLinha);
|
|
65
|
-
nucleoExecucao.configurarDialeto(dialeto, false);
|
|
66
|
-
return await nucleoExecucao.iniciarLairDelegua();
|
|
67
|
-
}
|
|
68
|
-
traduzirArquivo(caminhoRelativoArquivo, comandoTraducao, gerarArquivoSaida = false) {
|
|
69
|
-
const nucleoTraducao = new nucleo_traducao_1.NucleoTraducao(this.funcaoDeRetorno, this.funcaoDeRetornoMesmaLinha);
|
|
70
|
-
nucleoTraducao.iniciarTradutor(comandoTraducao);
|
|
71
|
-
nucleoTraducao.traduzirArquivo(caminhoRelativoArquivo, gerarArquivoSaida);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
exports.Delegua = Delegua;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Delegua = void 0;
|
|
27
|
+
const sistemaArquivos = __importStar(require("fs"));
|
|
28
|
+
const caminho = __importStar(require("path"));
|
|
29
|
+
const nucleo_execucao_1 = require("./nucleo-execucao");
|
|
30
|
+
const nucleo_traducao_1 = require("./nucleo-traducao");
|
|
31
|
+
/**
|
|
32
|
+
* O núcleo da linguagem.
|
|
33
|
+
*
|
|
34
|
+
* Responsável por avaliar a entrada fornecida, chamar o núcleo
|
|
35
|
+
* correspondente à operação solicitada e observar a execução.
|
|
36
|
+
*/
|
|
37
|
+
class Delegua {
|
|
38
|
+
constructor(funcaoDeRetorno, funcaoDeRetornoMesmaLinha) {
|
|
39
|
+
this.funcaoDeRetorno = funcaoDeRetorno || console.log;
|
|
40
|
+
// `process.stdout.write.bind(process.stdout)` é necessário por causa de
|
|
41
|
+
// https://stackoverflow.com/questions/28874665/node-js-cannot-read-property-defaultencoding-of-undefined
|
|
42
|
+
this.funcaoDeRetornoMesmaLinha = funcaoDeRetornoMesmaLinha || process.stdout.write.bind(process.stdout);
|
|
43
|
+
}
|
|
44
|
+
versao() {
|
|
45
|
+
try {
|
|
46
|
+
const manifesto = caminho.resolve(process.cwd(), 'package.json');
|
|
47
|
+
return JSON.parse(sistemaArquivos.readFileSync(manifesto, { encoding: 'utf8' })).version || '0.33';
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
return '0.35 (desenvolvimento)';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async executarCodigoComoArgumento(codigo, dialeto = 'delegua', performance = false) {
|
|
54
|
+
const nucleoExecucao = new nucleo_execucao_1.NucleoExecucao(this.versao(), this.funcaoDeRetorno, this.funcaoDeRetornoMesmaLinha);
|
|
55
|
+
nucleoExecucao.configurarDialeto(dialeto, performance);
|
|
56
|
+
return await nucleoExecucao.executarCodigoComoArgumento(codigo);
|
|
57
|
+
}
|
|
58
|
+
async executarCodigoPorArquivo(caminhoRelativoArquivo, dialeto = 'delegua', performance = false) {
|
|
59
|
+
const nucleoExecucao = new nucleo_execucao_1.NucleoExecucao(this.versao(), this.funcaoDeRetorno, this.funcaoDeRetornoMesmaLinha);
|
|
60
|
+
nucleoExecucao.configurarDialeto(dialeto, performance);
|
|
61
|
+
return await nucleoExecucao.carregarEExecutarArquivo(caminhoRelativoArquivo);
|
|
62
|
+
}
|
|
63
|
+
async iniciarLair(dialeto = 'delegua') {
|
|
64
|
+
const nucleoExecucao = new nucleo_execucao_1.NucleoExecucao(this.versao(), this.funcaoDeRetorno, this.funcaoDeRetornoMesmaLinha);
|
|
65
|
+
nucleoExecucao.configurarDialeto(dialeto, false);
|
|
66
|
+
return await nucleoExecucao.iniciarLairDelegua();
|
|
67
|
+
}
|
|
68
|
+
traduzirArquivo(caminhoRelativoArquivo, comandoTraducao, gerarArquivoSaida = false) {
|
|
69
|
+
const nucleoTraducao = new nucleo_traducao_1.NucleoTraducao(this.funcaoDeRetorno, this.funcaoDeRetornoMesmaLinha);
|
|
70
|
+
nucleoTraducao.iniciarTradutor(comandoTraducao);
|
|
71
|
+
nucleoTraducao.traduzirArquivo(caminhoRelativoArquivo, gerarArquivoSaida);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.Delegua = Delegua;
|
|
75
75
|
//# sourceMappingURL=delegua.js.map
|
package/delegua.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegua.js","sourceRoot":"","sources":["../fontes/delegua.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AACtC,8CAAgC;AAQhC,uDAAmD;AACnD,uDAAmD;AAEnD;;;;;GAKG;AACH,MAAa,OAAO;IAQhB,YACI,eAA0B,EAC1B,yBAAoC;Q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depuracao';
|
|
1
|
+
export * from './servidor-depuracao';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/depuracao/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./servidor-depuracao"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./servidor-depuracao"), exports);
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,43 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
1
|
+
import * as net from 'net';
|
|
2
|
+
import { InterpretadorComDepuracaoInterface } from '@designliquido/delegua/interfaces';
|
|
3
|
+
import { NucleoExecucaoInterface } from '../interfaces/nucleo-execucao-interface';
|
|
4
|
+
/**
|
|
5
|
+
* Esta foi a primeira implementacão do mecanismo de depuração, usando comunicação por _sockets_.
|
|
6
|
+
* Inicialmente uma integração foi implementada na extensão do VSCode, mas o protocolo de
|
|
7
|
+
* comunicação nunca foi exatamente maturado, em favor de uma implementação na extensão
|
|
8
|
+
* usando a linguagem diretamente.
|
|
9
|
+
*
|
|
10
|
+
* Mecanismo poderá ser maturado num futuro próximo. Para mais detalhes, ler `README.md`.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ServidorDepuracao {
|
|
13
|
+
instanciaNucleoExecucao: NucleoExecucaoInterface;
|
|
14
|
+
servidor: net.Server;
|
|
15
|
+
conexoes: {
|
|
16
|
+
[chave: number]: any;
|
|
17
|
+
};
|
|
18
|
+
contadorConexoes: number;
|
|
19
|
+
interpretador: InterpretadorComDepuracaoInterface;
|
|
20
|
+
constructor(instanciaNucleoExecucao: NucleoExecucaoInterface);
|
|
21
|
+
validarPontoParada: (caminhoArquivo: string, linha: number, conexao: net.Socket) => any;
|
|
22
|
+
comandoAdentrarEscopo: (conexao: net.Socket) => Promise<any>;
|
|
23
|
+
comandoAdicionarPontoParada: (comando: string[], conexao: net.Socket) => any;
|
|
24
|
+
comandoAvaliar: (comando: string[], conexao: net.Socket) => Promise<any>;
|
|
25
|
+
comandoAvaliarVariavel: (comando: string[], conexao: net.Socket) => Promise<any>;
|
|
26
|
+
comandoContinuar: (conexao: net.Socket) => Promise<any>;
|
|
27
|
+
comandoPilhaExecucao: (conexao: net.Socket) => any;
|
|
28
|
+
comandoPontosParada: (conexao: net.Socket) => any;
|
|
29
|
+
comandoProximo: (conexao: net.Socket) => Promise<any>;
|
|
30
|
+
comandoRemoverPontoParada: (comando: string[], conexao: net.Socket) => any;
|
|
31
|
+
comandoSairEscopo: (conexao: net.Socket) => Promise<any>;
|
|
32
|
+
comandoVariaveis: (conexao: net.Socket) => any;
|
|
33
|
+
/**
|
|
34
|
+
* Função que descreve como conexão com clientes de depuração deve ser operada.
|
|
35
|
+
* @param conexao Instância de conexão, tipo net.Socket.
|
|
36
|
+
*/
|
|
37
|
+
operarConexao: (conexao: net.Socket) => void;
|
|
38
|
+
iniciarServidorDepuracao(): net.AddressInfo;
|
|
39
|
+
escreverSaidaParaTodosClientes(mensagem: string): void;
|
|
40
|
+
finalizarServidorDepuracao(): void;
|
|
41
|
+
}
|
|
43
42
|
//# sourceMappingURL=servidor-depuracao.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"servidor-depuracao.d.ts","sourceRoot":"","sources":["../../fontes/depuracao/servidor-depu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