🟡 Gola

A cute programming language written in Go

curl -L -o gola-darwin-x86_64.tar.gz https://github.com/felixoder/gola-language/releases/download/v2.0.1/gola-darwin-x86_64.tar.gz

Playground

Shandaar bhai 🎉

Documentation

Gola is a lightweight and fun programming language inspired by simplicity and Bengali expressions. This documentation provides an overview of its syntax, usage, and functionality.

Installation

Step 1: Download the Gola Compiler

For macOS (x86_64)
curl -L -o gola-darwin-x86_64.tar.gz https://github.com/felixoder/gola-language/releases/download/v2.0.1/gola-darwin-x86_64.tar.gz
For Linux (x86_64)
curl -L -o gola-linux-x86_64.tar.gz https://github.com/felixoder/gola-language/releases/download/v2.0.1/gola-linux-x86_64.tar.gz

Step 2: Extract the Files

tar -xvzf gola-darwin-x86_64.tar.gz

Step 3: Install Gola

sudo mv ./gola /usr/local/bin/gola
sudo chmod +x /usr/local/bin/gola

Step 4: Verify Installation

gola -v

Syntax

Print Statements

Command: kemon achis "<message>"

Description: Prints the specified message to the console.

kemon achis "Hello, world!"

Variable Input

Command: bol bhai <variable>

Description: Prompts the user to input a value for the specified variable.

bol bhai x

Variable Assignment

Command: <variable> = <expression>

Description: Assigns the result of an expression to a variable.

x = 10 + 5

Conditional Execution

Command: dyakh jodi <condition>: <command> ar nahole: <command>

Description: Executes the first command if the condition is true; otherwise, executes the second command.

dyakh jodi x > 5: kemon achis "Greater" ar nahole: kemon achis "Smaller or Equal"

Loop Statement

Command: bolte thak <iterator> [<start>] -> [<end>] [<increment>] :

Description: A basic loop structure.

bolte thak i [0] -> [5] [i++] :
kemon achis i

Sample Code

bol bhai x y = x + 5 dyakh jodi y > 10: kemon achis "Value is greater" ar nahole: kemon achis "Value is smaller"
Expected Output:
Enter value for x: 6
Value is greater