Jamesbarford / holyc-lang

HolyC compiler
BSD 2-Clause "Simplified" License
227 stars 10 forks source link

"Failed to extract filename" error #35

Closed mrunix00 closed 5 months ago

mrunix00 commented 5 months ago

When I try to compile any HC file or even check HolyC compiler version I get this error:

➜  ~ hcc --version
--version
main.c:114:getASMFileName       Failed to extract filename
➜  ~ hcc main.HC
main.HC
main.c:114:getASMFileName       Failed to extract filename
Jamesbarford commented 5 months ago

Thanks for this.

An oversight on my part, a file requires ./ so in your case it would be hcc ./main.HC. The logic is in getASMFileName. As for --version I have not yet implemented this

Jamesbarford commented 5 months ago

Going to mark this as done; the file path issue is now fixed. The --version is separate; there is no command implementing it and thus the compiler thinks it's compiling a source file. A better error I think will be thrown to. To properly fix this I would like to somehow have this read in from a text file, or some other mechanism,