mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Ensured parser is reading functions correctly, read more
Parameter lists are read manually, rather than delegating to parsePrecedence, because that was causing issues. function bodies are read as block-level statements, just like the entire files.
This commit is contained in:
@@ -1,22 +1,17 @@
|
||||
|
||||
|
||||
fn name(param1, param2, param3, param4) {
|
||||
fn name() {
|
||||
//return 42;
|
||||
}
|
||||
|
||||
//params (group -> aggregate):
|
||||
// left: varAccess (name string "param1")
|
||||
// right (aggregate):
|
||||
// left: varAccess (name string "param2")
|
||||
// right (aggregate):
|
||||
// //continues
|
||||
|
||||
|
||||
|
||||
/*
|
||||
fn name(param1: int, param2: float) {
|
||||
return 42;
|
||||
fn name(param1: int, param2: float, param3: string, param4) {
|
||||
//return 42;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
fn name(foobar: bool const) {
|
||||
//return 42;
|
||||
}
|
||||
Reference in New Issue
Block a user