updated examples a tiny bit

gonna start work on actual compiler now
This commit is contained in:
SpookyDervish
2025-10-13 18:03:13 +11:00
parent 985af13d6a
commit 4e17674361
4 changed files with 23 additions and 5 deletions

View File

@@ -7,13 +7,29 @@
"expr": {
"type": "InfixExpression",
"left_node": {
"type": "IntegerLiteral",
"value": 5
"type": "InfixExpression",
"left_node": {
"type": "InfixExpression",
"left_node": {
"type": "IntegerLiteral",
"value": 5
},
"operator": "+",
"right_node": {
"type": "IntegerLiteral",
"value": 5
}
},
"operator": "*",
"right_node": {
"type": "IntegerLiteral",
"value": 3
}
},
"operator": "+",
"right_node": {
"type": "IntegerLiteral",
"value": 5
"value": 2
}
}
}

View File

@@ -1 +1 @@
5 + 5
(5 + 5) * 3 + 2

View File

@@ -8,7 +8,8 @@ enum Gender {
struct Person {
name: String,
age: Int = 0,
speak: Func
speak: Func,
gender: Gender
}
speak = Func(sentence: String): Nil {

View File

@@ -1,4 +1,5 @@
depend "string.pla"
depend "io.h"
myInt: Int = 123
myDecimal: Float = 0.456