Page 1 of 1 1
Topic Options
#213766 - 2019-11-03 06:41 PM TranspilerKiX
AndreLuiz Online   content
Getting the hang of it

Registered: 2015-10-07
Posts: 84
Loc: Brasil, João pessoa
[PtBr]
À uma semana atrás fiquei pensando como seria bom utilizar o KiXtart com algumas características de sintaxe.
Então agora nesta folga eu desenvolvi esse pequeno software.

[Eng(Translate)]
A week ago I wondered how good it would be to use KiXtart with some syntax features.
So now on this break I developed this little software.

ex:
 Code:
$i++
$x = 25
$i += $x
$h = "hello"
$h+= " word!"

Or
 Code:
$data = {
 "names",
  {"André", "Luiz"}
 "ages",
  {22, 23}
}
$data[1][1] ; Luiz
$data[3][1] ; 23

join($data[1], " - ") ; names
join($data[3], " - ") ; ages


[Pt-Br]
Bem, é isso tinha muito mais coisas que eu queria ter implementado, mas além de não ter tempo e não ter funcionado como eu queria eu acabei parando, mas o código está comentado. Se quiserem contribuir com o código pode também!

Se quiserem podem substituir o Kix32.exe por TranpilerKixRun.exe que vai ter o mesmo comportamento!


[Eng(Translate)]
Well, that's a lot more things I wanted to have implemented, but besides not having time and not working as I wanted I ended up stopping, but the code is commented. If you want to contribute code you can too!

If you want you can replace Kix32.exe with TranpilerKixRun.exe which will have the same behavior!



Attachments
TranpilerKiX.zip (2 downloads)
Description:




Edited by AndreLuiz (2019-11-05 06:30 PM)

Top
#213767 - 2019-11-03 08:38 PM Re: TranspilerKiX [Re: AndreLuiz]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4489
Loc: USA
This syntax is completely foreign to me. Could you post an example of what your code is actually doing?

What is your exe doing in relation to the kix32.exe?

Top
#213768 - 2019-11-03 10:47 PM Re: TranspilerKiX [Re: Allen]
AndreLuiz Online   content
Getting the hang of it

Registered: 2015-10-07
Posts: 84
Loc: Brasil, João pessoa
[Pt-Br]
Olá, vou explicar com um exemplo de fora.
Conhece o TypeScript?
Bem o TypeScript é uma abstração de javascript.
TypeScript compila o código .ts para .js(javascript).
E o TranspilerKiX compila o código .tkx para .kix

[Eng(Translate)]
Hello, I will explain with an outside example.
Know TypeScript?
Well TypeScript is a javascript abstraction.
TypeScript compiles the .ts code to .js (javascript).
And TranspilerKiX compiles the .tkx code to .kix
 Code:
while ($i < 5)
 $i++
loop


[Pt-Br]
Como sabemos essas sintaxe acima não faz o menor sentido para o KiXtart, mas através de um transpiler(translate + compile) eu torno isso possível.

E exatamente isso que ele faz pelo Kix32.exe.
Esse dois códigos abaixo funcionam normalmente com o TranpilerKiX:

[Eng(Translate)]
As we know these syntax above does not make any sense for KiXtart, but through a transpiler (translate + compile) I make it possible.

That's exactly what it does for Kix32.exe.
These two codes below usually work normally with TranpilerKiX:
 Code:
; Runs on Kix32.exe and TranpilerKiX.exe
$x = "Andre Luiz", "says", "Hello World"
join($x, " ")

 Code:
; Runs on TranpilerKiX.exe only. in kix32.exe as we know it will generate error
join({"Andre Luiz", "says", "Hello World"}, " ")


[Pt-Br]
Bem, é isso espero que tenha dado para vocês entenderem. Obrigado!

[Eng(Translate)]
Well, that's it I hope it gave you to understand. Thanks!

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 167 anonymous users online.
Newest Members
GBMicros, Jodey, Hiker, GTRoberts, KatieQuinn
17685 Registered Users

Generated in 0.141 seconds in which 0.108 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org