class Luce::CodeSyntax

Overview

Matches backtick-enclosed inline code blocks

Defined in:

luce/inline_syntaxes/code_syntax.cr

Constructors

Instance Method Summary

Instance methods inherited from class Luce::InlineSyntax

matches?(parser : InlineParser, start_match_pos : Int32 | Nil = nil) : Bool matches?, on_match(parser : InlineParser, match : Regex::MatchData) : Bool on_match, pattern : Regex pattern

Constructor methods inherited from class Luce::InlineSyntax

new(pattern : String, start_character : Int32 | Nil = nil, case_sensitive : Bool = true) new

Constructor Detail

def self.new #

Instance Method Detail

def matches?(parser : InlineParser, start_pos : Int32 | Nil = nil) : Bool #
Description copied from class Luce::InlineSyntax

Tries to match at the parser's current position.

The parser's position can be overriden with start_match_pos. Return whether or not the pattern successfully matched.


def on_match(parser : InlineParser, match : Regex::MatchData) : Bool #
Description copied from class Luce::InlineSyntax

Processes match, adding nodes to parser and possibly advancing parser.

Will return whether the caller should advance parser by match[0].size.