cimplec / sim-c

A dynamically typed high-level front end for C

Home Page:https://cimplec.github.io/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG REPORT] simc test.c gives an unexpected error

shobhit10058 opened this issue · comments

Description of the bug
when simc is run with a file not with .simc extension it gives an unexpected error

Traceback (most recent call last):
  File "/home/shobhit/.local/bin/simc", line 8, in <module>
    sys.exit(run())
  File "/home/shobhit/.local/lib/python3.8/site-packages/simc/simc.py", line 25, in run
    error("Incorrect file extension", line_num)
NameError: name 'line_num' is not defined

NameError should not come.

Steps To Reproduce
simply run simc test.c.

Expected behavior
It should simply give Incorrect file extension

We can simply fix it by replacing line_num with -1 or something.

Hey thanks @shobhit10058 for submitting the bug report, do you want to work on this?

I think the suggestion is enough, so should I add it -1.

Yeah that would work, assigning this to you.