connorferster/handcalcs

Bug: Indented comment after calcs causes error.

sebanalysis opened this issue · 0 comments

Input:

%%render
a = 1
 #

Error:

ParseException: Expected == | = | + | - | * | // | / | % | , | <= | < | >= | > | != term, found end of text  (at char 1), (line:1, col:2)

This is a common issue when using a decorator, when there are indented comments after the return. Although this is only if the comment indent is >= 4 spaces The following causes a time sapping mystery error because nothing is wrong with the function itself.

@handcalcs.decorator.handcalc()
def test():
    B = 1
    return B


    #

test()