tlang-compiler/Program.cs

8 lines
383 B
C#
Raw Normal View History

2022-09-07 16:10:42 +00:00
using System.IO;
using System;
using TLang;
//string code = "func main(string[] args) { int i = times(4,8); print(i);}";
string code = "func main(string[] args) { int i = 0; int j = 42; int k=demi(1,1); while { int f=0; } int j=0; } int j=42; func sub(int i){int j=0;}";
var parsed=Parser.Parse(Lexer.GetTokens(new StringReader(code)).ToList());
Console.WriteLine(parsed);