neilsf / XC-BASIC

A compiling BASIC dialect for the Commodore-64
https://xc-basic.net/
MIT License
74 stars 15 forks source link

Labels not detected in functions #107

Closed mrg-75 closed 4 years ago

mrg-75 commented 4 years ago

Labels aren't detected inside functions, for example:

fun test!(i!)
    on i! goto case0,case1

    case0:
        return 0
    case1:
        return 1
endfun

Gives the compilation error ERROR: Label case0 does not exist in file main.bas in line 2

neilsf commented 4 years ago

Thanks for reporting. I'll release a fix later today.