Jamesbarford / holyc-lang

HolyC compiler
BSD 2-Clause "Simplified" License
191 stars 8 forks source link

Scripting math equations #41

Closed Slapparoo closed 3 months ago

Slapparoo commented 3 months ago

I'll start by saying great work.

One thing I have found is when doing 'scripting' with math constants i'e

1+1;

Its gets a compile error

parser.c:1365:ParseToplevelDef line 1: Identifier expected: got TK_PUNCT +

Jamesbarford commented 3 months ago

Thanks for the feedback!

That's an interesting bug with the 1+1; it shouldn't explode like you say, but also I'm not sure what it should do. When I get to optimising the compiler it would get optimised away and nothing would happen. Thus I'm quite happy with it erroring out for the moment as it is in essence a NOP.

I appreciate your suggestion for a walkthrough and your willingness to contribute. Better documentation and tasks for contributors will come, but it's a bit premature now as significant changes are expected in the medium term.

Slapparoo commented 3 months ago

I hope your Masters goes well, the work you have done so far is great.

Please don't optimise it out its such a good feature in templeOS, where you can use the CLI as a calculator (amongst other things) image