Skip to content
/ ILIL Public

A basic scriptable language which running on the [CLR]

Notifications You must be signed in to change notification settings

pjc0247/ILIL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ILIL

A basic scriptable language which running on the CLR.

Main purpose

  • Compiles the given code into CIL.
  • Lexical/S-Expression parsing
  • AST Tree

DAT

  • This is a studying purpose project. Not a complete product.
  • The source code is very messy, it may not be helpful.

Example

var src = "2 + sum(2, a+b, 3) + 3 + 2 * 2;";
var root =
    TreeBuilder.Build(
        Sexper.SexpPrefix(
            Lexer.Lex(src)));
            
root.Print();
root.Emit();

i
a



class my_ilil {
  def sum (a,b) {
    ret a + b;
  }
  def sum2 (a,b) {
    ret a + a * b + b;
  }
  def hello (a) {
    [mscorlib]System.Console::WriteLine ( 1234 )
    [mscorlib]System.Console::WriteLine ( a )
    [mscorlib]System.Console::WriteLine ( a + 3 * 4 )
    ret 0
  }
}

i

About

A basic scriptable language which running on the [CLR]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published