class Crst::Parser

Overview

Main parser class for reStructuredText documents

This class handles the parsing of RST text into an abstract syntax tree (AST) composed of Node objects. The parsing is done line by line, recognizing various RST constructs.

Example:

parser = Crst::Parser.new("Hello World")
doc = parser.parse

Defined in:

crst/parser.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(input : String, config : Config = Config.new) #

Initialize the parser with RST input text and configuration


[View source]

Instance Method Detail

def parse : Document #

Parse the input text and return the root Document node

Returns a Document containing all parsed nodes


[View source]
def section_levels : Array(Char) #

[View source]
def section_levels=(section_levels : Array(Char)) #

[View source]