kiselgra / c-mera

Next-level syntax for C-like languages :)
Other
405 stars 17 forks source link

Reader conditionals #86

Closed pjstirling closed 7 years ago

pjstirling commented 7 years ago

As an experienced lisper, I often use reader conditionals to comment out code that I may want to re-enable later. This mostly works fine in c-mera:

(function foo ((int a)
           #+nil
           (int b)
           (int c))
    -> int
  (return 0))
int foo(int a, int c)
{
    return 0;
}

However, when the reader conditional is for the last element in a list it doesn't work:

(function bar ((int a)
           (int b)
           #+nil
           (int c))
    -> int
  (return 0))
  unmatched close parenthesis

    Line: 33, Column: 16, File-Position: 557

    Stream: #<sb-sys:fd-stream for "file /home/peter/Programming/c-mera-test/test2.lisp" {1002363A03}>
lispbub commented 7 years ago

The problem with reader conditionals on last list elements should be fixed.

pjstirling commented 7 years ago

Looks like it does, thanks!