class

Obelisk::ContextAwareRule

Inherits Reference < Object

Context-aware rule that can make decisions based on parsing context

Constructors

new(pattern : Regex, action : RuleAction, condition : Proc(ParsingContext, Bool) | Nil = nil, priority : Int32 = 0, description : String = "")
Source

Instance methods

action
Source
applicable?(context : ParsingContext) : Bool

Check if the rule is applicable in the current context

Source
condition
Source
description
Source
match(context : ParsingContext) : Regex::MatchData | Nil

Check if this rule matches at the current context

Source
pattern
Source
priority
Source