@designliquido/delegua 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/package.json +1 -1
- package/fontes/avaliador-sintatico/avaliador-sintatico.d.ts +1 -0
- package/fontes/avaliador-sintatico/avaliador-sintatico.js +40 -29
- package/fontes/avaliador-sintatico/avaliador-sintatico.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.js +2 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.d.ts +1 -0
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.js +31 -22
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.js.map +1 -1
- package/fontes/bibliotecas/biblioteca-global.js +4 -4
- package/fontes/bibliotecas/biblioteca-global.js.map +1 -1
- package/fontes/construtos/acesso-metodo.d.ts +2 -2
- package/fontes/construtos/acesso-metodo.js.map +1 -1
- package/fontes/construtos/agrupamento.d.ts +2 -2
- package/fontes/construtos/agrupamento.js.map +1 -1
- package/fontes/construtos/atribuir.d.ts +2 -2
- package/fontes/construtos/atribuir.js.map +1 -1
- package/fontes/construtos/binario.d.ts +2 -2
- package/fontes/construtos/binario.js.map +1 -1
- package/fontes/construtos/chamada.d.ts +2 -2
- package/fontes/construtos/chamada.js.map +1 -1
- package/fontes/construtos/literal.d.ts +2 -2
- package/fontes/construtos/literal.js.map +1 -1
- package/fontes/construtos/variavel.d.ts +2 -2
- package/fontes/construtos/variavel.js.map +1 -1
- package/fontes/declaracoes/bloco.d.ts +2 -2
- package/fontes/declaracoes/bloco.js.map +1 -1
- package/fontes/declaracoes/escreva.d.ts +4 -4
- package/fontes/declaracoes/escreva.js +3 -3
- package/fontes/declaracoes/escreva.js.map +1 -1
- package/fontes/declaracoes/expressao.d.ts +2 -2
- package/fontes/declaracoes/expressao.js.map +1 -1
- package/fontes/declaracoes/funcao.d.ts +2 -2
- package/fontes/declaracoes/funcao.js.map +1 -1
- package/fontes/declaracoes/retorna.d.ts +2 -2
- package/fontes/declaracoes/retorna.js.map +1 -1
- package/fontes/declaracoes/se.d.ts +2 -2
- package/fontes/declaracoes/se.js.map +1 -1
- package/fontes/declaracoes/sustar.d.ts +2 -2
- package/fontes/declaracoes/sustar.js.map +1 -1
- package/fontes/declaracoes/tente.d.ts +2 -2
- package/fontes/declaracoes/tente.js.map +1 -1
- package/fontes/declaracoes/var.d.ts +2 -2
- package/fontes/declaracoes/var.js.map +1 -1
- package/fontes/delegua.d.ts +0 -2
- package/fontes/delegua.js +6 -10
- package/fontes/delegua.js.map +1 -1
- package/fontes/importador/importador.js +5 -1
- package/fontes/importador/importador.js.map +1 -1
- package/fontes/interfaces/delegua-interface.d.ts +1 -2
- package/fontes/interfaces/interpretador-interface.d.ts +1 -2
- package/fontes/interfaces/pilha-escopos-execucao-interface.d.ts +1 -0
- package/fontes/interpretador/dialetos/egua-classico.d.ts +3 -2
- package/fontes/interpretador/dialetos/egua-classico.js +4 -3
- package/fontes/interpretador/dialetos/egua-classico.js.map +1 -1
- package/fontes/interpretador/interpretador-com-depuracao.d.ts +2 -2
- package/fontes/interpretador/interpretador-com-depuracao.js +2 -2
- package/fontes/interpretador/interpretador-com-depuracao.js.map +1 -1
- package/fontes/interpretador/interpretador.d.ts +2 -5
- package/fontes/interpretador/interpretador.js +10 -12
- package/fontes/interpretador/interpretador.js.map +1 -1
- package/fontes/interpretador/pilha-escopos-execucao.d.ts +1 -0
- package/fontes/interpretador/pilha-escopos-execucao.js +11 -1
- package/fontes/interpretador/pilha-escopos-execucao.js.map +1 -1
- package/fontes/lexador/lexador.d.ts +1 -1
- package/fontes/lexador/lexador.js +1 -4
- package/fontes/lexador/lexador.js.map +1 -1
- package/fontes/resolvedor/index.d.ts +0 -1
- package/fontes/resolvedor/index.js +0 -1
- package/fontes/resolvedor/index.js.map +1 -1
- package/package.json +1 -1
- package/testes/egua-classico/resolvedor.test.js +18 -19
- package/testes/egua-classico/resolvedor.test.js.map +1 -1
- package/fontes/resolvedor/resolvedor.d.ts +0 -64
- package/fontes/resolvedor/resolvedor.js +0 -345
- package/fontes/resolvedor/resolvedor.js.map +0 -1
- package/testes/eguap/resolvedor.test.d.ts +0 -1
- package/testes/eguap/resolvedor.test.js +0 -38
- package/testes/eguap/resolvedor.test.js.map +0 -1
- package/testes/resolvedor.test.d.ts +0 -1
- package/testes/resolvedor.test.js +0 -35
- package/testes/resolvedor.test.js.map +0 -1
|
@@ -19,11 +19,11 @@ function default_1(interpretador, pilhaEscoposExecucao) {
|
|
|
19
19
|
return Math.floor(Math.random() * (maximo - minimo)) + minimo;
|
|
20
20
|
}));
|
|
21
21
|
pilhaEscoposExecucao.definirVariavel("inteiro", new funcao_padrao_1.FuncaoPadrao(1, function (valor) {
|
|
22
|
-
if (
|
|
23
|
-
throw new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, "Somente números podem
|
|
22
|
+
if (isNaN(valor)) {
|
|
23
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, "Valor não parece ser um número. Somente números ou textos com números podem ser convertidos para inteiro.");
|
|
24
24
|
}
|
|
25
|
-
if (
|
|
26
|
-
throw new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, "Somente números podem
|
|
25
|
+
if (!/^(-)?\d+(\.\d+)?$/.test(valor)) {
|
|
26
|
+
throw new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, "Valor não parece estar estruturado como um número (texto vazio, falso ou não definido). Somente números ou textos com números podem ser convertidos para inteiro.");
|
|
27
27
|
}
|
|
28
28
|
return parseInt(valor);
|
|
29
29
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"biblioteca-global.js","sourceRoot":"","sources":["../../../fontes/bibliotecas/biblioteca-global.ts"],"names":[],"mappings":";;AAAA,wCAAoD;AACpD,+CAAq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CAAC;IACtB,CAAC,CAAC,CACL,CAAC;IAEF,OAAO,oBAAoB,CAAC;AAChC,CAAC;AAjKD,4BAiKC;AAAA,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InterpretadorInterface,
|
|
1
|
+
import { InterpretadorInterface, SimboloInterface } from "../interfaces";
|
|
2
2
|
import { Construto } from "./construto";
|
|
3
3
|
/**
|
|
4
4
|
* Chamado de `Get` em Égua Clássico, é o construto de acesso a métodos ou membros de
|
|
@@ -10,5 +10,5 @@ export declare class AcessoMetodo implements Construto {
|
|
|
10
10
|
objeto: Construto;
|
|
11
11
|
simbolo: SimboloInterface;
|
|
12
12
|
constructor(hashArquivo: number, objeto: Construto, simbolo: SimboloInterface);
|
|
13
|
-
aceitar(visitante: InterpretadorInterface
|
|
13
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acesso-metodo.js","sourceRoot":"","sources":["../../../fontes/construtos/acesso-metodo.ts"],"names":[],"mappings":";;;AAGA;;;GAGG;AACH;IAOI,sBAAY,WAAmB,EAAE,MAAiB,EAAE,OAAyB;QACzE,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,8BAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"acesso-metodo.js","sourceRoot":"","sources":["../../../fontes/construtos/acesso-metodo.ts"],"names":[],"mappings":";;;AAGA;;;GAGG;AACH;IAOI,sBAAY,WAAmB,EAAE,MAAiB,EAAE,OAAyB;QACzE,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,8BAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;IACxD,CAAC;IACL,mBAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,oCAAY"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InterpretadorInterface
|
|
1
|
+
import { InterpretadorInterface } from "../interfaces";
|
|
2
2
|
import { Construto } from "./construto";
|
|
3
3
|
/**
|
|
4
4
|
* Um agrupamento é essencialmente uma expressão qualquer dentro de parênteses.
|
|
@@ -10,5 +10,5 @@ export declare class Agrupamento implements Construto {
|
|
|
10
10
|
hashArquivo?: number;
|
|
11
11
|
expressao: Construto;
|
|
12
12
|
constructor(hashArquivo: number, linha: number, expressao: Construto);
|
|
13
|
-
aceitar(visitante: InterpretadorInterface
|
|
13
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agrupamento.js","sourceRoot":"","sources":["../../../fontes/construtos/agrupamento.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH;IAMI,qBAAY,WAAmB,EAAE,KAAa,EAAE,SAAoB;QAChE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,6BAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"agrupamento.js","sourceRoot":"","sources":["../../../fontes/construtos/agrupamento.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH;IAMI,qBAAY,WAAmB,EAAE,KAAa,EAAE,SAAoB;QAChE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,6BAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;IACL,kBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,kCAAW"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InterpretadorInterface,
|
|
1
|
+
import { InterpretadorInterface, SimboloInterface } from "../interfaces";
|
|
2
2
|
import { Construto } from "./construto";
|
|
3
3
|
export declare class Atribuir implements Construto {
|
|
4
4
|
linha: number;
|
|
@@ -6,5 +6,5 @@ export declare class Atribuir implements Construto {
|
|
|
6
6
|
simbolo: SimboloInterface;
|
|
7
7
|
valor: any;
|
|
8
8
|
constructor(hashArquivo: number, simbolo: SimboloInterface, valor: any);
|
|
9
|
-
aceitar(visitante:
|
|
9
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atribuir.js","sourceRoot":"","sources":["../../../fontes/construtos/atribuir.ts"],"names":[],"mappings":";;;AAIA;IAOI,kBAAY,WAAmB,EAAE,OAAyB,EAAE,KAAU;QAClE,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,0BAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"atribuir.js","sourceRoot":"","sources":["../../../fontes/construtos/atribuir.ts"],"names":[],"mappings":";;;AAIA;IAOI,kBAAY,WAAmB,EAAE,OAAyB,EAAE,KAAU;QAClE,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,0BAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;IACxD,CAAC;IACL,eAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,4BAAQ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InterpretadorInterface
|
|
1
|
+
import { InterpretadorInterface } from "../interfaces";
|
|
2
2
|
import { Construto } from "./construto";
|
|
3
3
|
/**
|
|
4
4
|
* Binário é uma estrutura com um operador e dois operandos: esquerda e direita.
|
|
@@ -18,5 +18,5 @@ export declare class Binario implements Construto {
|
|
|
18
18
|
operador: any;
|
|
19
19
|
direita: any;
|
|
20
20
|
constructor(hashArquivo: number, esquerda: any, operador: any, direita: any);
|
|
21
|
-
aceitar(visitante: InterpretadorInterface
|
|
21
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binario.js","sourceRoot":"","sources":["../../../fontes/construtos/binario.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;;;GAUG;AACH;IAQI,iBAAY,WAAmB,EAAE,QAAa,EAAE,QAAa,EAAE,OAAY;QACvE,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,yBAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"binario.js","sourceRoot":"","sources":["../../../fontes/construtos/binario.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;;;GAUG;AACH;IAQI,iBAAY,WAAmB,EAAE,QAAa,EAAE,QAAa,EAAE,OAAY;QACvE,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,yBAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IACL,cAAC;AAAD,CAAC,AApBD,IAoBC;AApBY,0BAAO"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InterpretadorInterface
|
|
1
|
+
import { InterpretadorInterface } from "../interfaces";
|
|
2
2
|
import { Construto } from "./construto";
|
|
3
3
|
export declare class Chamada implements Construto {
|
|
4
4
|
linha: number;
|
|
@@ -7,5 +7,5 @@ export declare class Chamada implements Construto {
|
|
|
7
7
|
argumentos: any;
|
|
8
8
|
parentese: any;
|
|
9
9
|
constructor(hashArquivo: number, entidadeChamada: Construto, parentese: any, argumentos: any);
|
|
10
|
-
aceitar(visitante:
|
|
10
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chamada.js","sourceRoot":"","sources":["../../../fontes/construtos/chamada.ts"],"names":[],"mappings":";;;AAIA;IAQI,iBAAY,WAAmB,EAAE,eAA0B,EAAE,SAAc,EAAE,UAAe;QACxF,IAAI,CAAC,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,yBAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"chamada.js","sourceRoot":"","sources":["../../../fontes/construtos/chamada.ts"],"names":[],"mappings":";;;AAIA;IAQI,iBAAY,WAAmB,EAAE,eAA0B,EAAE,SAAc,EAAE,UAAe;QACxF,IAAI,CAAC,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,yBAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IACL,cAAC;AAAD,CAAC,AApBD,IAoBC;AApBY,0BAAO"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { InterpretadorInterface
|
|
1
|
+
import { InterpretadorInterface } from "../interfaces";
|
|
2
2
|
import { Construto } from "./construto";
|
|
3
3
|
export declare class Literal implements Construto {
|
|
4
4
|
linha: number;
|
|
5
5
|
hashArquivo?: number;
|
|
6
6
|
valor: any;
|
|
7
7
|
constructor(hashArquivo: number, linha: number, valor: any);
|
|
8
|
-
aceitar(visitante:
|
|
8
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"literal.js","sourceRoot":"","sources":["../../../fontes/construtos/literal.ts"],"names":[],"mappings":";;;AAIA;IAMI,iBAAY,WAAmB,EAAE,KAAa,EAAE,KAAU;QACtD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,yBAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"literal.js","sourceRoot":"","sources":["../../../fontes/construtos/literal.ts"],"names":[],"mappings":";;;AAIA;IAMI,iBAAY,WAAmB,EAAE,KAAa,EAAE,KAAU;QACtD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,yBAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IACL,cAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,0BAAO"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { InterpretadorInterface,
|
|
1
|
+
import { InterpretadorInterface, SimboloInterface } from "../interfaces";
|
|
2
2
|
import { Construto } from "./construto";
|
|
3
3
|
export declare class Variavel implements Construto {
|
|
4
4
|
linha: number;
|
|
5
5
|
hashArquivo?: number;
|
|
6
6
|
simbolo: SimboloInterface;
|
|
7
7
|
constructor(hashArquivo: number, simbolo: SimboloInterface);
|
|
8
|
-
aceitar(visitante:
|
|
8
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variavel.js","sourceRoot":"","sources":["../../../fontes/construtos/variavel.ts"],"names":[],"mappings":";;;AAIA;IAMI,kBAAY,WAAmB,EAAE,OAAyB;QACtD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,0BAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"variavel.js","sourceRoot":"","sources":["../../../fontes/construtos/variavel.ts"],"names":[],"mappings":";;;AAIA;IAMI,kBAAY,WAAmB,EAAE,OAAyB;QACtD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,0BAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IACL,eAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,4BAAQ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { InterpretadorInterface
|
|
1
|
+
import { InterpretadorInterface } from "../interfaces";
|
|
2
2
|
import { Declaracao } from "./declaracao";
|
|
3
3
|
export declare class Bloco extends Declaracao {
|
|
4
4
|
declaracoes: any;
|
|
5
5
|
constructor(hashArquivo: number, linha: number, declaracoes: any);
|
|
6
|
-
aceitar(visitante:
|
|
6
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bloco.js","sourceRoot":"","sources":["../../../fontes/declaracoes/bloco.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA2B,yBAAU;IAGjC,eAAY,WAAmB,EAAE,KAAa,EAAE,WAAgB;QAAhE,YACI,kBAAM,KAAK,EAAE,WAAW,CAAC,SAE5B;QADG,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;;IACnC,CAAC;IAED,uBAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"bloco.js","sourceRoot":"","sources":["../../../fontes/declaracoes/bloco.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA2B,yBAAU;IAGjC,eAAY,WAAmB,EAAE,KAAa,EAAE,WAAgB;QAAhE,YACI,kBAAM,KAAK,EAAE,WAAW,CAAC,SAE5B;QADG,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;;IACnC,CAAC;IAED,uBAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACL,YAAC;AAAD,CAAC,AAXD,CAA2B,uBAAU,GAWpC;AAXY,sBAAK"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Construto } from "../construtos";
|
|
2
|
-
import { InterpretadorInterface
|
|
2
|
+
import { InterpretadorInterface } from "../interfaces";
|
|
3
3
|
import { Declaracao } from "./declaracao";
|
|
4
4
|
export declare class Escreva extends Declaracao {
|
|
5
|
-
|
|
6
|
-
constructor(
|
|
7
|
-
aceitar(visitante:
|
|
5
|
+
argumentos: Construto[];
|
|
6
|
+
constructor(linha: number, hashArquivo: number, argumentos: Construto[]);
|
|
7
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
8
8
|
}
|
|
@@ -19,9 +19,9 @@ exports.Escreva = void 0;
|
|
|
19
19
|
var declaracao_1 = require("./declaracao");
|
|
20
20
|
var Escreva = /** @class */ (function (_super) {
|
|
21
21
|
__extends(Escreva, _super);
|
|
22
|
-
function Escreva(
|
|
23
|
-
var _this = _super.call(this,
|
|
24
|
-
_this.
|
|
22
|
+
function Escreva(linha, hashArquivo, argumentos) {
|
|
23
|
+
var _this = _super.call(this, linha, hashArquivo) || this;
|
|
24
|
+
_this.argumentos = argumentos;
|
|
25
25
|
return _this;
|
|
26
26
|
}
|
|
27
27
|
Escreva.prototype.aceitar = function (visitante) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escreva.js","sourceRoot":"","sources":["../../../fontes/declaracoes/escreva.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,2CAA0C;AAG1C;IAA6B,2BAAU;IAGnC,iBAAY,
|
|
1
|
+
{"version":3,"file":"escreva.js","sourceRoot":"","sources":["../../../fontes/declaracoes/escreva.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,2CAA0C;AAG1C;IAA6B,2BAAU;IAGnC,iBAAY,KAAa,EAAE,WAAmB,EAAE,UAAuB;QAAvE,YACI,kBAAM,KAAK,EAAE,WAAW,CAAC,SAE5B;QADG,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;;IACjC,CAAC;IAED,yBAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IACL,cAAC;AAAD,CAAC,AAXD,CAA6B,uBAAU,GAWtC;AAXY,0BAAO"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Construto } from "../construtos";
|
|
2
|
-
import { InterpretadorInterface
|
|
2
|
+
import { InterpretadorInterface } from "../interfaces";
|
|
3
3
|
import { Declaracao } from "./declaracao";
|
|
4
4
|
export declare class Expressao extends Declaracao {
|
|
5
5
|
expressao: Construto;
|
|
6
6
|
constructor(expressao: Construto);
|
|
7
|
-
aceitar(visitante:
|
|
7
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expressao.js","sourceRoot":"","sources":["../../../fontes/declaracoes/expressao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,2CAA0C;AAG1C;IAA+B,6BAAU;IAGrC,mBAAY,SAAoB;QAAhC,YACI,kBAAM,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,WAAW,CAAC,SAEhD;QADG,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC/B,CAAC;IAED,2BAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"expressao.js","sourceRoot":"","sources":["../../../fontes/declaracoes/expressao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,2CAA0C;AAG1C;IAA+B,6BAAU;IAGrC,mBAAY,SAAoB;QAAhC,YACI,kBAAM,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,WAAW,CAAC,SAEhD;QADG,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC/B,CAAC;IAED,2BAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;IACxD,CAAC;IACL,gBAAC;AAAD,CAAC,AAXD,CAA+B,uBAAU,GAWxC;AAXY,8BAAS"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { InterpretadorInterface,
|
|
1
|
+
import { InterpretadorInterface, SimboloInterface } from "../interfaces";
|
|
2
2
|
import { Declaracao } from "./declaracao";
|
|
3
3
|
export declare class Funcao extends Declaracao {
|
|
4
4
|
simbolo: SimboloInterface;
|
|
5
5
|
funcao: any;
|
|
6
6
|
constructor(simbolo: SimboloInterface, funcao: any);
|
|
7
|
-
aceitar(visitante:
|
|
7
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"funcao.js","sourceRoot":"","sources":["../../../fontes/declaracoes/funcao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA4B,0BAAU;IAIlC,gBAAY,OAAyB,EAAE,MAAW;QAAlD,YACI,kBAAM,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,SAGpD;QAFG,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IAED,wBAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"funcao.js","sourceRoot":"","sources":["../../../fontes/declaracoes/funcao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA4B,0BAAU;IAIlC,gBAAY,OAAyB,EAAE,MAAW;QAAlD,YACI,kBAAM,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,SAGpD;QAFG,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IAED,wBAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;IACL,aAAC;AAAD,CAAC,AAbD,CAA4B,uBAAU,GAarC;AAbY,wBAAM"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { InterpretadorInterface,
|
|
1
|
+
import { InterpretadorInterface, SimboloInterface } from "../interfaces";
|
|
2
2
|
import { Declaracao } from "./declaracao";
|
|
3
3
|
export declare class Retorna extends Declaracao {
|
|
4
4
|
simboloChave: SimboloInterface;
|
|
5
5
|
valor: any;
|
|
6
6
|
constructor(simboloChave: SimboloInterface, valor: any);
|
|
7
|
-
aceitar(visitante:
|
|
7
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retorna.js","sourceRoot":"","sources":["../../../fontes/declaracoes/retorna.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA6B,2BAAU;IAInC,iBAAY,YAA8B,EAAE,KAAU;QAAtD,YACI,kBAAM,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAG9D;QAFG,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,yBAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"retorna.js","sourceRoot":"","sources":["../../../fontes/declaracoes/retorna.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA6B,2BAAU;IAInC,iBAAY,YAA8B,EAAE,KAAU;QAAtD,YACI,kBAAM,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAG9D;QAFG,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,yBAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACL,cAAC;AAAD,CAAC,AAbD,CAA6B,uBAAU,GAatC;AAbY,0BAAO"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InterpretadorInterface
|
|
1
|
+
import { InterpretadorInterface } from "../interfaces";
|
|
2
2
|
import { Declaracao } from "./declaracao";
|
|
3
3
|
export declare class Se extends Declaracao {
|
|
4
4
|
condicao: any;
|
|
@@ -6,5 +6,5 @@ export declare class Se extends Declaracao {
|
|
|
6
6
|
caminhosSeSenao: any;
|
|
7
7
|
caminhoSenao: any;
|
|
8
8
|
constructor(condicao: any, caminhoEntao: any, caminhosSeSenao: any, caminhoSenao: any);
|
|
9
|
-
aceitar(visitante:
|
|
9
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"se.js","sourceRoot":"","sources":["../../../fontes/declaracoes/se.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAAwB,sBAAU;IAM9B,YAAY,QAAa,EAAE,YAAiB,EAAE,eAAoB,EAAE,YAAiB;QAArF,YACI,kBAAM,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC,SAK9C;QAJG,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;;IACrC,CAAC;IAED,oBAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"se.js","sourceRoot":"","sources":["../../../fontes/declaracoes/se.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAAwB,sBAAU;IAM9B,YAAY,QAAa,EAAE,YAAiB,EAAE,eAAoB,EAAE,YAAiB;QAArF,YACI,kBAAM,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC,SAK9C;QAJG,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;;IACrC,CAAC;IAED,oBAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IACL,SAAC;AAAD,CAAC,AAjBD,CAAwB,uBAAU,GAiBjC;AAjBY,gBAAE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InterpretadorInterface,
|
|
1
|
+
import { InterpretadorInterface, SimboloInterface } from "../interfaces";
|
|
2
2
|
import { Declaracao } from "./declaracao";
|
|
3
3
|
export declare class Sustar extends Declaracao {
|
|
4
4
|
constructor(simbolo: SimboloInterface);
|
|
5
|
-
aceitar(visitante:
|
|
5
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sustar.js","sourceRoot":"","sources":["../../../fontes/declaracoes/sustar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA4B,0BAAU;IAClC,gBAAY,OAAyB;eACjC,kBAAM,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;IACrD,CAAC;IAED,wBAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"sustar.js","sourceRoot":"","sources":["../../../fontes/declaracoes/sustar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA4B,0BAAU;IAClC,gBAAY,OAAyB;eACjC,kBAAM,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;IACrD,CAAC;IAED,wBAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;IACL,aAAC;AAAD,CAAC,AARD,CAA4B,uBAAU,GAQrC;AARY,wBAAM"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InterpretadorInterface
|
|
1
|
+
import { InterpretadorInterface } from "../interfaces";
|
|
2
2
|
import { Declaracao } from "./declaracao";
|
|
3
3
|
export declare class Tente extends Declaracao {
|
|
4
4
|
caminhoTente: any;
|
|
@@ -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:
|
|
9
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tente.js","sourceRoot":"","sources":["../../../fontes/declaracoes/tente.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA2B,yBAAU;IAMjC,eAAY,WAAmB,EAAE,KAAa,EAAE,YAAiB,EAAE,YAAiB,EAAE,YAAiB,EAAE,iBAAsB;QAA/H,YACI,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;IAED,uBAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"tente.js","sourceRoot":"","sources":["../../../fontes/declaracoes/tente.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAA2B,yBAAU;IAMjC,eAAY,WAAmB,EAAE,KAAa,EAAE,YAAiB,EAAE,YAAiB,EAAE,YAAiB,EAAE,iBAAsB;QAA/H,YACI,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;IAED,uBAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACL,YAAC;AAAD,CAAC,AAjBD,CAA2B,uBAAU,GAiBpC;AAjBY,sBAAK"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { InterpretadorInterface,
|
|
1
|
+
import { InterpretadorInterface, SimboloInterface } from "../interfaces";
|
|
2
2
|
import { Declaracao } from "./declaracao";
|
|
3
3
|
export declare class Var extends Declaracao {
|
|
4
4
|
simbolo: SimboloInterface;
|
|
5
5
|
inicializador: any;
|
|
6
6
|
constructor(simbolo: SimboloInterface, inicializador: any);
|
|
7
|
-
aceitar(visitante:
|
|
7
|
+
aceitar(visitante: InterpretadorInterface): any;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"var.js","sourceRoot":"","sources":["../../../fontes/declaracoes/var.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAAyB,uBAAU;IAI/B,aAAY,OAAyB,EAAE,aAAkB;QAAzD,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;IAED,qBAAO,GAAP,UAAQ,
|
|
1
|
+
{"version":3,"file":"var.js","sourceRoot":"","sources":["../../../fontes/declaracoes/var.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAG1C;IAAyB,uBAAU;IAI/B,aAAY,OAAyB,EAAE,aAAkB;QAAzD,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;IAED,qBAAO,GAAP,UAAQ,SAAiC;QACrC,OAAO,SAAS,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACL,UAAC;AAAD,CAAC,AAbD,CAAyB,uBAAU,GAalC;AAbY,kBAAG"}
|
package/fontes/delegua.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AvaliadorSintaticoInterface, DeleguaInterface, InterpretadorComDepuracaoInterface, InterpretadorInterface, LexadorInterface, RetornoExecucaoInterface, SimboloInterface } from './interfaces';
|
|
2
|
-
import { ResolvedorInterface } from './interfaces/resolvedor-interface';
|
|
3
2
|
import { ServidorDepuracao } from './depuracao';
|
|
4
3
|
import { ImportadorInterface } from './interfaces/importador-interface';
|
|
5
4
|
import { RetornoImportador } from './importador';
|
|
@@ -19,7 +18,6 @@ export declare class Delegua implements DeleguaInterface {
|
|
|
19
18
|
interpretador: InterpretadorInterface | InterpretadorComDepuracaoInterface;
|
|
20
19
|
lexador: LexadorInterface;
|
|
21
20
|
avaliadorSintatico: AvaliadorSintaticoInterface;
|
|
22
|
-
resolvedor: ResolvedorInterface;
|
|
23
21
|
importador: ImportadorInterface;
|
|
24
22
|
funcaoDeRetorno: Function;
|
|
25
23
|
modoDepuracao: Boolean;
|
package/fontes/delegua.js
CHANGED
|
@@ -33,18 +33,17 @@ var readline = __importStar(require("readline"));
|
|
|
33
33
|
var chalk_1 = __importDefault(require("chalk"));
|
|
34
34
|
var lexador_1 = require("./lexador/lexador");
|
|
35
35
|
var avaliador_sintatico_1 = require("./avaliador-sintatico/avaliador-sintatico");
|
|
36
|
-
var resolvedor_1 = require("./resolvedor");
|
|
37
36
|
var interpretador_1 = require("./interpretador/interpretador");
|
|
38
37
|
var tipos_de_simbolos_1 = __importDefault(require("./tipos-de-simbolos"));
|
|
39
38
|
var egua_classico_1 = require("./interpretador/dialetos/egua-classico");
|
|
40
39
|
var lexador_egua_classico_1 = require("./lexador/dialetos/lexador-egua-classico");
|
|
41
40
|
var lexador_eguap_1 = require("./lexador/dialetos/lexador-eguap");
|
|
42
41
|
var avaliador_sintatico_eguap_1 = require("./avaliador-sintatico/dialetos/avaliador-sintatico-eguap");
|
|
43
|
-
var egua_classico_2 = require("./resolvedor/dialetos/egua-classico");
|
|
44
42
|
var dialetos_1 = require("./avaliador-sintatico/dialetos");
|
|
45
43
|
var depuracao_1 = require("./depuracao");
|
|
46
44
|
var importador_1 = require("./importador");
|
|
47
45
|
var interpretador_com_depuracao_1 = require("./interpretador/interpretador-com-depuracao");
|
|
46
|
+
var dialetos_2 = require("./resolvedor/dialetos");
|
|
48
47
|
/**
|
|
49
48
|
* O núcleo da linguagem.
|
|
50
49
|
*
|
|
@@ -66,31 +65,28 @@ var Delegua = /** @class */ (function () {
|
|
|
66
65
|
if (depurador) {
|
|
67
66
|
throw new Error("Dialeto " + this.dialeto + " não suporta depuração.");
|
|
68
67
|
}
|
|
69
|
-
this.resolvedor = new egua_classico_2.ResolvedorEguaClassico();
|
|
70
68
|
this.lexador = new lexador_egua_classico_1.LexadorEguaClassico();
|
|
71
69
|
this.avaliadorSintatico = new dialetos_1.AvaliadorSintaticoEguaClassico();
|
|
72
70
|
this.importador = new importador_1.Importador(this.lexador, this.avaliadorSintatico, this.arquivosAbertos, this.conteudoArquivosAbertos, depurador);
|
|
73
|
-
this.interpretador = new egua_classico_1.InterpretadorEguaClassico(this, process.cwd());
|
|
71
|
+
this.interpretador = new egua_classico_1.InterpretadorEguaClassico(this, new dialetos_2.ResolvedorEguaClassico(), process.cwd());
|
|
74
72
|
console.log('Usando dialeto: Égua');
|
|
75
73
|
break;
|
|
76
74
|
case 'eguap':
|
|
77
|
-
this.resolvedor = new resolvedor_1.Resolvedor();
|
|
78
75
|
this.lexador = new lexador_eguap_1.LexadorEguaP();
|
|
79
76
|
this.avaliadorSintatico = new avaliador_sintatico_eguap_1.AvaliadorSintaticoEguaP();
|
|
80
77
|
this.importador = new importador_1.Importador(this.lexador, this.avaliadorSintatico, this.arquivosAbertos, this.conteudoArquivosAbertos, depurador);
|
|
81
78
|
this.interpretador = depurador ?
|
|
82
|
-
new interpretador_com_depuracao_1.InterpretadorComDepuracao(this.importador,
|
|
83
|
-
new interpretador_1.Interpretador(this.importador,
|
|
79
|
+
new interpretador_com_depuracao_1.InterpretadorComDepuracao(this.importador, process.cwd(), funcaoDeRetorno) :
|
|
80
|
+
new interpretador_1.Interpretador(this.importador, process.cwd(), performance, funcaoDeRetorno);
|
|
84
81
|
console.log('Usando dialeto: ÉguaP');
|
|
85
82
|
break;
|
|
86
83
|
default:
|
|
87
|
-
this.resolvedor = new resolvedor_1.Resolvedor();
|
|
88
84
|
this.lexador = new lexador_1.Lexador(performance);
|
|
89
85
|
this.avaliadorSintatico = new avaliador_sintatico_1.AvaliadorSintatico(performance);
|
|
90
86
|
this.importador = new importador_1.Importador(this.lexador, this.avaliadorSintatico, this.arquivosAbertos, this.conteudoArquivosAbertos, depurador);
|
|
91
87
|
this.interpretador = depurador ?
|
|
92
|
-
new interpretador_com_depuracao_1.InterpretadorComDepuracao(this.importador,
|
|
93
|
-
new interpretador_1.Interpretador(this.importador,
|
|
88
|
+
new interpretador_com_depuracao_1.InterpretadorComDepuracao(this.importador, process.cwd(), funcaoDeRetorno) :
|
|
89
|
+
new interpretador_1.Interpretador(this.importador, process.cwd(), performance, funcaoDeRetorno);
|
|
94
90
|
console.log('Usando dialeto: padrão');
|
|
95
91
|
break;
|
|
96
92
|
}
|
package/fontes/delegua.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
|
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,0EAAkD;AAYlD,wEAAmF;AACnF,kFAA+E;AAC/E,kEAAgE;AAChE,sGAAmG;AACnG,2DAAgF;AAChF,yCAAgD;AAGhD,2CAA6D;AAC7D,2FAAwF;AACxF,kDAA+D;AAE/D;;;;GAIG;AACH;IAcI,iBACI,OAA2B,EAC3B,WAA4B,EAC5B,SAA0B,EAC1B,eAAgC;QAHhC,wBAAA,EAAA,mBAA2B;QAC3B,4BAAA,EAAA,mBAA4B;QAC5B,0BAAA,EAAA,iBAA0B;QAC1B,gCAAA,EAAA,sBAAgC;QAEhC,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,uBAAuB,GAAG,EAAE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CACT,eAAK,CAAC,GAAG,CAAC,wBAAiB,IAAI,CAAC,OAAO,CAAC,KAAK,MAAG,CAAC,GAAG,WAAI,IAAI,CAAC,QAAQ,CAAE,CAC1E,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,wBAAiB,IAAI,CAAC,KAAK,IAAI,CAAC,MAAG,CAAC,GAAG,WAAI,IAAI,CAAC,QAAQ,CAAE,CAAC,CAAC;SACvF;IACL,CAAC;IACL,cAAC;AAAD,CAAC,AAtQD,IAsQC;AAtQY,0BAAO"}
|
|
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.Importador = void 0;
|
|
30
30
|
var fs = __importStar(require("fs"));
|
|
31
31
|
var caminho = __importStar(require("path"));
|
|
32
|
+
var sistemaOperacional = __importStar(require("os"));
|
|
32
33
|
var cyrb53_1 = __importDefault(require("../depuracao/cyrb53"));
|
|
33
34
|
/**
|
|
34
35
|
* O Importador é responsável por manusear arquivos. Coordena as fases de lexação, avaliação sintática,
|
|
@@ -59,7 +60,10 @@ var Importador = /** @class */ (function () {
|
|
|
59
60
|
var dadosDoArquivo = fs.readFileSync(caminhoRelativoArquivo);
|
|
60
61
|
var conteudoDoArquivo = dadosDoArquivo
|
|
61
62
|
.toString()
|
|
62
|
-
.split(
|
|
63
|
+
.split(sistemaOperacional.EOL);
|
|
64
|
+
for (var linha = 0; linha < conteudoDoArquivo.length; linha++) {
|
|
65
|
+
conteudoDoArquivo[linha] += '\0';
|
|
66
|
+
}
|
|
63
67
|
var retornoLexador = this.lexador.mapear(conteudoDoArquivo, hashArquivo);
|
|
64
68
|
var retornoAvaliadorSintatico = this.avaliadorSintatico.analisar(retornoLexador, hashArquivo);
|
|
65
69
|
this.arquivosAbertos[hashArquivo] = caminho.resolve(caminhoRelativoArquivo);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importador.js","sourceRoot":"","sources":["../../../fontes/importador/importador.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,4CAAgC;
|
|
1
|
+
{"version":3,"file":"importador.js","sourceRoot":"","sources":["../../../fontes/importador/importador.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,4CAAgC;AAChC,qDAAyC;AAEzC,+DAAyC;AAOzC;;;;;GAKG;AACH;IAOI,oBACI,OAAyB,EACzB,kBAA+C,EAC/C,eAAoD,EACpD,uBAA8D,EAC9D,SAAkB;QAElB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,6BAAQ,GAAR,UAAS,sBAA8B;QACnC,IAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;QAC7D,IAAM,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;QACvE,IAAM,WAAW,GAAG,IAAA,gBAAM,EAAC,sBAAsB,CAAC,WAAW,EAAE,CAAC,CAAC;QAEjE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE;YAC7B,kBAAkB;YAClB;;;;iBAIK;SACR;QAED,IAAM,cAAc,GAAW,EAAE,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;QACvE,IAAM,iBAAiB,GAAa,cAAc;aAC7C,QAAQ,EAAE;aACV,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAEnC,KAAK,IAAI,KAAK,GAAW,CAAC,EAAE,KAAK,GAAG,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACnE,iBAAiB,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;SACpC;QAED,IAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;QAC3E,IAAM,yBAAyB,GAAG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QAChG,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;QAE5E,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAC,GAAG,iBAAiB,CAAC;SACjE;QAED,OAAO;YACH,WAAW,aAAA;YACX,WAAW,aAAA;YACX,cAAc,gBAAA;YACd,yBAAyB,2BAAA;SACP,CAAC;IAC3B,CAAC;IACL,iBAAC;AAAD,CAAC,AA3DD,IA2DC;AA3DY,gCAAU"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RetornoImportador } from "../importador";
|
|
2
|
-
import { AvaliadorSintaticoInterface, ImportadorInterface, InterpretadorComDepuracaoInterface, InterpretadorInterface, LexadorInterface,
|
|
2
|
+
import { AvaliadorSintaticoInterface, ImportadorInterface, InterpretadorComDepuracaoInterface, InterpretadorInterface, LexadorInterface, RetornoExecucaoInterface, SimboloInterface } from "../interfaces";
|
|
3
3
|
export interface DeleguaInterface {
|
|
4
4
|
dialeto: string;
|
|
5
5
|
arquivosAbertos: {
|
|
@@ -12,7 +12,6 @@ export interface DeleguaInterface {
|
|
|
12
12
|
interpretador: InterpretadorInterface | InterpretadorComDepuracaoInterface;
|
|
13
13
|
lexador: LexadorInterface;
|
|
14
14
|
avaliadorSintatico: AvaliadorSintaticoInterface;
|
|
15
|
-
resolvedor: ResolvedorInterface;
|
|
16
15
|
importador: ImportadorInterface;
|
|
17
16
|
versao(): string;
|
|
18
17
|
carregarArquivo(caminhoRelativoArquivo: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ambiente } from "../ambiente";
|
|
2
|
-
import { Atribuir,
|
|
2
|
+
import { Atribuir, Literal, Super } from "../construtos";
|
|
3
3
|
import { Bloco, Classe, Continua, Declaracao, Enquanto, Escolha, Escreva, Expressao, Fazer, Funcao, Importar, 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";
|
|
@@ -8,7 +8,6 @@ import { SimboloInterface } from "./simbolo-interface";
|
|
|
8
8
|
export interface InterpretadorInterface {
|
|
9
9
|
diretorioBase: any;
|
|
10
10
|
funcaoDeRetorno: Function;
|
|
11
|
-
locais: Map<Construto, number>;
|
|
12
11
|
pilhaEscoposExecucao: PilhaEscoposExecucaoInterface;
|
|
13
12
|
visitarExpressaoLiteral(expressao: Literal): any;
|
|
14
13
|
avaliar(expressao: any): any;
|
|
@@ -11,6 +11,7 @@ export interface PilhaEscoposExecucaoInterface extends PilhaInterface<EscopoExec
|
|
|
11
11
|
obterTodasVariaveis(todasVariaveis: any[]): any[];
|
|
12
12
|
obterVariavel(simbolo: SimboloInterface): any;
|
|
13
13
|
obterVariavelEm(distancia: number, nome: string): any;
|
|
14
|
+
obterVariavelPorNome(nome: string): any;
|
|
14
15
|
obterTodasDeleguaFuncao(): {
|
|
15
16
|
[nome: string]: DeleguaFuncao;
|
|
16
17
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Ambiente } from '../../ambiente';
|
|
2
2
|
import { Delegua } from '../../delegua';
|
|
3
3
|
import { DeleguaFuncao } from '../../estruturas/funcao';
|
|
4
|
-
import { InterpretadorInterface, SimboloInterface } from '../../interfaces';
|
|
4
|
+
import { InterpretadorInterface, SimboloInterface, ResolvedorInterface } from '../../interfaces';
|
|
5
5
|
import { Classe, Declaracao, Enquanto, Escolha, Escreva, Expressao, Fazer, Funcao, Importar, Para, Se, Tente, Var } from '../../declaracoes';
|
|
6
6
|
import { Atribuir, Construto, Literal, Super, Variavel } from '../../construtos';
|
|
7
7
|
import { RetornoInterpretador } from '../../interfaces/retornos/retorno-interpretador';
|
|
@@ -14,12 +14,13 @@ import { ContinuarQuebra, RetornoQuebra, SustarQuebra } from '../../quebras';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare class InterpretadorEguaClassico implements InterpretadorInterface {
|
|
16
16
|
Delegua: Delegua;
|
|
17
|
+
resolvedor: ResolvedorInterface;
|
|
17
18
|
diretorioBase: any;
|
|
18
19
|
funcaoDeRetorno: Function;
|
|
19
20
|
locais: Map<Construto, number>;
|
|
20
21
|
erros: ErroInterpretador[];
|
|
21
22
|
pilhaEscoposExecucao: PilhaEscoposExecucao;
|
|
22
|
-
constructor(Delegua: Delegua, diretorioBase: string);
|
|
23
|
+
constructor(Delegua: Delegua, resolvedor: ResolvedorInterface, diretorioBase: string);
|
|
23
24
|
visitarExpressaoLiteral(expressao: Literal): any;
|
|
24
25
|
avaliar(expressao: Construto): any;
|
|
25
26
|
visitarExpressaoAgrupamento(expressao: any): any;
|
|
@@ -48,8 +48,9 @@ var quebras_1 = require("../../quebras");
|
|
|
48
48
|
* e de fato executa a lógica de programação descrita no código.
|
|
49
49
|
*/
|
|
50
50
|
var InterpretadorEguaClassico = /** @class */ (function () {
|
|
51
|
-
function InterpretadorEguaClassico(Delegua, diretorioBase) {
|
|
51
|
+
function InterpretadorEguaClassico(Delegua, resolvedor, diretorioBase) {
|
|
52
52
|
this.Delegua = Delegua;
|
|
53
|
+
this.resolvedor = resolvedor;
|
|
53
54
|
this.diretorioBase = diretorioBase;
|
|
54
55
|
this.funcaoDeRetorno = console.log;
|
|
55
56
|
this.locais = new Map();
|
|
@@ -402,7 +403,7 @@ var InterpretadorEguaClassico = /** @class */ (function () {
|
|
|
402
403
|
};
|
|
403
404
|
InterpretadorEguaClassico.prototype.visitarExpressaoEscreva = function (declaracao) {
|
|
404
405
|
try {
|
|
405
|
-
var valor = this.avaliar(declaracao.
|
|
406
|
+
var valor = this.avaliar(declaracao.argumentos[0]);
|
|
406
407
|
console.log(this.paraTexto(valor));
|
|
407
408
|
return null;
|
|
408
409
|
}
|
|
@@ -646,7 +647,7 @@ var InterpretadorEguaClassico = /** @class */ (function () {
|
|
|
646
647
|
};
|
|
647
648
|
InterpretadorEguaClassico.prototype.interpretar = function (declaracoes) {
|
|
648
649
|
this.erros = [];
|
|
649
|
-
var retornoResolvedor = this.
|
|
650
|
+
var retornoResolvedor = this.resolvedor.resolver(declaracoes);
|
|
650
651
|
this.locais = retornoResolvedor.locais;
|
|
651
652
|
var escopoExecucao = {
|
|
652
653
|
declaracoes: declaracoes,
|