skullbrain-parser 0.1.0

Parses skullbrain tokens into a concrete syntax tree (CST).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::*;

impl<'input, D: Diagnostics, C: ConcreteSyntaxTreeBuilder> ParserState<'input, D, C> {
    pub(super) fn parse_class_delc(&mut self) {
        self.parse_in_context(ScopeContext::Class, Self::_parse_class_delc)
    }

    fn _parse_class_delc(&mut self) {
        self.start_node(SyntaxKind::Class);
        self.parse_optional_modifiers();
        self.parse_token(SyntaxKind::Keyword);
        self.parse_name_followed_by_braced_expression(ParseError::expected_class_name_before());
        self.finish_node();
    }
}