Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single quote character #30

Closed
plops opened this issue Jul 5, 2016 · 0 comments
Closed

Single quote character #30

plops opened this issue Jul 5, 2016 · 0 comments

Comments

@plops
Copy link

plops commented Jul 5, 2016

The following c-mera expression results in wrong C code:

 (when (== #\' ch)
      (comment "quo")
      (return (cast 'o *quo*)))

The C code should look like this:

    if ('\'' == ch) {
        //quo
        return ((o)3);
    }

but it actually looks like this:

    if (''' == ch) {
        //quo
        return ((o)3);
    }

Currently I use this:

 (when (== (char-code #\') ch)
      (comment "quo")
      (return (cast 'o *quo*)))

but that makes the C code very unreadable:

    if (39 == ch) {
        //quo
        return ((o)3);
    }
@lispbub lispbub closed this as completed in 1d7df4b Jul 8, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant