More testing, fixes, ...

This commit is contained in:
Marvin Blum
2015-09-21 17:53:04 +02:00
parent a53f052be8
commit b489e5018c
6 changed files with 60 additions and 46 deletions

View File

@@ -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(")") {

View File

@@ -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
}