<commit_before># frozen_string_literal: true

module Opal::MagicComments
  MAGIC_COMMENT_RE = /\A# *([\w_]+) *: *([\w_]+) *$/.freeze
  EMACS_MAGIC_COMMENT_RE = /\A# *-\*- *([\w_]+) *: *([\w_]+) *-\*- *$/.freeze

  def self.parse(sexp, comments)
    flags = {}

    # We have an upper limit at the first line of code
    if sexp
      first_line = sexp.loc.line
      comments = comments.take(first_line)<commit_msg>Fix "duplicated range" regexp warning<commit_after># frozen_string_literal: true

module Opal::MagicComments
  MAGIC_COMMENT_RE = /\A# *(\w+) *: *(\w+) *$/.freeze
  EMACS_MAGIC_COMMENT_RE = /\A# *-\*- *(\w+) *: *(\w+) *-\*- *$/.freeze

  def self.parse(sexp, comments)
    flags = {}

    # We have an upper limit at the first line of code
    if sexp
      first_line = sexp.loc.line
      comments = comments.take(first_line)
{'fraction_non_alphanumeric': 0.1828978622327791, 'fraction_numerical': 0.0, 'mean_word_length': 3.072463768115942, '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': '5800894', 'n_tokens_mistral': 339, 'n_tokens_neox': 313, 'n_words': 75}