Getting Started
How to run example?
Download
Latest
Clone the repo
git clone https://github.com/LangTrans/LangTrans.gitor download source code in releases
Go to LangTrans Folder
Standalone (Alternate)
Go to releases and download latest executable
Create Source Code
Create a new file (filename.ext)
# Anonymous function
inc = (x) => x+1
# Lambda function
twice(x) = 2*x
# Print Done if x is defined other wise Failed
print((x||True)?"Done":"Failed")
# Single Line if and check x defined or not
print('x is not defined') if !x
# Pipe Syntax
1 -> inc
|> print
# Reverse Pipe
print<-inc<-inc<-1
# Arithmetic operations with functions
print((inc+twice)(3))
#Scope syntax work like in javascript
#scope1#
print("Scope1")
print("Done")
#scope2#
print("Scope2")
print("Done")Paste this code to filename.ext
Transpile Code
With YAML files
For source code
Standalone
With compiled syntax (Alternate Method)
Compile syntax
py.ltzwill be created
Generate code
filename.pywill be generated. It contain the transpiled code
Runfilename.py
Last updated
Was this helpful?