Barscript is a language interpreter for BarTerminal this extension helps coloring the syntax for the language file.
Features/Utilities
Barscript has some utilities that can create some stuff like
If statements
while loops
for loops
functions (builtin functions and other stuff)
classes (builtin classes)
License and Author
License: MIT License
Author: Max Jackson
Created with
This programming language is created with python.
Basic Documentation
Here is some example how to use the language.
# this is skipped
# Starting by creating a function
# Multiline function
FUN myfunction(myParams)
# Anything
PRINT(myParams)
END
# Online function
FUN myfunction(myparams) -> PRINT(myparams)
# Classes
CLASS MyClass
# Constructor
FUN MyClass(ClassParams)
# Add the class params to this table
VAR this.classParams = ClassParams
END
# Function inside a class
FUN MyFunction(myparams)
PRINT(this.classParams)
PRINT(myparams)
END
END
# VARIABLES
# String variable
VAR myvariable = "hi"
# While Loop
WHILE myvariable != "hello" THEN
PRINT("myvariable")
END
# For Loop
FUN join(elements, sperator)
VAR result = ""
VAR len = LEN(elements)
FOR i = 0 TO len THEN
VAR result = result + elements/i
IF i != len - 1 THEN VAR result = result + seperator
END
RETURN result
END
# IF Statements
# Example if statement of multiline
IF item1 != item2 THEN
PRINT(item1)
END
# Example if statement of oneline
IF item1 != item2 THEN PRINT(item1)