A toy dynamic programming language written in Ruby
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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