lib/dentaku/token.rb in dentaku-3.5.3 vs lib/dentaku/token.rb in dentaku-3.5.4

- old
+ new

@@ -18,11 +18,23 @@ def empty? length.zero? end + def operator? + is?(:operator) + end + def grouping? is?(:grouping) + end + + def open? + grouping? && value == :open + end + + def close? + grouping? && value == :close end def is?(c) category == c end