@designliquido/delegua 0.15.2 → 0.15.3

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.
Files changed (341) hide show
  1. package/README.md +85 -85
  2. package/bin/delegua +2 -2
  3. package/bin/package.json +88 -88
  4. package/fontes/avaliador-sintatico/avaliador-sintatico-base.d.ts +67 -67
  5. package/fontes/avaliador-sintatico/avaliador-sintatico-base.js +215 -215
  6. package/fontes/avaliador-sintatico/avaliador-sintatico.d.ts +92 -92
  7. package/fontes/avaliador-sintatico/avaliador-sintatico.js +857 -857
  8. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-birl.d.ts +27 -27
  9. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-birl.js +319 -294
  10. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-birl.js.map +1 -1
  11. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.d.ts +69 -69
  12. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-egua-classico.js +640 -640
  13. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.d.ts +84 -84
  14. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-eguap.js +714 -714
  15. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-guarani.d.ts +20 -20
  16. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-guarani.js +149 -149
  17. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-portugol-studio.d.ts +49 -49
  18. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-portugol-studio.js +419 -419
  19. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-visualg.d.ts +73 -73
  20. package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-visualg.js +534 -534
  21. package/fontes/avaliador-sintatico/dialetos/index.d.ts +5 -5
  22. package/fontes/avaliador-sintatico/dialetos/index.js +21 -21
  23. package/fontes/avaliador-sintatico/erro-avaliador-sintatico.d.ts +5 -5
  24. package/fontes/avaliador-sintatico/erro-avaliador-sintatico.js +11 -11
  25. package/fontes/avaliador-sintatico/index.d.ts +2 -2
  26. package/fontes/avaliador-sintatico/index.js +18 -18
  27. package/fontes/avaliador-sintatico/retornos/index.d.ts +3 -3
  28. package/fontes/avaliador-sintatico/retornos/index.js +19 -19
  29. package/fontes/avaliador-sintatico/retornos/retorno-declaracao.d.ts +3 -3
  30. package/fontes/avaliador-sintatico/retornos/retorno-declaracao.js +2 -2
  31. package/fontes/avaliador-sintatico/retornos/retorno-primario.d.ts +3 -3
  32. package/fontes/avaliador-sintatico/retornos/retorno-primario.js +2 -2
  33. package/fontes/avaliador-sintatico/retornos/retorno-resolver-declaracao.d.ts +2 -2
  34. package/fontes/avaliador-sintatico/retornos/retorno-resolver-declaracao.js +2 -2
  35. package/fontes/bibliotecas/biblioteca-global.d.ts +3 -3
  36. package/fontes/bibliotecas/biblioteca-global.js +315 -315
  37. package/fontes/bibliotecas/dialetos/egua-classico/biblioteca-global.d.ts +1 -1
  38. package/fontes/bibliotecas/dialetos/egua-classico/biblioteca-global.js +230 -230
  39. package/fontes/bibliotecas/dialetos/egua-classico/index.d.ts +2 -2
  40. package/fontes/bibliotecas/dialetos/egua-classico/index.js +32 -32
  41. package/fontes/bibliotecas/dialetos/egua-classico/matematica.d.ts +1 -1
  42. package/fontes/bibliotecas/dialetos/egua-classico/matematica.js +478 -478
  43. package/fontes/bibliotecas/dialetos/egua-classico/tempo.d.ts +1 -1
  44. package/fontes/bibliotecas/dialetos/egua-classico/tempo.js +39 -39
  45. package/fontes/bibliotecas/dialetos/egua-classico/textos.d.ts +8 -8
  46. package/fontes/bibliotecas/dialetos/egua-classico/textos.js +201 -201
  47. package/fontes/bibliotecas/dialetos/visualg/caracteres.d.ts +3 -0
  48. package/fontes/bibliotecas/dialetos/visualg/caracteres.js +35 -0
  49. package/fontes/bibliotecas/dialetos/visualg/caracteres.js.map +1 -0
  50. package/fontes/bibliotecas/dialetos/visualg/index.d.ts +2 -0
  51. package/fontes/bibliotecas/dialetos/visualg/index.js +18 -0
  52. package/fontes/bibliotecas/dialetos/visualg/index.js.map +1 -1
  53. package/fontes/bibliotecas/dialetos/visualg/numerica.d.ts +3 -0
  54. package/fontes/bibliotecas/dialetos/visualg/numerica.js +65 -0
  55. package/fontes/bibliotecas/dialetos/visualg/numerica.js.map +1 -0
  56. package/fontes/bibliotecas/primitivas-texto.d.ts +11 -11
  57. package/fontes/bibliotecas/primitivas-texto.js +12 -12
  58. package/fontes/bibliotecas/primitivas-vetor.d.ts +15 -15
  59. package/fontes/bibliotecas/primitivas-vetor.js +33 -33
  60. package/fontes/construtos/acesso-indice-variavel.d.ts +15 -15
  61. package/fontes/construtos/acesso-indice-variavel.js +20 -20
  62. package/fontes/construtos/acesso-metodo.d.ts +14 -14
  63. package/fontes/construtos/acesso-metodo.js +19 -19
  64. package/fontes/construtos/agrupamento.d.ts +14 -14
  65. package/fontes/construtos/agrupamento.js +19 -19
  66. package/fontes/construtos/atribuicao-sobrescrita.d.ts +11 -11
  67. package/fontes/construtos/atribuicao-sobrescrita.js +16 -16
  68. package/fontes/construtos/atribuir.d.ts +10 -10
  69. package/fontes/construtos/atribuir.js +15 -15
  70. package/fontes/construtos/binario.d.ts +22 -22
  71. package/fontes/construtos/binario.js +27 -27
  72. package/fontes/construtos/chamada.d.ts +13 -13
  73. package/fontes/construtos/chamada.js +36 -36
  74. package/fontes/construtos/construto.d.ts +7 -7
  75. package/fontes/construtos/construto.js +2 -2
  76. package/fontes/construtos/definir-valor.d.ts +11 -11
  77. package/fontes/construtos/definir-valor.js +16 -16
  78. package/fontes/construtos/dicionario.d.ts +10 -10
  79. package/fontes/construtos/dicionario.js +15 -15
  80. package/fontes/construtos/formatacao-escrita.d.ts +16 -16
  81. package/fontes/construtos/formatacao-escrita.js +21 -21
  82. package/fontes/construtos/funcao.d.ts +10 -10
  83. package/fontes/construtos/funcao.js +15 -15
  84. package/fontes/construtos/index.d.ts +19 -19
  85. package/fontes/construtos/index.js +35 -35
  86. package/fontes/construtos/isto.d.ts +9 -9
  87. package/fontes/construtos/isto.js +14 -14
  88. package/fontes/construtos/literal.d.ts +10 -10
  89. package/fontes/construtos/literal.js +14 -14
  90. package/fontes/construtos/logico.d.ts +11 -11
  91. package/fontes/construtos/logico.js +16 -16
  92. package/fontes/construtos/super.d.ts +10 -10
  93. package/fontes/construtos/super.js +15 -15
  94. package/fontes/construtos/unario.d.ts +11 -11
  95. package/fontes/construtos/unario.js +16 -16
  96. package/fontes/construtos/variavel.d.ts +9 -9
  97. package/fontes/construtos/variavel.js +14 -14
  98. package/fontes/construtos/vetor.d.ts +9 -9
  99. package/fontes/construtos/vetor.js +14 -14
  100. package/fontes/declaracoes/bloco.d.ts +7 -7
  101. package/fontes/declaracoes/bloco.js +14 -14
  102. package/fontes/declaracoes/classe.d.ts +9 -9
  103. package/fontes/declaracoes/classe.js +16 -16
  104. package/fontes/declaracoes/continua.d.ts +6 -6
  105. package/fontes/declaracoes/continua.js +13 -13
  106. package/fontes/declaracoes/declaracao.d.ts +8 -8
  107. package/fontes/declaracoes/declaracao.js +17 -17
  108. package/fontes/declaracoes/enquanto.d.ts +9 -9
  109. package/fontes/declaracoes/enquanto.js +15 -15
  110. package/fontes/declaracoes/escolha.d.ts +14 -14
  111. package/fontes/declaracoes/escolha.js +19 -19
  112. package/fontes/declaracoes/escreva-mesma-linha.d.ts +8 -8
  113. package/fontes/declaracoes/escreva-mesma-linha.js +14 -14
  114. package/fontes/declaracoes/escreva.d.ts +8 -8
  115. package/fontes/declaracoes/escreva.js +14 -14
  116. package/fontes/declaracoes/expressao.d.ts +8 -8
  117. package/fontes/declaracoes/expressao.js +14 -14
  118. package/fontes/declaracoes/fazer.d.ts +8 -8
  119. package/fontes/declaracoes/fazer.js +15 -15
  120. package/fontes/declaracoes/funcao.d.ts +9 -9
  121. package/fontes/declaracoes/funcao.js +15 -15
  122. package/fontes/declaracoes/importar.d.ts +9 -9
  123. package/fontes/declaracoes/importar.js +15 -15
  124. package/fontes/declaracoes/index.d.ts +19 -19
  125. package/fontes/declaracoes/index.js +35 -35
  126. package/fontes/declaracoes/leia.d.ts +12 -12
  127. package/fontes/declaracoes/leia.js +18 -18
  128. package/fontes/declaracoes/para.d.ts +10 -10
  129. package/fontes/declaracoes/para.js +17 -17
  130. package/fontes/declaracoes/retorna.d.ts +8 -8
  131. package/fontes/declaracoes/retorna.js +15 -15
  132. package/fontes/declaracoes/se.d.ts +11 -11
  133. package/fontes/declaracoes/se.js +17 -17
  134. package/fontes/declaracoes/sustar.d.ts +6 -6
  135. package/fontes/declaracoes/sustar.js +13 -13
  136. package/fontes/declaracoes/tente.d.ts +14 -14
  137. package/fontes/declaracoes/tente.js +20 -20
  138. package/fontes/declaracoes/var.d.ts +9 -9
  139. package/fontes/declaracoes/var.js +15 -15
  140. package/fontes/depuracao/cyrb53.d.ts +9 -9
  141. package/fontes/depuracao/cyrb53.js +22 -22
  142. package/fontes/depuracao/index.d.ts +2 -2
  143. package/fontes/depuracao/index.js +23 -23
  144. package/fontes/depuracao/ponto-parada.d.ts +4 -4
  145. package/fontes/depuracao/ponto-parada.js +2 -2
  146. package/fontes/espaco-variaveis.d.ts +19 -19
  147. package/fontes/espaco-variaveis.js +19 -19
  148. package/fontes/estruturas/chamavel.d.ts +5 -5
  149. package/fontes/estruturas/chamavel.js +12 -12
  150. package/fontes/estruturas/classe-padrao.d.ts +17 -17
  151. package/fontes/estruturas/classe-padrao.js +28 -28
  152. package/fontes/estruturas/delegua-classe.d.ts +16 -16
  153. package/fontes/estruturas/delegua-classe.js +38 -38
  154. package/fontes/estruturas/delegua-funcao.d.ts +18 -18
  155. package/fontes/estruturas/delegua-funcao.js +60 -60
  156. package/fontes/estruturas/funcao-padrao.d.ts +12 -12
  157. package/fontes/estruturas/funcao-padrao.js +22 -22
  158. package/fontes/estruturas/index.d.ts +9 -9
  159. package/fontes/estruturas/index.js +25 -25
  160. package/fontes/estruturas/metodo-primitiva.d.ts +17 -17
  161. package/fontes/estruturas/metodo-primitiva.js +26 -26
  162. package/fontes/estruturas/modulo.d.ts +9 -9
  163. package/fontes/estruturas/modulo.js +13 -13
  164. package/fontes/estruturas/objeto-delegua-classe.d.ts +10 -10
  165. package/fontes/estruturas/objeto-delegua-classe.js +26 -26
  166. package/fontes/estruturas/objeto-padrao.d.ts +9 -9
  167. package/fontes/estruturas/objeto-padrao.js +21 -21
  168. package/fontes/excecoes/erro-em-tempo-de-execucao.d.ts +7 -7
  169. package/fontes/excecoes/erro-em-tempo-de-execucao.js +13 -13
  170. package/fontes/excecoes/index.d.ts +1 -1
  171. package/fontes/excecoes/index.js +17 -17
  172. package/fontes/formatadores/delegua.d.ts +18 -18
  173. package/fontes/formatadores/delegua.js +82 -82
  174. package/fontes/formatadores/index.d.ts +1 -1
  175. package/fontes/formatadores/index.js +17 -17
  176. package/fontes/interfaces/avaliador-sintatico-interface.d.ts +57 -57
  177. package/fontes/interfaces/avaliador-sintatico-interface.js +2 -2
  178. package/fontes/interfaces/construtos/index.d.ts +4 -4
  179. package/fontes/interfaces/construtos/index.js +2 -2
  180. package/fontes/interfaces/escopo-execucao.d.ts +11 -11
  181. package/fontes/interfaces/escopo-execucao.js +2 -2
  182. package/fontes/interfaces/index.d.ts +11 -11
  183. package/fontes/interfaces/index.js +27 -27
  184. package/fontes/interfaces/interpretador-com-depuracao-interface.d.ts +17 -17
  185. package/fontes/interfaces/interpretador-com-depuracao-interface.js +2 -2
  186. package/fontes/interfaces/interpretador-interface.d.ts +55 -55
  187. package/fontes/interfaces/interpretador-interface.js +2 -2
  188. package/fontes/interfaces/lexador-interface.d.ts +23 -23
  189. package/fontes/interfaces/lexador-interface.js +2 -2
  190. package/fontes/interfaces/parametro-interface.d.ts +6 -6
  191. package/fontes/interfaces/parametro-interface.js +2 -2
  192. package/fontes/interfaces/pilha-escopos-execucao-interface.d.ts +25 -25
  193. package/fontes/interfaces/pilha-escopos-execucao-interface.js +2 -2
  194. package/fontes/interfaces/pilha-interface.d.ts +7 -7
  195. package/fontes/interfaces/pilha-interface.js +2 -2
  196. package/fontes/interfaces/resolvedor-interface.d.ts +41 -41
  197. package/fontes/interfaces/resolvedor-interface.js +2 -2
  198. package/fontes/interfaces/retornos/index.d.ts +4 -4
  199. package/fontes/interfaces/retornos/index.js +20 -20
  200. package/fontes/interfaces/retornos/retorno-avaliador-sintatico.d.ts +6 -6
  201. package/fontes/interfaces/retornos/retorno-avaliador-sintatico.js +2 -2
  202. package/fontes/interfaces/retornos/retorno-execucao-interface.d.ts +5 -5
  203. package/fontes/interfaces/retornos/retorno-execucao-interface.js +2 -2
  204. package/fontes/interfaces/retornos/retorno-interpretador.d.ts +5 -5
  205. package/fontes/interfaces/retornos/retorno-interpretador.js +2 -2
  206. package/fontes/interfaces/retornos/retorno-lexador.d.ts +10 -10
  207. package/fontes/interfaces/retornos/retorno-lexador.js +2 -2
  208. package/fontes/interfaces/simbolo-interface.d.ts +7 -7
  209. package/fontes/interfaces/simbolo-interface.js +2 -2
  210. package/fontes/interfaces/tradutor-interface.d.ts +4 -4
  211. package/fontes/interfaces/tradutor-interface.js +2 -2
  212. package/fontes/interfaces/variavel-interface.d.ts +4 -4
  213. package/fontes/interfaces/variavel-interface.js +2 -2
  214. package/fontes/interpretador/dialetos/egua-classico/index.d.ts +1 -1
  215. package/fontes/interpretador/dialetos/egua-classico/index.js +17 -17
  216. package/fontes/interpretador/dialetos/egua-classico/interpretador-egua-classico.d.ts +99 -99
  217. package/fontes/interpretador/dialetos/egua-classico/interpretador-egua-classico.js +743 -743
  218. package/fontes/interpretador/dialetos/egua-classico/resolvedor/erro-resolvedor.d.ts +5 -5
  219. package/fontes/interpretador/dialetos/egua-classico/resolvedor/erro-resolvedor.js +11 -11
  220. package/fontes/interpretador/dialetos/egua-classico/resolvedor/index.d.ts +3 -3
  221. package/fontes/interpretador/dialetos/egua-classico/resolvedor/index.js +19 -19
  222. package/fontes/interpretador/dialetos/egua-classico/resolvedor/pilha-escopos.d.ts +9 -9
  223. package/fontes/interpretador/dialetos/egua-classico/resolvedor/pilha-escopos.js +25 -25
  224. package/fontes/interpretador/dialetos/egua-classico/resolvedor/resolvedor.d.ts +87 -87
  225. package/fontes/interpretador/dialetos/egua-classico/resolvedor/resolvedor.js +387 -387
  226. package/fontes/interpretador/dialetos/egua-classico/resolvedor/retorno-resolvedor.d.ts +6 -6
  227. package/fontes/interpretador/dialetos/egua-classico/resolvedor/retorno-resolvedor.js +2 -2
  228. package/fontes/interpretador/dialetos/index.d.ts +4 -4
  229. package/fontes/interpretador/dialetos/index.js +20 -20
  230. package/fontes/interpretador/dialetos/portugol-studio/interpretador-portugol-studio.d.ts +12 -12
  231. package/fontes/interpretador/dialetos/portugol-studio/interpretador-portugol-studio.js +26 -26
  232. package/fontes/interpretador/dialetos/visualg/interpretador-visualg-com-depuracao.d.ts +40 -40
  233. package/fontes/interpretador/dialetos/visualg/interpretador-visualg-com-depuracao.js +96 -96
  234. package/fontes/interpretador/dialetos/visualg/interpretador-visualg.d.ts +53 -46
  235. package/fontes/interpretador/dialetos/visualg/interpretador-visualg.js +194 -102
  236. package/fontes/interpretador/dialetos/visualg/interpretador-visualg.js.map +1 -1
  237. package/fontes/interpretador/erro-interpretador.d.ts +8 -8
  238. package/fontes/interpretador/erro-interpretador.js +2 -2
  239. package/fontes/interpretador/index.d.ts +4 -4
  240. package/fontes/interpretador/index.js +20 -20
  241. package/fontes/interpretador/inferenciador.d.ts +1 -1
  242. package/fontes/interpretador/inferenciador.js +31 -31
  243. package/fontes/interpretador/interpretador-base.d.ts +186 -186
  244. package/fontes/interpretador/interpretador-base.js +1001 -1001
  245. package/fontes/interpretador/interpretador-com-depuracao.d.ts +199 -199
  246. package/fontes/interpretador/interpretador-com-depuracao.js +516 -516
  247. package/fontes/interpretador/pilha-escopos-execucao.d.ts +38 -38
  248. package/fontes/interpretador/pilha-escopos-execucao.js +158 -158
  249. package/fontes/lexador/dialetos/index.d.ts +6 -6
  250. package/fontes/lexador/dialetos/index.js +22 -22
  251. package/fontes/lexador/dialetos/lexador-birl.d.ts +12 -12
  252. package/fontes/lexador/dialetos/lexador-birl.js +211 -211
  253. package/fontes/lexador/dialetos/lexador-egua-classico.d.ts +36 -36
  254. package/fontes/lexador/dialetos/lexador-egua-classico.js +286 -286
  255. package/fontes/lexador/dialetos/lexador-eguap.d.ts +51 -51
  256. package/fontes/lexador/dialetos/lexador-eguap.js +398 -398
  257. package/fontes/lexador/dialetos/lexador-guarani.d.ts +9 -9
  258. package/fontes/lexador/dialetos/lexador-guarani.js +113 -113
  259. package/fontes/lexador/dialetos/lexador-portugol-ipt.d.ts +33 -33
  260. package/fontes/lexador/dialetos/lexador-portugol-ipt.js +195 -195
  261. package/fontes/lexador/dialetos/lexador-portugol-studio.d.ts +21 -21
  262. package/fontes/lexador/dialetos/lexador-portugol-studio.js +280 -280
  263. package/fontes/lexador/dialetos/lexador-visualg.d.ts +18 -18
  264. package/fontes/lexador/dialetos/lexador-visualg.js +218 -218
  265. package/fontes/lexador/dialetos/palavras-reservadas/birl.d.ts +46 -46
  266. package/fontes/lexador/dialetos/palavras-reservadas/birl.js +63 -63
  267. package/fontes/lexador/dialetos/palavras-reservadas/egua-classico.d.ts +36 -36
  268. package/fontes/lexador/dialetos/palavras-reservadas/egua-classico.js +41 -41
  269. package/fontes/lexador/dialetos/palavras-reservadas/guarani.d.ts +4 -4
  270. package/fontes/lexador/dialetos/palavras-reservadas/guarani.js +9 -9
  271. package/fontes/lexador/dialetos/palavras-reservadas/index.d.ts +3 -3
  272. package/fontes/lexador/dialetos/palavras-reservadas/index.js +19 -19
  273. package/fontes/lexador/dialetos/palavras-reservadas/portugol-ipt.d.ts +6 -6
  274. package/fontes/lexador/dialetos/palavras-reservadas/portugol-ipt.js +11 -11
  275. package/fontes/lexador/dialetos/palavras-reservadas/portugol-studio.d.ts +23 -23
  276. package/fontes/lexador/dialetos/palavras-reservadas/portugol-studio.js +28 -28
  277. package/fontes/lexador/dialetos/palavras-reservadas/rantiaquin.d.ts +2 -2
  278. package/fontes/lexador/dialetos/palavras-reservadas/rantiaquin.js +3 -3
  279. package/fontes/lexador/dialetos/palavras-reservadas/visualg.d.ts +60 -60
  280. package/fontes/lexador/dialetos/palavras-reservadas/visualg.js +65 -65
  281. package/fontes/lexador/dialetos/pragma.d.ts +8 -8
  282. package/fontes/lexador/dialetos/pragma.js +2 -2
  283. package/fontes/lexador/erro-lexador.d.ts +5 -5
  284. package/fontes/lexador/erro-lexador.js +2 -2
  285. package/fontes/lexador/index.d.ts +2 -2
  286. package/fontes/lexador/index.js +18 -18
  287. package/fontes/lexador/lexador-base-linha-unica.d.ts +28 -28
  288. package/fontes/lexador/lexador-base-linha-unica.js +82 -82
  289. package/fontes/lexador/lexador-base.d.ts +41 -41
  290. package/fontes/lexador/lexador-base.js +112 -112
  291. package/fontes/lexador/lexador.d.ts +43 -43
  292. package/fontes/lexador/lexador.js +412 -412
  293. package/fontes/lexador/palavras-reservadas.d.ts +36 -36
  294. package/fontes/lexador/palavras-reservadas.js +41 -41
  295. package/fontes/lexador/simbolo.d.ts +10 -10
  296. package/fontes/lexador/simbolo.js +16 -16
  297. package/fontes/quebras/index.d.ts +10 -10
  298. package/fontes/quebras/index.js +19 -19
  299. package/fontes/tipos-de-simbolos/birl.d.ts +71 -71
  300. package/fontes/tipos-de-simbolos/birl.js +78 -78
  301. package/fontes/tipos-de-simbolos/comum.d.ts +22 -22
  302. package/fontes/tipos-de-simbolos/comum.js +23 -23
  303. package/fontes/tipos-de-simbolos/delegua.d.ts +80 -80
  304. package/fontes/tipos-de-simbolos/delegua.js +81 -81
  305. package/fontes/tipos-de-simbolos/egua-classico.d.ts +77 -77
  306. package/fontes/tipos-de-simbolos/egua-classico.js +78 -78
  307. package/fontes/tipos-de-simbolos/eguap.d.ts +73 -73
  308. package/fontes/tipos-de-simbolos/eguap.js +74 -74
  309. package/fontes/tipos-de-simbolos/guarani.d.ts +14 -14
  310. package/fontes/tipos-de-simbolos/guarani.js +15 -15
  311. package/fontes/tipos-de-simbolos/portugol-ipt.d.ts +28 -28
  312. package/fontes/tipos-de-simbolos/portugol-ipt.js +29 -29
  313. package/fontes/tipos-de-simbolos/portugol-studio.d.ts +53 -53
  314. package/fontes/tipos-de-simbolos/portugol-studio.js +54 -54
  315. package/fontes/tipos-de-simbolos/rantiaquin.d.ts +2 -2
  316. package/fontes/tipos-de-simbolos/rantiaquin.js +3 -3
  317. package/fontes/tipos-de-simbolos/visualg.d.ts +68 -68
  318. package/fontes/tipos-de-simbolos/visualg.js +69 -69
  319. package/fontes/tradutores/dicionarios/dicionario-delegua-javascript.d.ts +2 -2
  320. package/fontes/tradutores/dicionarios/dicionario-delegua-javascript.js +10 -10
  321. package/fontes/tradutores/dicionarios/index.d.ts +1 -1
  322. package/fontes/tradutores/dicionarios/index.js +17 -17
  323. package/fontes/tradutores/index.d.ts +2 -2
  324. package/fontes/tradutores/index.js +18 -18
  325. package/fontes/tradutores/python/python3-lexer.d.ts +152 -152
  326. package/fontes/tradutores/python/python3-lexer.js +1226 -1226
  327. package/fontes/tradutores/python/python3-listener.d.ts +953 -953
  328. package/fontes/tradutores/python/python3-listener.js +2 -2
  329. package/fontes/tradutores/python/python3-parser.d.ts +1330 -1330
  330. package/fontes/tradutores/python/python3-parser.js +11156 -11156
  331. package/fontes/tradutores/python/python3-visitor.d.ts +612 -612
  332. package/fontes/tradutores/python/python3-visitor.js +2 -2
  333. package/fontes/tradutores/tradutor-javascript.d.ts +83 -83
  334. package/fontes/tradutores/tradutor-javascript.js +470 -470
  335. package/fontes/tradutores/tradutor-python.d.ts +1 -1
  336. package/fontes/tradutores/tradutor-python.js +34 -34
  337. package/fontes/tradutores/tradutor-reverso-javascript.d.ts +47 -47
  338. package/fontes/tradutores/tradutor-reverso-javascript.js +342 -342
  339. package/index.d.ts +5 -5
  340. package/index.js +23 -23
  341. package/package.json +88 -88
