Skip to content
/ sun Public

sun programming language - a language for rapid prototyping and learning new concepts

Notifications You must be signed in to change notification settings

kenchangh/sun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sun

Sun is a programming language for quick prototyping and learning programming concepts. Being minimal and having a limited feature set, Sun is aimed to help novices in learning programming without all the cruft and redundancies. The language loosely follows the pseudocode language taught by Dr Juan in Sunway University for our Programming Concepts and Problem Solving class (PRG 1114).

The work for the programming language is just only at its beginning.

How it looks

Input / Output

Enter x
x = x + 1
Print x // 2

If / Else

Enter x
If (x % 2 == 0) Then // if even
    Print "It's even!", x // notice the indentation
Else
    Print "It's odd!", x // notice the indentation
EndIf

Automatic Loops

Loop:i=1 to 10
    Print i  // count from 1 - 10
EndLoop

While Loops

i = 1
While i <= 10
	Print i  // count from 1 - 10
	i = i + 1
EndWhile

Arrays

Loop:i=0 to 9
    Enter A[i]
EndLoop

Loop:i=0 to 9
    Print A[i]
EndLoop

Status

  • Operators and expressions
  • Input / output
  • If / else
  • Automatic loops
  • While loops
  • CaseOf / Case
  • Array
  • Functions
  • Bootstrapping???

Running examples

You will need to have clone the project and install the dependencies with npm first. You must have NodeJS installed on your system.

git clone git@github.com:mavenave/sun.git
cd sun
npm install

node bin/sun examples/fizzbuzz.sun

About

sun programming language - a language for rapid prototyping and learning new concepts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published