Skip to content

MasterZydra/ScriLa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScriLa

ScriLa is a scripting language that adopts a syntax reminiscent of Go and C++, and it compiles down to Bash.
The primary objective is to craft ScriLa in a manner that ensures intuitive usage. Furthermore, it aims to provide type safety similar to TypeScript's relationship with JavaScript.

Example

func calculateAge(int birthYear) int {
    return 2023 - birthYear;
}

str yearStr = input("Please enter your birth year:");

if (strIsInt(yearStr)) {
    int birthYear = strToInt(yearStr);
    printLn("Your age is", calculateAge(birthYear));
} else {
    printLn("The input '" + yearStr + "' was not a number");
}

Usage
To transpile a script written in ScriLa into a bash script, execute the following command:
> scrila -f myFileName.scri

The bash file will be named myFileName.scri.sh and will be placed in the same folder as the passed file.

Creation
The foundation of this project was created by following the playlist Build a Custom Scripting Language In Typescript by tylerlaceby. Afterwards it was extended with types, control structures and transpilation.

Documentation

Possible features

  • Transpile into PowerShell

About

ScriLa is a scripting language that adopts a syntax reminiscent of Go and C++, and it compiles down to Bash.

Topics

Resources

License

Stars

Watchers

Forks

Languages