use crate::SyntaxKind::{EOF, HASH, L_BRACE, NEWLINE, TAG, TAG_LINE, TAGS};
use super::Parser;
pub(crate) fn tag_line(p: &mut Parser<'_, '_>) {
p.start_node(TAG_LINE);
tags(p);
if p.at(NEWLINE) {
p.bump();
} else if !p.at_eof() {
p.error("expected newline after tags".into());
}
p.finish_node();
}
pub(crate) fn tags(p: &mut Parser<'_, '_>) {
p.start_node(TAGS);
while p.current() == HASH {
tag(p);
}
p.finish_node();
}
fn tag(p: &mut Parser<'_, '_>) {
p.start_node(TAG);
p.skip_ws();
p.bump_assert(HASH);
loop {
if p.at_eof() {
break;
}
match p.nth_raw(0) {
HASH | NEWLINE | EOF => break,
L_BRACE => {
super::inline::inline_logic(p);
}
_ => p.bump(),
}
}
p.finish_node();
}