Skip to content

tkuhemiya/Language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language

References

todo

  1. implement Source -> [Tokenizer] -> AST AST -> [codegen] -> IR IR -> [QBE/LLVM] -> ASM
  2. seperate keywords and identification as two
  3. recursive descent parser

The Language

  • dynamically typed, while supporting types
x :: Integer = 9
y = 10
print x + y                     // 19
fn add x y -> return x + y
print add 9 10                  // 19
print add add 9 10 10           // 29
num = 10
fn isodd num -> return num % 2
if isodd num > print "odd" || print "even" 
num = 3
if num == 1 > print "one" || if num == 2 > print "two" || print "three"
if num == 1 
    > print "one" 
    || if num == 2 
    > print "two" 
    || print "three";

OR

num = 3
if num == 1 then print "one" else if num == 2 then print "two" else print "three"
if num == 1 
    then print "one" 
    else if num == 2 
    then print "two" 
    else print "three"
fi

About

A toy programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages