added parser logic

This commit is contained in:
edraft
2020-05-24 17:56:15 +02:00
parent d66ea29d8f
commit 38353246b2
14 changed files with 260 additions and 29 deletions

9
doc/ast_rules.txt Normal file
View File

@@ -0,0 +1,9 @@
len 3:
lib main {
min len 3, max len 4:
<public> class test {
min len 5
<public> func test() {

View File

@@ -1,13 +0,0 @@
Interpreter:
1.0 Start failed
1.1 File not found
Runtime:
2.0 Unknown keyword
2.1 Unknown type
2.2 Unknown variable
2.3 Unknown function
2.4 Unknown class
2.5 Unknown library
2.6 Access error: no export
2.7 Expression error

View File

@@ -9,6 +9,8 @@ lib Main {
func Main() {
testBool: bool;
testEmpty: emptyType = empty;
testNum: number = 3.0;
testBool_2: bool = 3 > 1;
output('Hello World');
output(66);
output(3 + 3);
@@ -22,11 +24,21 @@ lib Main {
test1234(range(0, 10));
}
public func test1234(param: list) {
# public func test1234(param: list) {
public func test1234()
{
/*for i in range(0, length(param)) {
output(i);
}*/
pass;
}
}
}
lib test
{
public class Test
{
}
}