Prelisp recursively tests the first element of each list to determine whether it is an unquote or unquote-splicing expression. This test causes an IndexError when an empty list is being processed. Consider the following macro call:
,@(array-init arr () 5)
Prelisp will run into an error while analyzing the second argument to the macro:
File "/home/gsd-vnai/Desktop/llama.lisp/src/backend/tests/prelisp/../../prelisp.py", line 17, in preprocess
if expr[0] == "unquote":
~~~~^^^
IndexError: list index out of range
Prelisp recursively tests the first element of each list to determine whether it is an
unquote
orunquote-splicing
expression. This test causes anIndexError
when an empty list is being processed. Consider the following macro call:Prelisp will run into an error while analyzing the second argument to the macro: