<commit_before>(function(mod) {
  if (typeof exports == "object" && typeof module == "object") { // CommonJS
    return mod(require("tern/lib/infer"), require("tern/lib/tern"));
  }
  if (typeof define == "function" && define.amd) // AMD
    return define([ "tern/lib/infer", "tern/lib/tern" ], mod);
  mod(tern, tern);
})(function(infer, tern) {
  "use strict";

  function validateTabrisType(node, addMessage) {
    var argNode = node.arguments[0];
    if (argNode) {
      var cx = infer.cx(), types = cx.definitions.tabris["!types"], typeName = argNode.value;
      if (!types.hasProp(typeName)) addMessage(argNode, "Unknown tabris type '" + typeName + "'");
    }
  };
  
  function validateTabrisProperty(node, addMessage) {
    var argNode = node.arguments[0];
    if (argNode) {
      var cx = infer.cx(), proxyType = argNode._tabris.proxyType, propertyName = argNode.value;
      if (!getPropertyType(proxyType, propertyName)) addMessage(argNode, "Unknown tabris property '" + propertyName + "'");
    }
  };
  
  infer.registerFunction("tabris_create", function(_self, args, argNodes) {
    if (!argNodes || !argNodes.length || argNodes[0].type != "Literal" || typeof argNodes[0].value != "string")
	    return infer.ANull;
    var cx = infer.cx(), server = cx.parent, name = argNodes[0].value, locals = cx.definitions.tabris["!types"], tabrisType = locals.hasProp(name);
	  argNodes[0]._tabris = {"type" : "tabris_create"};
	  if (_self.hasProp) _self.hasProp("create").getFunctionType().lint = validateTabrisType;
    if (tabrisType) return new infer.Obj(tabrisType.getType().getProp("prototype").getType());    
    return infer.ANull;
  });
   
  function getObjectProperties(proto) {
    var cx = infer.cx(), locals = cx.definitions.tabris;    
    var objectName = proto.name, index = objectName.indexOf("!types.");
    if (index == 0) objectName = objectName.substring("!types.".length, objectName.length);
    objectName = objectName.substring(0, proto.name.indexOf('.')) + 'Properties';
    return locals["!properties"].hasProp(objectName);
  }
  
  function getPropertyType(widgetType, propertyName) {
    if (!(widgetType)) return null;
    var proto = widgetType.proto, propertyType = null;
    while(proto) {<commit_msg>Set tabris severity as eeror.<commit_after>(function(mod) {
  if (typeof exports == "object" && typeof module == "object") { // CommonJS
    return mod(require("tern/lib/infer"), require("tern/lib/tern"));
  }
  if (typeof define == "function" && define.amd) // AMD
    return define([ "tern/lib/infer", "tern/lib/tern" ], mod);
  mod(tern, tern);
})(function(infer, tern) {
  "use strict";

  var defaultRules = {
    "UnknownTabrisType" : {"severity" : "error"},
    "UnknownTabrisProperty" : {"severity" : "error"}
  };
  
  function validateTabrisType(node, addMessage) {
    var argNode = node.arguments[0];
    if (argNode) {
      var cx = infer.cx(), types = cx.definitions.tabris["!types"], typeName = argNode.value;
      if (!types.hasProp(typeName)) addMessage(argNode, "Unknown tabris type '" + typeName + "'", defaultRules.UnknownTabrisType.severity);
    }
  };
  
  function validateTabrisProperty(node, addMessage) {
    var argNode = node.arguments[0];
    if (argNode) {
      var cx = infer.cx(), proxyType = argNode._tabris && argNode._tabris.proxyType, propertyName = argNode.value;
      if (!getPropertyType(proxyType, propertyName)) addMessage(argNode, "Unknown tabris property '" + propertyName + "'", defaultRules.UnknownTabrisProperty.severity);
    }
  };
  
  infer.registerFunction("tabris_create", function(_self, args, argNodes) {
    if (!argNodes || !argNodes.length || argNodes[0].type != "Literal" || typeof argNodes[0].value != "string")
	    return infer.ANull;
    var cx = infer.cx(), server = cx.parent, name = argNodes[0].value, locals = cx.definitions.tabris["!types"], tabrisType = locals.hasProp(name);
	  argNodes[0]._tabris = {"type" : "tabris_create"};
	  if (_self.hasProp) _self.hasProp("create").getFunctionType().lint = validateTabrisType;
    if (tabrisType) return new infer.Obj(tabrisType.getType().getProp("prototype").getType());    
    return infer.ANull;
  });
   
  function getObjectProperties(proto) {
    var cx = infer.cx(), locals = cx.definitions.tabris;    
    var objectName = proto.name, index = objectName.indexOf("!types.");
    if (index == 0) objectName = objectName.substring("!types.".length, objectName.length);
    objectName = objectName.substring(0, proto.name.indexOf('.')) + 'Properties';
    return locals["!properties"].hasProp(objectName);
  }
  
  function getPropertyType(widgetType, propertyName) {
    if (!(widgetType)) return null;
    var proto = widgetType.proto, propertyType = null;
    while(proto) {
{'fraction_non_alphanumeric': 0.1634676228643746, 'fraction_numerical': 0.003374815439780637, 'mean_word_length': 4.1264864864864865, 'pattern_counts': {'":': 0, '<': 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': '5776216', 'n_tokens_mistral': 1496, 'n_tokens_neox': 1472, 'n_words': 315}