<commit_before>require "../../file.cr"

# The different types of tokens
enum TokenType

  # Literals
  Numeric
  Identifier
  String
  Boolean
  Null
  NAN
  Keyword

  # Arithmetic Operators
  Plus
  Minus
  Mult
  Divd
  Mod
  Pow

  # Misc Operators
  Assignment

  # Comparison operators
  Equal
  Not
  Less
  Greater
  LessEqual
  GreaterEqual

  # Logic Operators
  AND
  OR

  # Structural
  LeftParen, RightParen
  LeftCurly, RightCurly
  LeftBracket, RightBracket
  Semicolon
  Comma
  Point
  Comment

  # Whitespace
  Whitespace
  Newline

  # Internal
  EOF
  Unknown
end

# A single token with a type and a value
class Token
  property type : TokenType
  property value : String
  property raw : String
  property touched : Bool
  property location : Location

  def initialize(type = TokenType::Unknown, value = "", raw = "")
    @type = type
    @value = value
    @raw = raw
    @touched = false
    @location = Location.new
  end

  def to_s(io)
    io << "#{@location.file.try &.filename}:"
    io << "#{@location.row}:#{@location.column - @location.length}".ljust(4, ' ')
    io << " │ "

    if @value.size == 0
      io << "#{@type.to_s.ljust(12, ' ')}"
      io << "│"
    else
      io << "#{@type.to_s.ljust(12, ' ')}"
      io << "│ "
      io << "(#{@raw})"
    end
  end
end<commit_msg>Removed parens around token printing<commit_after>require "../../file.cr"

# The different types of tokens
enum TokenType

  # Literals
  Numeric
  Identifier
  String
  Boolean
  Null
  NAN
  Keyword

  # Arithmetic Operators
  Plus
  Minus
  Mult
  Divd
  Mod
  Pow

  # Misc Operators
  Assignment

  # Comparison operators
  Equal
  Not
  Less
  Greater
  LessEqual
  GreaterEqual

  # Logic Operators
  AND
  OR

  # Structural
  LeftParen, RightParen
  LeftCurly, RightCurly
  LeftBracket, RightBracket
  Semicolon
  Comma
  Point
  Comment

  # Whitespace
  Whitespace
  Newline

  # Internal
  EOF
  Unknown
end

# A single token with a type and a value
class Token
  property type : TokenType
  property value : String
  property raw : String
  property touched : Bool
  property location : Location

  def initialize(type = TokenType::Unknown, value = "", raw = "")
    @type = type
    @value = value
    @raw = raw
    @touched = false
    @location = Location.new
  end

  def to_s(io)
    io << "#{@location.file.try &.filename}:"
    io << "#{@location.row}:#{@location.column - @location.length}".ljust(4, ' ')
    io << " │ "

    if @value.size == 0
      io << "#{@type.to_s.ljust(12, ' ')}"
      io << "│"
    else
      io << "#{@type.to_s.ljust(12, ' ')}"
      io << "│ "
      io << "#{@raw}"
    end
  end
end
{'fraction_non_alphanumeric': 0.11400528501321253, 'fraction_numerical': 0.004530011325028313, 'mean_word_length': 2.4822601839684624, 'pattern_counts': {'":': 0, '<': 35, '<?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': '5694950', 'n_tokens_mistral': 968, 'n_tokens_neox': 928, 'n_words': 257}