onefig 1.3.4

The only configuration language you need; a configuration language for configuration files.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use flexar::prelude::*;
use crate::{lexer::Token, errors::SyntaxError};

#[derive(Debug)]
pub struct Ident(pub Box<str>);

flexar::parser! {
    [[Ident] parxt: Token]
    parse {
        (Ident(x)) => ((x.clone()));
        (Str(x)) => ((x.clone()));
        (Int(x)) => ((x.to_string().into_boxed_str()));
        (Bool(x)) => ((x.to_string().into_boxed_str()));
    } else Err(SY006: parxt.current_token());
}