chsasank / llama.lisp

Lisp dialect designed for HPC and AI
GNU Lesser General Public License v2.1
15 stars 6 forks source link

Change declare syntax #57

Closed adi-lb-phoenix closed 4 months ago

adi-lb-phoenix commented 4 months ago

Link to the issue . https://github.com/chsasank/llama.lisp/issues/55 We have the instruction (set a 10), (add a b), (fmul a b). But the instruction declare is defined as (declare (a int)) . Why do we require an additional () after declare. It does not add any features and is counter intuitive. Instead I propose a change in syntax which is intuitive and simple (declare a int). So in the directory llama.lisp/src/backend/tests/c-lisp I have made changes to the syntax of all the declare statement from (declare (a b)) to (declare a b). In the file src/backend/c-lisp.py, I have made changes to how the declare statement is interpreted.

chsasank commented 4 months ago

Thanks.