added parser logic
This commit is contained in:
9
doc/ast_rules.txt
Normal file
9
doc/ast_rules.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
len 3:
|
||||
|
||||
lib main {
|
||||
|
||||
min len 3, max len 4:
|
||||
<public> class test {
|
||||
|
||||
min len 5
|
||||
<public> func test() {
|
@@ -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
|
14
doc/test.bl
14
doc/test.bl
@@ -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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user