@@ -1,316 +1,316 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const excecoes_1 = require("../excecoes");
4
- const objeto_delegua_classe_1 = require("../estruturas/objeto-delegua-classe");
5
- const funcao_padrao_1 = require("../estruturas/funcao-padrao");
6
- const delegua_classe_1 = require("../estruturas/delegua-classe");
7
- const estruturas_1 = require("../estruturas");
8
- function default_1(interpretador, pilhaEscoposExecucao) {
9
- const todosEmCondicao = async function (vetor, funcaoCondicional) {
10
- if (vetor === null || vetor === undefined)
11
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função todosEmCondicao() não pode ser nulo.'));
12
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
13
- const valorFuncaoCondicional = funcaoCondicional.hasOwnProperty('valor')
14
- ? funcaoCondicional.valor
15
- : funcaoCondicional;
16
- if (!Array.isArray(valorVetor)) {
17
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função todosEmCondicao() deve ser um vetor.'));
18
- }
19
- if (valorFuncaoCondicional.constructor.name !== 'DeleguaFuncao') {
20
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função todosEmCondicao() deve ser uma função.'));
21
- }
22
- for (let indice = 0; indice < valorVetor.length; ++indice) {
23
- if (!(await valorFuncaoCondicional.chamar(interpretador, [valorVetor[indice]])))
24
- return false;
25
- }
26
- return true;
27
- };
28
- // Retorna um número aleatório entre 0 e 1.
29
- pilhaEscoposExecucao.definirVariavel('aleatorio', new funcao_padrao_1.FuncaoPadrao(1, function () {
30
- return Math.random();
31
- }));
32
- // Retorna um número aleatório de acordo com o parâmetro passado.
33
- // Mínimo(inclusivo) - Máximo(exclusivo)
34
- pilhaEscoposExecucao.definirVariavel('aleatorioEntre', new funcao_padrao_1.FuncaoPadrao(1, async function (minimo, maximo) {
35
- // eslint-disable-next-line prefer-rest-params
36
- if (!arguments[0]) {
37
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'A função recebe ao menos um parâmetro.'));
38
- }
39
- const valorMinimo = minimo.hasOwnProperty('valor') ? minimo.valor : minimo;
40
- if (arguments.length === 1) {
41
- if (typeof valorMinimo !== 'number') {
42
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'O parâmetro deve ser um número.'));
43
- }
44
- return Math.floor(Math.random() * (0 - valorMinimo)) + valorMinimo;
45
- }
46
- if (arguments.length > 2) {
47
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'A quantidade de parâmetros máxima para esta função é 2.'));
48
- }
49
- const valorMaximo = maximo.hasOwnProperty('valor') ? maximo.valor : maximo;
50
- if (typeof valorMinimo !== 'number' || typeof valorMaximo !== 'number') {
51
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Os dois parâmetros devem ser do tipo número.'));
52
- }
53
- return Promise.resolve(Math.floor(Math.random() * (valorMaximo - valorMinimo)) + valorMinimo);
54
- }));
55
- pilhaEscoposExecucao.definirVariavel('algum', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, funcaoPesquisa) {
56
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
57
- const valorFuncaoPesquisa = funcaoPesquisa.hasOwnProperty('valor') ? funcaoPesquisa.valor : funcaoPesquisa;
58
- if (!Array.isArray(valorVetor)) {
59
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
60
- }
61
- if (valorFuncaoPesquisa.constructor.name !== 'DeleguaFuncao') {
62
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
63
- }
64
- for (let indice = 0; indice < valorVetor.length; ++indice) {
65
- if (await valorFuncaoPesquisa.chamar(interpretador, [valorVetor[indice]])) {
66
- return true;
67
- }
68
- }
69
- return false;
70
- }));
71
- pilhaEscoposExecucao.definirVariavel('encontrar', new funcao_padrao_1.FuncaoPadrao(1, async function (vetor, funcaoPesquisa) {
72
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
73
- const valorFuncaoPesquisa = funcaoPesquisa.hasOwnProperty('valor') ? funcaoPesquisa.valor : funcaoPesquisa;
74
- if (!Array.isArray(valorVetor)) {
75
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
76
- }
77
- if (valorFuncaoPesquisa.constructor.name !== 'DeleguaFuncao') {
78
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
79
- }
80
- for (let indice = 0; indice < valorVetor.length; ++indice) {
81
- if (await valorFuncaoPesquisa.chamar(interpretador, [valorVetor[indice]])) {
82
- return valorVetor[indice];
83
- }
84
- }
85
- return null;
86
- }));
87
- pilhaEscoposExecucao.definirVariavel('encontrarUltimo', new funcao_padrao_1.FuncaoPadrao(1, async function (vetor, funcaoPesquisa) {
88
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
89
- const valorFuncaoPesquisa = funcaoPesquisa.hasOwnProperty('valor') ? funcaoPesquisa.valor : funcaoPesquisa;
90
- if (!Array.isArray(valorVetor)) {
91
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
92
- }
93
- if (valorFuncaoPesquisa.constructor.name !== 'DeleguaFuncao') {
94
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
95
- }
96
- for (let indice = valorVetor.length - 1; indice >= 0; --indice) {
97
- if (await valorFuncaoPesquisa.chamar(interpretador, [valorVetor[indice]])) {
98
- return valorVetor[indice];
99
- }
100
- }
101
- }));
102
- pilhaEscoposExecucao.definirVariavel('encontrarIndice', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, funcaoPesquisa) {
103
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
104
- const valorFuncaoPesquisa = funcaoPesquisa.hasOwnProperty('valor') ? funcaoPesquisa.valor : funcaoPesquisa;
105
- if (!Array.isArray(valorVetor)) {
106
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
107
- }
108
- if (valorFuncaoPesquisa.constructor.name !== 'DeleguaFuncao') {
109
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
110
- }
111
- for (let indice = 0; indice < valorVetor.length; ++indice) {
112
- if (await valorFuncaoPesquisa.chamar(interpretador, [valorVetor[indice]])) {
113
- return indice;
114
- }
115
- }
116
- return -1;
117
- }));
118
- pilhaEscoposExecucao.definirVariavel('encontrarUltimoIndice', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, funcaoPesquisa) {
119
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
120
- const valorFuncaoPesquisa = funcaoPesquisa.hasOwnProperty('valor') ? funcaoPesquisa.valor : funcaoPesquisa;
121
- if (!Array.isArray(valorVetor)) {
122
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
123
- }
124
- if (valorFuncaoPesquisa.constructor.name !== 'DeleguaFuncao') {
125
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
126
- }
127
- for (let indice = valorVetor.length - 1; indice >= 0; --indice) {
128
- if (await valorFuncaoPesquisa.chamar(interpretador, [valorVetor[indice]])) {
129
- return indice;
130
- }
131
- }
132
- }));
133
- pilhaEscoposExecucao.definirVariavel('incluido', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, valor) {
134
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
135
- const valorValor = valor.hasOwnProperty('valor') ? valor.valor : valor;
136
- if (!Array.isArray(valorVetor)) {
137
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
138
- }
139
- for (let indice = 0; indice < valorVetor.length; ++indice) {
140
- if (valorVetor[indice] == valorValor) {
141
- return true;
142
- }
143
- }
144
- return false;
145
- }));
146
- pilhaEscoposExecucao.definirVariavel('inteiro', new funcao_padrao_1.FuncaoPadrao(1, async function (numero) {
147
- if (numero === null || numero === undefined)
148
- return Promise.resolve(0);
149
- const valor = numero.hasOwnProperty('valor') ? numero.valor : numero;
150
- if (isNaN(valor)) {
151
- return Promise.reject(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.'));
152
- }
153
- if (!/^(-)?\d+(\.\d+)?$/.test(valor)) {
154
- return Promise.reject(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.'));
155
- }
156
- return Promise.resolve(parseInt(valor));
157
- }));
158
- pilhaEscoposExecucao.definirVariavel('mapear', new funcao_padrao_1.FuncaoPadrao(1, async function (vetor, funcaoMapeamento) {
159
- if (vetor === null || vetor === undefined)
160
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função mapear() não pode ser nulo.'));
161
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
162
- const valorFuncaoMapeamento = funcaoMapeamento.hasOwnProperty('valor')
163
- ? funcaoMapeamento.valor
164
- : funcaoMapeamento;
165
- if (!Array.isArray(valorVetor)) {
166
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função mapear() deve ser um vetor.'));
167
- }
168
- if (valorFuncaoMapeamento.constructor.name !== 'DeleguaFuncao') {
169
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função mapear() deve ser uma função.'));
170
- }
171
- const resultados = [];
172
- for (let indice = 0; indice < valorVetor.length; ++indice) {
173
- resultados.push(await valorFuncaoMapeamento.chamar(interpretador, [valorVetor[indice]]));
174
- }
175
- return resultados;
176
- }));
177
- pilhaEscoposExecucao.definirVariavel('todos', new funcao_padrao_1.FuncaoPadrao(2, todosEmCondicao));
178
- pilhaEscoposExecucao.definirVariavel('todosEmCondicao', new funcao_padrao_1.FuncaoPadrao(2, todosEmCondicao));
179
- pilhaEscoposExecucao.definirVariavel('filtrarPor', new funcao_padrao_1.FuncaoPadrao(1, async function (vetor, funcaoFiltragem) {
180
- if (vetor === null || vetor === undefined)
181
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função filtrarPor() não pode ser nulo.'));
182
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
183
- const valorFuncaoFiltragem = funcaoFiltragem.hasOwnProperty('valor')
184
- ? funcaoFiltragem.valor
185
- : funcaoFiltragem;
186
- if (!Array.isArray(valorVetor)) {
187
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função filtrarPor() deve ser um vetor.'));
188
- }
189
- if (valorFuncaoFiltragem.constructor.name !== 'DeleguaFuncao') {
190
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função filtrarPor() deve ser uma função.'));
191
- }
192
- const resultados = [];
193
- for (let indice = 0; indice < valorVetor.length; ++indice) {
194
- (await valorFuncaoFiltragem.chamar(interpretador, [valorVetor[indice]])) &&
195
- resultados.push(await valorFuncaoFiltragem.chamar(interpretador, [valorVetor[indice]]));
196
- }
197
- return resultados;
198
- }));
199
- pilhaEscoposExecucao.definirVariavel('primeiroEmCondicao', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, funcaoFiltragem) {
200
- if (vetor === null || vetor === undefined)
201
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função primeiroEmCondicao() não pode ser nulo.'));
202
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
203
- const valorFuncaoFiltragem = funcaoFiltragem.hasOwnProperty('valor')
204
- ? funcaoFiltragem.valor
205
- : funcaoFiltragem;
206
- if (!Array.isArray(valorVetor)) {
207
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função primeiroEmCondicao() deve ser um vetor.'));
208
- }
209
- if (valorFuncaoFiltragem.constructor.name !== 'DeleguaFuncao') {
210
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função primeiroEmCondicao() deve ser uma função.'));
211
- }
212
- const resultados = [];
213
- for (let indice = 0; indice < valorVetor.length; ++indice) {
214
- (await valorFuncaoFiltragem.chamar(interpretador, [valorVetor[indice]])) &&
215
- resultados.push(await valorFuncaoFiltragem.chamar(interpretador, [valorVetor[indice]]));
216
- }
217
- return resultados[0];
218
- }));
219
- pilhaEscoposExecucao.definirVariavel('paraCada', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, funcaoFiltragem) {
220
- if (vetor === null || vetor === undefined)
221
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função paraCada() não pode ser nulo.'));
222
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
223
- const valorFuncaoFiltragem = funcaoFiltragem.hasOwnProperty('valor')
224
- ? funcaoFiltragem.valor
225
- : funcaoFiltragem;
226
- if (!Array.isArray(valorVetor)) {
227
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função paraCada() deve ser um vetor.'));
228
- }
229
- if (valorFuncaoFiltragem.constructor.name !== 'DeleguaFuncao') {
230
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função paraCada() deve ser uma função.'));
231
- }
232
- for (let indice = 0; indice < valorVetor.length; ++indice) {
233
- await valorFuncaoFiltragem.chamar(interpretador, [valorVetor[indice]]);
234
- }
235
- }));
236
- pilhaEscoposExecucao.definirVariavel('ordenar', new funcao_padrao_1.FuncaoPadrao(1, async function (vetor) {
237
- if (vetor === null || vetor === undefined)
238
- throw new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função ordenar() não pode ser nulo.');
239
- const objeto = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
240
- if (!Array.isArray(objeto)) {
241
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Valor inválido. Objeto inserido não é um vetor.'));
242
- }
243
- let trocado;
244
- const tamanho = objeto.length;
245
- do {
246
- trocado = false;
247
- for (let i = 0; i < tamanho - 1; i++) {
248
- if (objeto[i] > objeto[i + 1]) {
249
- [objeto[i], objeto[i + 1]] = [objeto[i + 1], objeto[i]];
250
- trocado = true;
251
- }
252
- }
253
- } while (trocado);
254
- return Promise.resolve(objeto);
255
- }));
256
- pilhaEscoposExecucao.definirVariavel('real', new funcao_padrao_1.FuncaoPadrao(1, async function (numero) {
257
- if (numero === null || numero === undefined)
258
- return Promise.resolve(parseFloat('0'));
259
- const valor = numero.hasOwnProperty('valor') ? numero.valor : numero;
260
- if (!/^(-)?\d+(\.\d+)?$/.test(valor)) {
261
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Valor não parece estar estruturado como um número (texto/valor vazio, falso ou não definido). Somente números ou textos com números podem ser convertidos para real.'));
262
- }
263
- return Promise.resolve(parseFloat(valor));
264
- }));
265
- pilhaEscoposExecucao.definirVariavel('reduzir', new funcao_padrao_1.FuncaoPadrao(3, async function (vetor, funcaoReducao, padrao = null) {
266
- const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
267
- const valorFuncaoReducao = funcaoReducao.hasOwnProperty('valor') ? funcaoReducao.valor : funcaoReducao;
268
- const valorPadrao = padrao.hasOwnProperty('valor') ? padrao.valor : padrao;
269
- if (!Array.isArray(valorVetor)) {
270
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
271
- }
272
- if (valorFuncaoReducao.constructor.name !== 'DeleguaFuncao') {
273
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
274
- }
275
- let resultado = valorPadrao;
276
- let inicio = 0;
277
- if (!resultado) {
278
- resultado = vetor[0];
279
- inicio = 1;
280
- }
281
- for (let index = inicio; index < vetor.length; ++index) {
282
- resultado = await valorFuncaoReducao.chamar(interpretador, [resultado, vetor[index]]);
283
- }
284
- return resultado;
285
- }));
286
- pilhaEscoposExecucao.definirVariavel('tamanho', new funcao_padrao_1.FuncaoPadrao(1, async function (objeto) {
287
- const valorObjeto = objeto.hasOwnProperty('valor') ? objeto.valor : objeto;
288
- if (typeof valorObjeto === 'number') {
289
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Função global tamanho() não funciona com números.'));
290
- }
291
- if (valorObjeto instanceof objeto_delegua_classe_1.ObjetoDeleguaClasse) {
292
- return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Função global tamanho não funciona com objetos complexos.'));
293
- }
294
- if (valorObjeto instanceof estruturas_1.DeleguaFuncao) {
295
- return Promise.resolve(valorObjeto.declaracao.parametros.length);
296
- }
297
- if (valorObjeto instanceof funcao_padrao_1.FuncaoPadrao) {
298
- return Promise.resolve(valorObjeto.valorAridade);
299
- }
300
- if (valorObjeto instanceof delegua_classe_1.DeleguaClasse) {
301
- const metodos = valorObjeto.metodos;
302
- let tamanho = 0;
303
- if (metodos.inicializacao && metodos.inicializacao.eInicializador) {
304
- tamanho = metodos.inicializacao.declaracao.parametros.length;
305
- }
306
- return Promise.resolve(tamanho);
307
- }
308
- return Promise.resolve(valorObjeto.length);
309
- }));
310
- pilhaEscoposExecucao.definirVariavel('texto', new funcao_padrao_1.FuncaoPadrao(1, async function (valorOuVariavel) {
311
- return Promise.resolve(`${valorOuVariavel.hasOwnProperty('valor') ? valorOuVariavel.valor : valorOuVariavel}`);
312
- }));
313
- return pilhaEscoposExecucao;
314
- }
315
- exports.default = default_1;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const excecoes_1 = require("../excecoes");
4
+ const objeto_delegua_classe_1 = require("../estruturas/objeto-delegua-classe");
5
+ const funcao_padrao_1 = require("../estruturas/funcao-padrao");
6
+ const delegua_classe_1 = require("../estruturas/delegua-classe");
7
+ const estruturas_1 = require("../estruturas");
8
+ function default_1(interpretador, pilhaEscoposExecucao) {
9
+ const todosEmCondicao = async function (vetor, funcaoCondicional) {
10
+ if (vetor === null || vetor === undefined)
11
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função todosEmCondicao() não pode ser nulo.'));
12
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
13
+ const valorFuncaoCondicional = funcaoCondicional.hasOwnProperty('valor')
14
+ ? funcaoCondicional.valor
15
+ : funcaoCondicional;
16
+ if (!Array.isArray(valorVetor)) {
17
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função todosEmCondicao() deve ser um vetor.'));
18
+ }
19
+ if (valorFuncaoCondicional.constructor.name !== 'DeleguaFuncao') {
20
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função todosEmCondicao() deve ser uma função.'));
21
+ }
22
+ for (let indice = 0; indice < valorVetor.length; ++indice) {
23
+ if (!(await valorFuncaoCondicional.chamar(interpretador, [valorVetor[indice]])))
24
+ return false;
25
+ }
26
+ return true;
27
+ };
28
+ // Retorna um número aleatório entre 0 e 1.
29
+ pilhaEscoposExecucao.definirVariavel('aleatorio', new funcao_padrao_1.FuncaoPadrao(1, function () {
30
+ return Math.random();
31
+ }));
32
+ // Retorna um número aleatório de acordo com o parâmetro passado.
33
+ // Mínimo(inclusivo) - Máximo(exclusivo)
34
+ pilhaEscoposExecucao.definirVariavel('aleatorioEntre', new funcao_padrao_1.FuncaoPadrao(1, async function (minimo, maximo) {
35
+ // eslint-disable-next-line prefer-rest-params
36
+ if (!arguments[0]) {
37
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'A função recebe ao menos um parâmetro.'));
38
+ }
39
+ const valorMinimo = minimo.hasOwnProperty('valor') ? minimo.valor : minimo;
40
+ if (arguments.length === 1) {
41
+ if (typeof valorMinimo !== 'number') {
42
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'O parâmetro deve ser um número.'));
43
+ }
44
+ return Math.floor(Math.random() * (0 - valorMinimo)) + valorMinimo;
45
+ }
46
+ if (arguments.length > 2) {
47
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'A quantidade de parâmetros máxima para esta função é 2.'));
48
+ }
49
+ const valorMaximo = maximo.hasOwnProperty('valor') ? maximo.valor : maximo;
50
+ if (typeof valorMinimo !== 'number' || typeof valorMaximo !== 'number') {
51
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Os dois parâmetros devem ser do tipo número.'));
52
+ }
53
+ return Promise.resolve(Math.floor(Math.random() * (valorMaximo - valorMinimo)) + valorMinimo);
54
+ }));
55
+ pilhaEscoposExecucao.definirVariavel('algum', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, funcaoPesquisa) {
56
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
57
+ const valorFuncaoPesquisa = funcaoPesquisa.hasOwnProperty('valor') ? funcaoPesquisa.valor : funcaoPesquisa;
58
+ if (!Array.isArray(valorVetor)) {
59
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
60
+ }
61
+ if (valorFuncaoPesquisa.constructor.name !== 'DeleguaFuncao') {
62
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
63
+ }
64
+ for (let indice = 0; indice < valorVetor.length; ++indice) {
65
+ if (await valorFuncaoPesquisa.chamar(interpretador, [valorVetor[indice]])) {
66
+ return true;
67
+ }
68
+ }
69
+ return false;
70
+ }));
71
+ pilhaEscoposExecucao.definirVariavel('encontrar', new funcao_padrao_1.FuncaoPadrao(1, async function (vetor, funcaoPesquisa) {
72
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
73
+ const valorFuncaoPesquisa = funcaoPesquisa.hasOwnProperty('valor') ? funcaoPesquisa.valor : funcaoPesquisa;
74
+ if (!Array.isArray(valorVetor)) {
75
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
76
+ }
77
+ if (valorFuncaoPesquisa.constructor.name !== 'DeleguaFuncao') {
78
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
79
+ }
80
+ for (let indice = 0; indice < valorVetor.length; ++indice) {
81
+ if (await valorFuncaoPesquisa.chamar(interpretador, [valorVetor[indice]])) {
82
+ return valorVetor[indice];
83
+ }
84
+ }
85
+ return null;
86
+ }));
87
+ pilhaEscoposExecucao.definirVariavel('encontrarUltimo', new funcao_padrao_1.FuncaoPadrao(1, async function (vetor, funcaoPesquisa) {
88
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
89
+ const valorFuncaoPesquisa = funcaoPesquisa.hasOwnProperty('valor') ? funcaoPesquisa.valor : funcaoPesquisa;
90
+ if (!Array.isArray(valorVetor)) {
91
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
92
+ }
93
+ if (valorFuncaoPesquisa.constructor.name !== 'DeleguaFuncao') {
94
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
95
+ }
96
+ for (let indice = valorVetor.length - 1; indice >= 0; --indice) {
97
+ if (await valorFuncaoPesquisa.chamar(interpretador, [valorVetor[indice]])) {
98
+ return valorVetor[indice];
99
+ }
100
+ }
101
+ }));
102
+ pilhaEscoposExecucao.definirVariavel('encontrarIndice', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, funcaoPesquisa) {
103
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
104
+ const valorFuncaoPesquisa = funcaoPesquisa.hasOwnProperty('valor') ? funcaoPesquisa.valor : funcaoPesquisa;
105
+ if (!Array.isArray(valorVetor)) {
106
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
107
+ }
108
+ if (valorFuncaoPesquisa.constructor.name !== 'DeleguaFuncao') {
109
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
110
+ }
111
+ for (let indice = 0; indice < valorVetor.length; ++indice) {
112
+ if (await valorFuncaoPesquisa.chamar(interpretador, [valorVetor[indice]])) {
113
+ return indice;
114
+ }
115
+ }
116
+ return -1;
117
+ }));
118
+ pilhaEscoposExecucao.definirVariavel('encontrarUltimoIndice', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, funcaoPesquisa) {
119
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
120
+ const valorFuncaoPesquisa = funcaoPesquisa.hasOwnProperty('valor') ? funcaoPesquisa.valor : funcaoPesquisa;
121
+ if (!Array.isArray(valorVetor)) {
122
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
123
+ }
124
+ if (valorFuncaoPesquisa.constructor.name !== 'DeleguaFuncao') {
125
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
126
+ }
127
+ for (let indice = valorVetor.length - 1; indice >= 0; --indice) {
128
+ if (await valorFuncaoPesquisa.chamar(interpretador, [valorVetor[indice]])) {
129
+ return indice;
130
+ }
131
+ }
132
+ }));
133
+ pilhaEscoposExecucao.definirVariavel('incluido', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, valor) {
134
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
135
+ const valorValor = valor.hasOwnProperty('valor') ? valor.valor : valor;
136
+ if (!Array.isArray(valorVetor)) {
137
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
138
+ }
139
+ for (let indice = 0; indice < valorVetor.length; ++indice) {
140
+ if (valorVetor[indice] == valorValor) {
141
+ return true;
142
+ }
143
+ }
144
+ return false;
145
+ }));
146
+ pilhaEscoposExecucao.definirVariavel('inteiro', new funcao_padrao_1.FuncaoPadrao(1, async function (numero) {
147
+ if (numero === null || numero === undefined)
148
+ return Promise.resolve(0);
149
+ const valor = numero.hasOwnProperty('valor') ? numero.valor : numero;
150
+ if (isNaN(valor)) {
151
+ return Promise.reject(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.'));
152
+ }
153
+ if (!/^(-)?\d+(\.\d+)?$/.test(valor)) {
154
+ return Promise.reject(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.'));
155
+ }
156
+ return Promise.resolve(parseInt(valor));
157
+ }));
158
+ pilhaEscoposExecucao.definirVariavel('mapear', new funcao_padrao_1.FuncaoPadrao(1, async function (vetor, funcaoMapeamento) {
159
+ if (vetor === null || vetor === undefined)
160
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função mapear() não pode ser nulo.'));
161
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
162
+ const valorFuncaoMapeamento = funcaoMapeamento.hasOwnProperty('valor')
163
+ ? funcaoMapeamento.valor
164
+ : funcaoMapeamento;
165
+ if (!Array.isArray(valorVetor)) {
166
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função mapear() deve ser um vetor.'));
167
+ }
168
+ if (valorFuncaoMapeamento.constructor.name !== 'DeleguaFuncao') {
169
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função mapear() deve ser uma função.'));
170
+ }
171
+ const resultados = [];
172
+ for (let indice = 0; indice < valorVetor.length; ++indice) {
173
+ resultados.push(await valorFuncaoMapeamento.chamar(interpretador, [valorVetor[indice]]));
174
+ }
175
+ return resultados;
176
+ }));
177
+ pilhaEscoposExecucao.definirVariavel('todos', new funcao_padrao_1.FuncaoPadrao(2, todosEmCondicao));
178
+ pilhaEscoposExecucao.definirVariavel('todosEmCondicao', new funcao_padrao_1.FuncaoPadrao(2, todosEmCondicao));
179
+ pilhaEscoposExecucao.definirVariavel('filtrarPor', new funcao_padrao_1.FuncaoPadrao(1, async function (vetor, funcaoFiltragem) {
180
+ if (vetor === null || vetor === undefined)
181
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função filtrarPor() não pode ser nulo.'));
182
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
183
+ const valorFuncaoFiltragem = funcaoFiltragem.hasOwnProperty('valor')
184
+ ? funcaoFiltragem.valor
185
+ : funcaoFiltragem;
186
+ if (!Array.isArray(valorVetor)) {
187
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função filtrarPor() deve ser um vetor.'));
188
+ }
189
+ if (valorFuncaoFiltragem.constructor.name !== 'DeleguaFuncao') {
190
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função filtrarPor() deve ser uma função.'));
191
+ }
192
+ const resultados = [];
193
+ for (let indice = 0; indice < valorVetor.length; ++indice) {
194
+ (await valorFuncaoFiltragem.chamar(interpretador, [valorVetor[indice]])) &&
195
+ resultados.push(await valorFuncaoFiltragem.chamar(interpretador, [valorVetor[indice]]));
196
+ }
197
+ return resultados;
198
+ }));
199
+ pilhaEscoposExecucao.definirVariavel('primeiroEmCondicao', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, funcaoFiltragem) {
200
+ if (vetor === null || vetor === undefined)
201
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função primeiroEmCondicao() não pode ser nulo.'));
202
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
203
+ const valorFuncaoFiltragem = funcaoFiltragem.hasOwnProperty('valor')
204
+ ? funcaoFiltragem.valor
205
+ : funcaoFiltragem;
206
+ if (!Array.isArray(valorVetor)) {
207
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função primeiroEmCondicao() deve ser um vetor.'));
208
+ }
209
+ if (valorFuncaoFiltragem.constructor.name !== 'DeleguaFuncao') {
210
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função primeiroEmCondicao() deve ser uma função.'));
211
+ }
212
+ const resultados = [];
213
+ for (let indice = 0; indice < valorVetor.length; ++indice) {
214
+ (await valorFuncaoFiltragem.chamar(interpretador, [valorVetor[indice]])) &&
215
+ resultados.push(await valorFuncaoFiltragem.chamar(interpretador, [valorVetor[indice]]));
216
+ }
217
+ return resultados[0];
218
+ }));
219
+ pilhaEscoposExecucao.definirVariavel('paraCada', new funcao_padrao_1.FuncaoPadrao(2, async function (vetor, funcaoFiltragem) {
220
+ if (vetor === null || vetor === undefined)
221
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função paraCada() não pode ser nulo.'));
222
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
223
+ const valorFuncaoFiltragem = funcaoFiltragem.hasOwnProperty('valor')
224
+ ? funcaoFiltragem.valor
225
+ : funcaoFiltragem;
226
+ if (!Array.isArray(valorVetor)) {
227
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função paraCada() deve ser um vetor.'));
228
+ }
229
+ if (valorFuncaoFiltragem.constructor.name !== 'DeleguaFuncao') {
230
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função paraCada() deve ser uma função.'));
231
+ }
232
+ for (let indice = 0; indice < valorVetor.length; ++indice) {
233
+ await valorFuncaoFiltragem.chamar(interpretador, [valorVetor[indice]]);
234
+ }
235
+ }));
236
+ pilhaEscoposExecucao.definirVariavel('ordenar', new funcao_padrao_1.FuncaoPadrao(1, async function (vetor) {
237
+ if (vetor === null || vetor === undefined)
238
+ throw new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função ordenar() não pode ser nulo.');
239
+ const objeto = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
240
+ if (!Array.isArray(objeto)) {
241
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Valor inválido. Objeto inserido não é um vetor.'));
242
+ }
243
+ let trocado;
244
+ const tamanho = objeto.length;
245
+ do {
246
+ trocado = false;
247
+ for (let i = 0; i < tamanho - 1; i++) {
248
+ if (objeto[i] > objeto[i + 1]) {
249
+ [objeto[i], objeto[i + 1]] = [objeto[i + 1], objeto[i]];
250
+ trocado = true;
251
+ }
252
+ }
253
+ } while (trocado);
254
+ return Promise.resolve(objeto);
255
+ }));
256
+ pilhaEscoposExecucao.definirVariavel('real', new funcao_padrao_1.FuncaoPadrao(1, async function (numero) {
257
+ if (numero === null || numero === undefined)
258
+ return Promise.resolve(parseFloat('0'));
259
+ const valor = numero.hasOwnProperty('valor') ? numero.valor : numero;
260
+ if (!/^(-)?\d+(\.\d+)?$/.test(valor)) {
261
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Valor não parece estar estruturado como um número (texto/valor vazio, falso ou não definido). Somente números ou textos com números podem ser convertidos para real.'));
262
+ }
263
+ return Promise.resolve(parseFloat(valor));
264
+ }));
265
+ pilhaEscoposExecucao.definirVariavel('reduzir', new funcao_padrao_1.FuncaoPadrao(3, async function (vetor, funcaoReducao, padrao = null) {
266
+ const valorVetor = vetor.hasOwnProperty('valor') ? vetor.valor : vetor;
267
+ const valorFuncaoReducao = funcaoReducao.hasOwnProperty('valor') ? funcaoReducao.valor : funcaoReducao;
268
+ const valorPadrao = padrao.hasOwnProperty('valor') ? padrao.valor : padrao;
269
+ if (!Array.isArray(valorVetor)) {
270
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O primeiro parâmetro da função deve ser um vetor.'));
271
+ }
272
+ if (valorFuncaoReducao.constructor.name !== 'DeleguaFuncao') {
273
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Parâmetro inválido. O segundo parâmetro da função deve ser uma função.'));
274
+ }
275
+ let resultado = valorPadrao;
276
+ let inicio = 0;
277
+ if (!resultado) {
278
+ resultado = vetor[0];
279
+ inicio = 1;
280
+ }
281
+ for (let index = inicio; index < vetor.length; ++index) {
282
+ resultado = await valorFuncaoReducao.chamar(interpretador, [resultado, vetor[index]]);
283
+ }
284
+ return resultado;
285
+ }));
286
+ pilhaEscoposExecucao.definirVariavel('tamanho', new funcao_padrao_1.FuncaoPadrao(1, async function (objeto) {
287
+ const valorObjeto = objeto.hasOwnProperty('valor') ? objeto.valor : objeto;
288
+ if (typeof valorObjeto === 'number') {
289
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Função global tamanho() não funciona com números.'));
290
+ }
291
+ if (valorObjeto instanceof objeto_delegua_classe_1.ObjetoDeleguaClasse) {
292
+ return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao(this.simbolo, 'Função global tamanho não funciona com objetos complexos.'));
293
+ }
294
+ if (valorObjeto instanceof estruturas_1.DeleguaFuncao) {
295
+ return Promise.resolve(valorObjeto.declaracao.parametros.length);
296
+ }
297
+ if (valorObjeto instanceof funcao_padrao_1.FuncaoPadrao) {
298
+ return Promise.resolve(valorObjeto.valorAridade);
299
+ }
300
+ if (valorObjeto instanceof delegua_classe_1.DeleguaClasse) {
301
+ const metodos = valorObjeto.metodos;
302
+ let tamanho = 0;
303
+ if (metodos.inicializacao && metodos.inicializacao.eInicializador) {
304
+ tamanho = metodos.inicializacao.declaracao.parametros.length;
305
+ }
306
+ return Promise.resolve(tamanho);
307
+ }
308
+ return Promise.resolve(valorObjeto.length);
309
+ }));
310
+ pilhaEscoposExecucao.definirVariavel('texto', new funcao_padrao_1.FuncaoPadrao(1, async function (valorOuVariavel) {
311
+ return Promise.resolve(`${valorOuVariavel.hasOwnProperty('valor') ? valorOuVariavel.valor : valorOuVariavel}`);
312
+ }));
313
+ return pilhaEscoposExecucao;
314
+ }
315
+ exports.default = default_1;
316
316
  //# sourceMappingURL=biblioteca-global.js.map