lang: matrix parser!

This commit is contained in:
Schrottkatze 2024-04-24 19:37:52 +02:00
commit 2bea3994c2
No known key found for this signature in database
6 changed files with 144 additions and 12 deletions

View file

@ -1,14 +1,18 @@
use crate::parser::{syntax_kind::SyntaxKind::*, Parser};
use crate::parser::{syntax_kind::SyntaxKind::*, CompletedMarker, Parser};
use super::lit::literal;
pub fn instr(p: &mut Parser) {
pub fn instr(p: &mut Parser) -> Option<CompletedMarker> {
if !p.at(IDENT) {
return None;
}
let instr = p.start();
instr_name(p);
instr_params(p);
instr.complete(p, INSTR);
Some(instr.complete(p, INSTR))
}
fn instr_name(p: &mut Parser) {