A toy dynamic programming language written in Ruby
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

conditional.rb 198B

1234567891011
  1. class AST::Conditional
  2. attr_reader :branches
  3. def initialize(branches)
  4. @branches = branches
  5. end
  6. def ==(other)
  7. other.is_a?(AST::Conditional) && other.branches == @branches
  8. end
  9. end