YakshaLang / Yaksha

😈 Yaksha Programming Language - Offside rule + Lisp system for macros. 🐣 WIP
https://yakshalang.github.io/
GNU General Public License v3.0
196 stars 13 forks source link

Bug: block_analyzer same line comment and return is not handled properly #30

Closed JaDogg closed 1 year ago

JaDogg commented 1 year ago

Following does not compile. This is a bug!

ITEM: Const[int] = ccode """1 + 1"""

def main() -> int:
    a: int = ITEM + 1
    println(a) # Some comment here
    return 0

Work around

ITEM: Const[int] = ccode """1 + 1"""

def main() -> int:
    a: int = ITEM + 1
    # Some comment here
    println(a)
    return 0