@designliquido/delegua 0.12.0 → 0.12.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designliquido/delegua",
3
- "version": "0.11.14",
3
+ "version": "0.12.0",
4
4
  "description": "Linguagem de programação simples e moderna usando português estruturado, com suporte a múltiplos dialetos",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/execucao.js CHANGED
@@ -4,7 +4,7 @@ const delegua_1 = require("./fontes/delegua");
4
4
  const commander_1 = require("commander");
5
5
  const principal = () => {
6
6
  const analisadorArgumentos = new commander_1.Command();
7
- let nomeArquivo;
7
+ let codigoOuNomeArquivo;
8
8
  analisadorArgumentos
9
9
  .option('-c, --codigo <codigo>', 'Código a ser avaliado.', '')
10
10
  .option('-d, --dialeto <dialeto>', 'Dialeto a ser usado. Padrão: delegua.', 'delegua')
@@ -13,28 +13,28 @@ const principal = () => {
13
13
  .option('-s, --saida', 'Gera arquivo de saida ao traduzir arquivo.', false)
14
14
  .option('-t, --traduzir <linguagem>', 'Traduz o código do arquivo passado como parâmetro.')
15
15
  .argument('[arquivos...]', 'Nomes dos arquivos (opcional)')
16
- .action((arquivos) => {
17
- if (arquivos.length > 0) {
18
- nomeArquivo = arquivos[0];
16
+ .action((argumentos) => {
17
+ if (argumentos.length > 0) {
18
+ codigoOuNomeArquivo = argumentos[0];
19
19
  }
20
20
  });
21
21
  analisadorArgumentos.parse();
22
22
  const opcoes = analisadorArgumentos.opts();
23
- const delegua = new delegua_1.Delegua(opcoes.dialeto, opcoes.performance, nomeArquivo ? opcoes.depurador : false, opcoes.traduzir);
24
- if (!nomeArquivo) {
25
- if (opcoes.codigo) {
26
- delegua.executarCodigoComoArgumento(opcoes.codigo);
27
- }
28
- else {
29
- delegua.iniciarLairDelegua();
30
- }
23
+ const delegua = new delegua_1.Delegua(opcoes.dialeto, opcoes.performance, codigoOuNomeArquivo ? opcoes.depurador : false, opcoes.traduzir);
24
+ if (opcoes.codigo) {
25
+ delegua.executarCodigoComoArgumento(opcoes.codigo || codigoOuNomeArquivo);
31
26
  }
32
27
  else {
33
- if (opcoes.traduzir) {
34
- delegua.traduzirArquivo(nomeArquivo, opcoes.saida);
28
+ if (codigoOuNomeArquivo) {
29
+ if (opcoes.traduzir) {
30
+ delegua.traduzirArquivo(codigoOuNomeArquivo, opcoes.saida);
31
+ }
32
+ else {
33
+ delegua.carregarArquivo(codigoOuNomeArquivo);
34
+ }
35
35
  }
36
36
  else {
37
- delegua.carregarArquivo(nomeArquivo);
37
+ delegua.iniciarLairDelegua();
38
38
  }
39
39
  }
40
40
  };
package/execucao.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"execucao.js","sourceRoot":"","sources":["../execucao.ts"],"names":[],"mappings":";;AAAA,8CAA2C;AAC3C,yCAAoC;AAEpC,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,oBAAoB,GAAG,IAAI,mBAAO,EAAE,CAAC;IAC3C,IAAI,WAAmB,CAAC;IAExB,oBAAoB;SACf,MAAM,CACH,uBAAuB,EACvB,wBAAwB,EACxB,EAAE,CACL;SACA,MAAM,CACH,yBAAyB,EACzB,uCAAuC,EACvC,SAAS,CACZ;SACA,MAAM,CACH,iBAAiB,EACjB,4GAA4G,EAC5G,KAAK,CACR;SACA,MAAM,CACH,mBAAmB,EACnB,iEAAiE,EACjE,KAAK,CACR;SACA,MAAM,CACH,aAAa,EACb,4CAA4C,EAC5C,KAAK,CACR;SACA,MAAM,CACH,4BAA4B,EAC5B,oDAAoD,CACvD;SACA,QAAQ,CAAC,eAAe,EAAE,+BAA+B,CAAC;SAC1D,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE;QACjB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACrB,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;SAC7B;IACL,CAAC,CAAC,CAAC;IA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,EAC5B,oDAAoD,CACvD;SACA,QAAQ,CAAC,eAAe,EAAE,+BAA+B,CAAC;SAC1D,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE;QACnB,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,mBAAmB,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;SACvC;IACL,CAAC,CAAC,CAAC;IAEP,oBAAoB,CAAC,KAAK,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,EAAE,CAAC;IAE3C,MAAM,OAAO,GAAG,IAAI,iBAAO,CACvB,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,WAAW,EAClB,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EAC9C,MAAM,CAAC,QAAQ,CAClB,CAAC;IAEF,IAAI,MAAM,CAAC,MAAM,EAAE;QACf,OAAO,CAAC,2BAA2B,CAAC,MAAM,CAAC,MAAM,IAAI,mBAAmB,CAAC,CAAC;KAC7E;SAAM;QACH,IAAI,mBAAmB,EAAE;YACrB,IAAI,MAAM,CAAC,QAAQ,EAAE;gBACjB,OAAO,CAAC,eAAe,CAAC,mBAAmB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;aAC9D;iBAAM;gBACH,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;aAChD;SACJ;aAAM;YACH,OAAO,CAAC,kBAAkB,EAAE,CAAC;SAChC;KACJ;AACL,CAAC,CAAC;AAEF,SAAS,EAAE,CAAC"}
package/fontes/delegua.js CHANGED
@@ -130,10 +130,10 @@ class Delegua {
130
130
  versao() {
131
131
  try {
132
132
  const manifesto = caminho.resolve(__dirname, 'package.json');
133
- return JSON.parse(fs.readFileSync(manifesto, { encoding: 'utf8' })).version || '0.11';
133
+ return JSON.parse(fs.readFileSync(manifesto, { encoding: 'utf8' })).version || '0.12';
134
134
  }
135
135
  catch (error) {
136
- return '0.11 (desenvolvimento)';
136
+ return '0.12 (desenvolvimento)';
137
137
  }
138
138
  }
139
139
  /**
@@ -1,3 +1,3 @@
1
- export * from './cyrb53';
1
+ export { default as cyrb53 } from './cyrb53';
2
2
  export * from './ponto-parada';
3
3
  export * from './servidor-depuracao';
@@ -13,8 +13,13 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
13
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
16
19
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./cyrb53"), exports);
20
+ exports.cyrb53 = void 0;
21
+ var cyrb53_1 = require("./cyrb53");
22
+ Object.defineProperty(exports, "cyrb53", { enumerable: true, get: function () { return __importDefault(cyrb53_1).default; } });
18
23
  __exportStar(require("./ponto-parada"), exports);
19
24
  __exportStar(require("./servidor-depuracao"), exports);
20
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fontes/depuracao/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,iDAA+B;AAC/B,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fontes/depuracao/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,mCAA6C;AAApC,iHAAA,OAAO,OAAU;AAC1B,iDAA+B;AAC/B,uDAAqC"}
@@ -1,3 +1,4 @@
1
1
  export * from './erro-interpretador';
2
2
  export * from './interpretador';
3
+ export * from './interpretador-com-depuracao';
3
4
  export * from '../interfaces/retornos/retorno-interpretador';
@@ -16,5 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./erro-interpretador"), exports);
18
18
  __exportStar(require("./interpretador"), exports);
19
+ __exportStar(require("./interpretador-com-depuracao"), exports);
19
20
  __exportStar(require("../interfaces/retornos/retorno-interpretador"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fontes/interpretador/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,kDAAgC;AAChC,+EAA6D"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fontes/interpretador/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,kDAAgC;AAChC,gEAA8C;AAC9C,+EAA6D"}
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './fontes/delegua';
2
2
  export * from './fontes/avaliador-sintatico';
3
+ export { PontoParada, cyrb53 } from './fontes/depuracao';
3
4
  export * from './fontes/formatadores';
4
5
  export * from './fontes/importador';
5
6
  export * from './fontes/interpretador';
package/index.js CHANGED
@@ -14,8 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.cyrb53 = void 0;
17
18
  __exportStar(require("./fontes/delegua"), exports);
18
19
  __exportStar(require("./fontes/avaliador-sintatico"), exports);
20
+ var depuracao_1 = require("./fontes/depuracao");
21
+ Object.defineProperty(exports, "cyrb53", { enumerable: true, get: function () { return depuracao_1.cyrb53; } });
19
22
  __exportStar(require("./fontes/formatadores"), exports);
20
23
  __exportStar(require("./fontes/importador"), exports);
21
24
  __exportStar(require("./fontes/interpretador"), exports);
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AAEjC,+DAA6C;AAC7C,wDAAsC;AACtC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AAEjC,+DAA6C;AAC7C,gDAAyD;AAAnC,mGAAA,MAAM,OAAA;AAC5B,wDAAsC;AACtC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designliquido/delegua",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "Linguagem de programação simples e moderna usando português estruturado, com suporte a múltiplos dialetos",
5
5
  "main": "index.js",
6
6
  "scripts": {