Skip to content

Yet another interpreted hobby programming language written in Rust

License

Notifications You must be signed in to change notification settings

LynithDev/yaipl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YAIPL - Yet Another Interpreted Programming Language

Written in Rust so its 🚀 blazingly fast 🚀


Types

YAIPL aims to be a dynamically typed language. Supported types are: Integer, Float, Boolean, String, Array.

Syntax and Keywords

Keyword Description
while Loop through a block of code as long as a specified condition is true
for Loop through a block of code a specified number of times
if Execute a block of code if a specified condition is true
return Explicitly return a value

Assignment

Creating and reassigning variables is done using the = operator.

# Assignining variables
my_variable = 5

# Reassigning variables
my_variable = 10

You can also create and REASSIGN functions using the = operator.

# Defining a function
my_function = (param) {
    param + 5 # Implicit return
}

# Reassigning a function
my_function = (param) {
    param * 5
}

# Calling the function
print(my_function(5)) # returns 25

Built-in Functions (Native Functions)

Function Description Returns
print(arg) Prints the value of the argument to the console "void"
println(arg) Same as print, but appends a '\n' at the end for a new line "void"
typeof(value) Returns the type of the value "int" | "float" | "bool" | "string" | "function" | "nfunction" | "void"

About

Yet another interpreted hobby programming language written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages