Class: Strling::Core::IRClassLiteral
- Inherits:
-
IRClassItem
- Object
- IRClassItem
- Strling::Core::IRClassLiteral
- Defined in:
- lib/strling/core/ir.rb
Overview
Represents a literal character in a character class in the IR.
Matches the exact character.
Instance Attribute Summary collapse
-
#ch ⇒ String
The character.
Instance Method Summary collapse
-
#initialize(ch) ⇒ IRClassLiteral
constructor
A new instance of IRClassLiteral.
- #to_dict ⇒ Object
Constructor Details
#initialize(ch) ⇒ IRClassLiteral
Returns a new instance of IRClassLiteral.
154 155 156 |
# File 'lib/strling/core/ir.rb', line 154 def initialize(ch) @ch = ch end |
Instance Attribute Details
#ch ⇒ String
Returns The character.
151 152 153 |
# File 'lib/strling/core/ir.rb', line 151 def ch @ch end |
Instance Method Details
#to_dict ⇒ Object
158 159 160 |
# File 'lib/strling/core/ir.rb', line 158 def to_dict { 'ir' => 'Char', 'char' => ch } end |