Closed skx closed 5 years ago
Yup, it's not the interpreter that is to blame, but the lexer:
frodo ~/go/src/github.com/skx/gobasic $ ./gobasic -lex ./t.bas
{NEWLINE N}
{LINENO 10}
{IDENT DUMP}
{INT 0}
{IDENT .}
{INT 3}
{NEWLINE N}
{LINENO 20}
{PRINT PRINT}
{STRING OK
}
{NEWLINE N}
{NEWLINE N}
.
is showing up as an IDENT which is just wrong ..
Better now :)
frodo ~/go/src/github.com/skx/gobasic $ go build . ; ./gobasic -lex ./t.bas
{NEWLINE N}
{LINENO 10}
{IDENT DUMP}
{INT 0.3}
{NEWLINE N}
{LINENO 20}
{PRINT PRINT}
{STRING OK
}
{NEWLINE N}
{NEWLINE N}
Somewhere along the way we lost the ability to parse floats:
Output is: