class Pegmatite::Pattern::UnicodeRange

Overview

Pattern::UnicodeRange is used to consume a single character from within a specified contiguous range of acceptable codepoints.

Parsing will fail if a valid UTF-32 codepoint couldn't be parsed, or if the parsed codepoint didn't fall in the specified range. Otherwise, the pattern succeeds, consuming the matched bytes.

Defined in:

pegmatite/pattern/unicode_range.cr

Constructors

Instance Method Summary

Instance methods inherited from class Pegmatite::Pattern

_match(source, offset, state) : MatchResult _match, match(source, offset, state) : MatchResult match

Instance methods inherited from module Pegmatite::DSL::Methods

>>(other) >>, ^(other) ^, |(other) |, ~ ~, dynamic_pop(label) dynamic_pop, dynamic_push(label) dynamic_push, maybe maybe, named(label, tokenize = true) named, repeat(min = 0, max = nil) repeat, repeat_exactly(times) repeat_exactly, then_eof then_eof

Constructor Detail

def self.new(min : UInt32, max : UInt32) #

[View source]

Instance Method Detail

def _match(source, offset, state) : MatchResult #

[View source]
def description #

[View source]
def dsl_name #

[View source]
def inspect(io) #

[View source]