Skip to content

Special-casing macros with &BODY #4

@phoe

Description

@phoe

The README mentions:

output = with-output-to-string (`(*standard-output*), //; To preserve parens, I used Lisp escape
format(t, "Found '~C' starting at '~A'", target, result));

I think it should be possible to specify either manual or semi-automatic translations for macros which have a &BODY parameter, such as WITH-OPEN-FILE. A &BODY parameter is equivalent to a logical block that could be enclosed within a C-style block.

For example, the above macro could be written as:

output = with-output-to-string(*standard-output*) {
    format(t, "Found '~C' starting at '~A'", target, result));
  };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions