skx / gobasic

A BASIC interpreter written in golang.
https://blog.steve.fi/tags/basic/
GNU General Public License v2.0
323 stars 27 forks source link

Report errors on bare idents #87

Closed skx closed 5 years ago

skx commented 5 years ago

This pull-request makes an error of identifiers as tokens:

10 A = 3
20 A = B

This closes #86.

Note that this doesn't catch:

10 IF 1 < 3 THEN a = 3

Since that program is rewritten at load-time, to be:

10 IF 1 < 3 THEN LET a = 3