mirror of
https://github.com/Kugelschieber/asl.git
synced 2026-01-18 12:00:25 +00:00
More testing, fixes, ...
This commit is contained in:
@@ -156,7 +156,7 @@ func parseForeach() {
|
||||
appendOut("{\n")
|
||||
parseBlock()
|
||||
expect("}")
|
||||
appendOut("} forEach ("+expr+");")
|
||||
appendOut("} forEach ("+expr+");\n")
|
||||
}
|
||||
|
||||
func parseFunction() {
|
||||
@@ -183,7 +183,7 @@ func parseFunctionParameter() {
|
||||
for !accept(")") {
|
||||
name := get().token
|
||||
next()
|
||||
appendOut(name+" = this select "+strconv.FormatInt(i, 10)+";\n")
|
||||
appendOut(name+" = _this select "+strconv.FormatInt(i, 10)+";\n")
|
||||
i++
|
||||
|
||||
if !accept(")") {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package asl
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -61,13 +60,6 @@ func Tokenize(code []byte) []Token {
|
||||
}
|
||||
}
|
||||
|
||||
// TEST
|
||||
fmt.Println("Tokens:")
|
||||
for i := range tokens {
|
||||
fmt.Println(tokens[i].token)
|
||||
}
|
||||
fmt.Println("---")
|
||||
|
||||
return tokens
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user