Simplify parser module structure, add several syntax elements

This commit is contained in:
Juno Takano 2025-12-20 21:25:06 -03:00
commit e3d5686c7b
11 changed files with 348 additions and 186 deletions

View file

@ -14,7 +14,7 @@ impl Paragraph {
impl Parseable for Paragraph {
fn probe(lexeme: &Lexeme) -> bool {
// lexeme for paragraph is any non-whitespace, parser knows the context
let raw = lexeme.to_raw();
let raw = lexeme.text();
let trimmed = raw.trim();
!trimmed.is_empty() && trimmed != "\n"
}