<commit_before>(**
 * Copyright (c) 2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the "hack" directory of this source tree.
 *
 *)

open Hh_core

type kind =
  | Function
  | Class
  | Method
  | Property
  | Const
  | Enum
  | Interface
  | Trait
  | LocalVar
  | Typeconst
  | Param
  | Typedef

and modifier =
  | Final
  | Static
  | Abstract
  | Private
  | Public
  | Protected
  | Async
  | Inout

and 'a t = {
  kind : kind;
  name : string;
  full_name : string;
  id : string option;
  pos : 'a Pos.pos;
  span : 'a Pos.pos;
  modifiers : modifier list;
  children : 'a t list option;
  params : 'a t list option;
  docblock : string option;
}

let rec to_absolute x = {
  kind = x.kind;
  name = x.name;
  full_name = x.full_name;<commit_msg>[hack] documentSymbol emits span of entire construct<commit_after>(**
 * Copyright (c) 2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the "hack" directory of this source tree.
 *
 *)

open Hh_core

type kind =
  | Function
  | Class
  | Method
  | Property
  | Const
  | Enum
  | Interface
  | Trait
  | LocalVar
  | Typeconst
  | Param
  | Typedef

and modifier =
  | Final
  | Static
  | Abstract
  | Private
  | Public
  | Protected
  | Async
  | Inout

and 'a t = {
  kind : kind;
  name : string;
  full_name : string;
  id : string option;
  pos : 'a Pos.pos; (* covers the span of just the identifier *)
  span : 'a Pos.pos; (* covers the span of the entire construct, including children *)
  modifiers : modifier list;
  children : 'a t list option;
  params : 'a t list option;
  docblock : string option;
}

let rec to_absolute x = {
  kind = x.kind;
  name = x.name;
  full_name = x.full_name;
{'fraction_non_alphanumeric': 0.09989082969432314, 'fraction_numerical': 0.004366812227074236, 'mean_word_length': 2.718052738336714, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7634603', 'n_tokens_mistral': 645, 'n_tokens_neox': 626, 'n_words': 223}