summaryrefslogtreecommitdiff
path: root/tool/lrama/lib/lrama/grammar/type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/lrama/lib/lrama/grammar/type.rb')
-rw-r--r--tool/lrama/lib/lrama/grammar/type.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/tool/lrama/lib/lrama/grammar/type.rb b/tool/lrama/lib/lrama/grammar/type.rb
new file mode 100644
index 0000000000..6b4b0961a1
--- /dev/null
+++ b/tool/lrama/lib/lrama/grammar/type.rb
@@ -0,0 +1,18 @@
+module Lrama
+ class Grammar
+ class Type
+ attr_reader :id, :tag
+
+ def initialize(id:, tag:)
+ @id = id
+ @tag = tag
+ end
+
+ def ==(other)
+ self.class == other.class &&
+ self.id == other.id &&
+ self.tag == other.tag
+ end
+ end
+ end
+end