updated examples a tiny bit
gonna start work on actual compiler now
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
"ExpressionStatement": {
|
||||
"type": "ExpressionStatement",
|
||||
"expr": {
|
||||
"type": "InfixExpression",
|
||||
"left_node": {
|
||||
"type": "InfixExpression",
|
||||
"left_node": {
|
||||
"type": "InfixExpression",
|
||||
"left_node": {
|
||||
"type": "IntegerLiteral",
|
||||
@@ -15,6 +19,18 @@
|
||||
"type": "IntegerLiteral",
|
||||
"value": 5
|
||||
}
|
||||
},
|
||||
"operator": "*",
|
||||
"right_node": {
|
||||
"type": "IntegerLiteral",
|
||||
"value": 3
|
||||
}
|
||||
},
|
||||
"operator": "+",
|
||||
"right_node": {
|
||||
"type": "IntegerLiteral",
|
||||
"value": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
5 + 5
|
||||
(5 + 5) * 3 + 2
|
||||
@@ -8,7 +8,8 @@ enum Gender {
|
||||
struct Person {
|
||||
name: String,
|
||||
age: Int = 0,
|
||||
speak: Func
|
||||
speak: Func,
|
||||
gender: Gender
|
||||
}
|
||||
|
||||
speak = Func(sentence: String): Nil {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
depend "string.pla"
|
||||
depend "io.h"
|
||||
|
||||
myInt: Int = 123
|
||||
myDecimal: Float = 0.456
|
||||
|
||||
Reference in New Issue
Block a user