Module: Parsr::Rules::Integer
- Includes:
- Numeric
- Defined in:
- lib/parsr/rules/integer.rb
Constant Summary
collapse
- PATTERN =
/#{SIGN}#{DIGITS}/
Constants included
from Numeric
Numeric::DIGITS, Numeric::SIGN
Class Method Summary
collapse
Class Method Details
.match(scanner) ⇒ Object
8
9
10
11
12
|
# File 'lib/parsr/rules/integer.rb', line 8
def match(scanner)
if scanner.scan(PATTERN)
Parsr::Token.new(Integer(scanner.matched))
end
end
|