Sha256: 3d7bf4ee67214d98d4513c7a9fe1c096355e93194a2b814281dcfcf015e1ad22

Contents?: true

Size: 992 Bytes

Versions: 1

Compression:

Stored size: 992 Bytes

Contents

# frozen_string_literal: true

module Rus3

  TOKEN_TYPES = [             # :nodoc:
    # delimiters
    :lparen,                  # `(`
    :rparen,                  # `)`
    :vec_lparen,              # `#(`
    :bytevec_lparen,          # `#u8(`
    :quotation,               # `'`
    :backquote,               # "`" (aka quasiquote)
    :comma,                   # `,`
    :comma_at,                # `,@`
    :dot,                     # `.`
    :semicolon,               # `;`
    :comment_lparen,          # `#|`
    :comment_rparen,          # `|#`
    # value types
    :identifier,              # `foo`
    :boolean,                 # `#f` or `#t` (`#false` or `#true`)
    :number,                  # `123`, `456.789`, `1/2`, `3+4i`
    :character,               # `#\a`
    :string,                  # `"hoge"`
    # operators
    :op_proc,                 # `+`, `-`, ...
    # control
    :illegal,
  ]

  Token = Struct.new(:type, :literal) {
    alias :to_s :literal
  }

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rus3-0.2.0 lib/rus3/token.rb