Jamesbarford / holyc-lang

HolyC compiler & transpiler
BSD 2-Clause "Simplified" License
277 stars 13 forks source link

"Failed to extract filename" error #35

Closed mrunix00 closed 7 months ago

mrunix00 commented 7 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 7 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 7 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,