Fixes #27 basic parser (#28)

* Fix #27 basic parsing

* Update version
This commit is contained in:
Terence Boldt 2023-01-25 21:25:48 -05:00 committed by GitHub
parent 9e6c2fcc22
commit 98ab2d4f0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -17,7 +17,7 @@ import (
"github.com/tjboldt/ProDOS-Utilities/prodos" "github.com/tjboldt/ProDOS-Utilities/prodos"
) )
const version = "0.4.4" const version = "0.4.5"
func main() { func main() {
var fileName string var fileName string

View File

@ -190,6 +190,9 @@ func ConvertTextToBasic(text string) ([]byte, error) {
// skip initial whitespace and look for the start of a line number // skip initial whitespace and look for the start of a line number
if starting { if starting {
if c == '\n' { // skip blank lines
continue
}
if c == ' ' { if c == ' ' {
continue continue
} }
@ -230,6 +233,7 @@ func ConvertTextToBasic(text string) ([]byte, error) {
parsingRem = false parsingRem = false
parsingString = false parsingString = false
foundToken = false foundToken = false
skipChars = 0
currentByte += basicLine.Len() currentByte += basicLine.Len()
currentByte += 3 currentByte += 3
// write address of next line // write address of next line