Noor comes with an IDE built to make it easy to write code in an arabic environment.
- Variable bindings, strings and integers
- Function invocation
- Built in print statement
- Function declaration
- Arrays and hashmaps
- Standard library with trigonemtric key words
Noor is still in development. The purpose of this project is to demonstrate a beginner friendly programming language that uses a non-latin alphabet based language, hence Arabic. Noor is implemented in JS so that it can run natively in the browser.
In prior commits, Noor used a hand written lexer and parser but now uses PEGJS, a Parser Expression Grammar that combiles the lexing and parsing phases into one step. There are some grievances I have with PEGJS, one is you cannot get the line number or information which caused a syntax error when building the abstract syntax tree for a program. Returning to a hand-written lexer and parser is still a possibility in my mind.
- Complete test coverage
- Enough language features and concepts to solve basic programming exercies
- More to come soon...
FizzBuzz in Noor:
امر عامل قاسمــمع٣ (ن) ليسوي د = ن ٪ ٣ د بس امر عامل قاسمــمع٥ (ن) ليسوي د = ن ٪ ٥ د بس لكل شي في [١..١٠٠] سوي د = قاسمــمع٣ (شي) ن = قاسمــمع٥(شي) اطبع شي لو د == ٠ سوي اطبع "Fizz" بس لو ن == ٠ سوي اطبع "Buzz" بس بس
امر عامل فب (ن) ليسوي د = ٠ لو ن < ٢ سوي د = ن والا ش = ن - ١ س = ن - ٢ م = فب(ش) ك = فب(س) د = م + ك بس د بس اطبع (فب(٥)) اطبع (فب(١٠)) اطبع (فب(١٥))