diff --git a/hello.rd b/hello.rd index 5846848..34ddb84 100644 --- a/hello.rd +++ b/hello.rd @@ -1,2 +1,4 @@ -var bool = "false"; -println("" == bool) \ No newline at end of file +var bool = "true"; +if bool == "true" { + println(bool) +} \ No newline at end of file diff --git a/lexer/lexerArithmeticOperations.go b/lexer/lexerArithmeticOperations.go index ecdfdc8..b322ce5 100644 --- a/lexer/lexerArithmeticOperations.go +++ b/lexer/lexerArithmeticOperations.go @@ -157,7 +157,8 @@ loop: if curType == -1 { curType = ConvertToTokenType(reflect.TypeOf(va.Value).String()) } - if !(curType != ConvertToTokenType(reflect.TypeOf(fmt.Sprint(va.Value)).String()) && curType != c.Type) { + if (curType != ConvertToTokenType(reflect.TypeOf(fmt.Sprint(va.Value)).String()) && curType != c.Type) { + fmt.Println(curType, ConvertToTokenType(reflect.TypeOf(fmt.Sprint(va.Value)).String())) return "", c, err.NewTypeError(l.Scanner.Pos()) }