<commit_before>import java.util.List

interface Node do
  
end

interface Block < Node do
  def body
    returns Node
  end
end

interface Call < Node do
  def arguments
    returns List
  end

  def block
    returns Block
  end

  def target
    returns Node
  end
end

interface Macro do
  def expand
    returns Node
  end<commit_msg>Add the `quote` macro for building AST inside macros<commit_after>import java.util.List

interface Node do
  
end

interface Block < Node do
  def body
    returns Node
  end
end

interface Call < Node do
  def arguments
    returns List
  end

  def block
    returns Block
  end

  def target
    returns Node
  end
end

interface Macro do
  def expand
    returns Node
  end

  defmacro quote(&block) do
    encoded = @duby.dump_ast(block.body)
    code = <<RUBY
      ast, args = arg
      eval("@duby.load_ast(['\#{ast}', \#{args.join(', ')}])")
RUBY

    @duby.__ruby_eval(code, encoded)
  end
{'fraction_non_alphanumeric': 0.06616862326574173, 'fraction_numerical': 0.0, 'mean_word_length': 2.635658914728682, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1870883', 'n_tokens_mistral': 316, 'n_tokens_neox': 304, 'n_words': 111}