A toy dynamic programming language written in Ruby
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

token.rb 195B

123456789101112
  1. class Token
  2. attr_reader :type, :value
  3. def initialize(type, value = nil)
  4. @type = type
  5. @value = value
  6. end
  7. def ==(other)
  8. @type == other.type && @value == other.value
  9. end
  10. end