title: How can I include the contents of a file as an argument to a macro?
body: <p>I'm trying to implement a Lisp version of <a href="https://processing.org/" rel="nofollow noreferrer">Processing</a>, and to that end I'm employing the <a href="https://crates.io/crates/macro_lisp" rel="nofollow noreferrer"><code>macro_lisp</code></a> crate to turn Lisp code into Rust at compile time.</p>
  
  <p>It works when I structure my code like so:</p>
  
  <p><strong>main.rs</strong></p>
  
  <pre><code>fn main() {
      include!("hello.lisp");
  }
  </code></pre>
  
  <p><strong>hello.lisp</strong></p>
  
  <pre class="lang-lisp prettyprint-override"><code>lisp!(println "hello")
  </code></pre>
  
  <p>Note that I have to wrap the content of <code>hello.lisp</code> in <code>lisp!()</code>, in <code>hello.lisp</code> itself.</p>
  
  <p>I want it to be structured like so:</p>
  
  <p><strong>main.rs</strong></p>
  
  <pre><code>fn main() {
      lisp!(include!("hello.lisp"));
  }
  </code></pre>
  
  <p><strong>hello.lisp</strong></p>
  
  <pre><code>println "hello"
  </code></pre>
  
  <p>But this gives me the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>error: expected expression, found `&lt;eof&gt;`
    --&gt; src/main.rs:47:18
     |
  47 |     lisp!(include!("draw.lisp"));
     |                  ^ expected expression
  </code></pre>
  
  <p>There should not be an EOF there, there should be <code>hello "list"</code>.</p>
  
  <p>What am I doing wrong? Do I need to patch <code>macro_lisp</code>?</p>