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.
Enter x
x = x + 1
Print x // 2
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
Loop:i=1 to 10
Print i // count from 1 - 10
EndLoop
i = 1
While i <= 10
Print i // count from 1 - 10
i = i + 1
EndWhile
Loop:i=0 to 9
Enter A[i]
EndLoop
Loop:i=0 to 9
Print A[i]
EndLoop
- Operators and expressions
- Input / output
- If / else
- Automatic loops
- While loops
- CaseOf / Case
- Array
- Functions
- Bootstrapping???
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