Skip to content

neverUsedGithub/SomeProgrammingLanguage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Some programming language

This is a very basic interpreted programming language.

Basics

Installation

Locally

First, clone the repo: git clone https://github.com/neverUsedGithub/SomeProgrammingLanguage.

Second, open the clone repo: cd SomeProgrammingLanguage.

Third, run your program with: node dist/index.js <FILE>.

Replit

Just open this link.

Syntax

The language's syntax is like python and js combined. ;s are necessary unless the last character is a }.

Variables

To set a variable use the keyword var. Only 2 data types are supported for now, integers and strings.

var a = 10;
var b = "hi";

To modify the value of a variable just type the variables name, = and your value.

a = 5;
b = 32;

a += 3;
b -= 10;

If statements

if 3 < 10 {
  print("Less!");
}
Less!

While statements

var a = 0;

while a < 10 {
  print(a);
  a += 1;
}
0
..
9

Functions

func greet(str) {
  return "Hello " + str;
}

print(greet("world!"));
Hello world!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published