Pegmatite::Pattern::Optional
Inherits Pegmatite::Pattern < Pegmatite::DSL::Methods < Reference < Object
Pattern::Optional specifies that a pattern that can either match or not.
If the child pattern doesn't match, zero bytes are consumed. Otherwise, the result of the child pattern is returned directly. This pattern will never fail.
Constructors
new(child : Pattern)
SourceInstance methods
_match(source, offset, state) : MatchResult
Sourcedescription
Sourcedsl_name
Sourceinspect(io)
Source