<commit_before>var load = function(rt) {
  console.log("hello, world!");
  
  // STRING ///////////////////////////////////////////////////////
  //Define type
  var string_t = rt.newClass("String", [
    {
      type: rt.normalPointerType(rt.charTypeLiteral),
      name: "buffer"
    }, {
      type: rt.unsignedintTypeLiteral,
      name: "capacity"
    }, {
      type: rt.unsignedintTypeLiteral,
      name: "len"
    }
  ]);
  rt.types[rt.getTypeSignature(string_t)] = {
    "#father": "object"
  };
  
  
  // SERIAL ///////////////////////////////////////////////////////
  //Define types
  var print_t = rt.newClass("Print", []);
  rt.types[rt.getTypeSignature(print_t)] = {
    "#father": "object"
  };
  var stream_t = rt.newClass("Stream", []);
  rt.types[rt.getTypeSignature(stream_t)] = {
    "#father": "Print"
  };
  var hs_t = rt.newClass("HardwareSerial", []);
  rt.types[rt.getTypeSignature(hs_t)] = {
    "#father": "Stream"
  };

  //Create serial object
  var serial_obj = {
    t: hs_t,
    v: {
      members: {}
    },
    left: false
  };
  rt.scope[0]["Serial"] = serial_obj;
  
}

arduino_h = {
  load: load
}
<commit_msg>Added getCharStar method to strings<commit_after>var load = function(rt) {
  console.log("hello, world!");
  
  // STRING ///////////////////////////////////////////////////////
  //Define type
  var string_t = rt.newClass("String", [
    {
      type: rt.normalPointerType(rt.charTypeLiteral),
      name: "buffer"
    }, {
      type: rt.unsignedintTypeLiteral,
      name: "capacity"
    }, {
      type: rt.unsignedintTypeLiteral,
      name: "len"
    }
  ]);
  rt.types[rt.getTypeSignature(string_t)] = {
    "#father": "object"
  };
  var to_char_star = function(rt, _this) {
	  return _this.v.members.buffer;
  }
  rt.regFunc(to_char_star, string_t, "toCharStar", [], rt.normalPointerType(rt.charTypeLiteral));
  
  
  // SERIAL ///////////////////////////////////////////////////////
  //Define types
  var print_t = rt.newClass("Print", []);
  rt.types[rt.getTypeSignature(print_t)] = {
    "#father": "object"
  };
  var stream_t = rt.newClass("Stream", []);
  rt.types[rt.getTypeSignature(stream_t)] = {
    "#father": "Print"
  };
  var hs_t = rt.newClass("HardwareSerial", []);
  rt.types[rt.getTypeSignature(hs_t)] = {
    "#father": "Stream"
  };

  //Create serial object
  var serial_obj = {
    t: hs_t,
    v: {
      members: {}
    },
    left: false
  };
  rt.scope[0]["Serial"] = serial_obj;
  
}

arduino_h = {
  load: load
}

{'fraction_non_alphanumeric': 0.24710115953618553, 'fraction_numerical': 0.0007996801279488205, 'mean_word_length': 2.0364077669902914, 'pattern_counts': {'":': 8, '<': 3, '<?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': '5952615', 'n_tokens_mistral': 859, 'n_tokens_neox': 863, 'n_words': 140}