<commit_before>macro r {

  case {_ ($name, $x:expr (,) ...)} => {
    var _ = require('lodash');
    var name = unwrapSyntax(#{$name});
    isTag = _.includes(['div', 'h1', 'h2'], name);
    letstx $nameStx = isTag ? [makeValue(name, null)] : #{$name};
    return #{React.createElement($nameStx, $x (,) ...)}
  }

  rule {($x:expr (,) ...)} => {React.createElement($x (,) ...)}
}

export r;<commit_msg>[sweet] comment<commit_after>macro r {

  // r(div, {prop1: 'div-1'}, ...)
  // r(foo, {prop1: 'foo-1'}, ...)
  //
  case {_ ($name, $x:expr (,) ...)} => {
    var _ = require('lodash');
    var name = unwrapSyntax(#{$name});
    isTag = _.includes(['div', 'h1', 'h2'], name);
    letstx $nameStx = isTag ? [makeValue(name, null)] : #{$name};
    return #{React.createElement($nameStx, $x (,) ...)}
  }

  // r(foo.bar, {prop1: 'bar-1')
  // r(foo)
  //
  rule {($x:expr (,) ...)} => {React.createElement($x (,) ...)}
}

export r;
{'fraction_non_alphanumeric': 0.2883172561629153, 'fraction_numerical': 0.010718113612004287, 'mean_word_length': 2.8595041322314048, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1963822', 'n_tokens_mistral': 386, 'n_tokens_neox': 366, 'n_words': 68}