Initial texrra engine
Rename the crate, binary, core crate, font families, env vars, and internal commands from texcraft/tex-engine to texrra. Serve the separately versioned texrra-web frontend from TEXRRA_WEB_DIR, ../web, or ./web instead of embedding index.html. Add starred section heading support and an arXiv template conformance fixture.
This commit is contained in:
commit
bb1d9e0561
147 files changed
+66719
No files matched your search
Vendored
+59
@@ -0,0 +1,59 @@
|
||||
macro_rules! get_required_element {
|
||||
($stream :expr, $expected: expr, $guidance: expr, $($pat:pat => $result:expr,)+) => {
|
||||
// TODO: probably should call get_optional_element_with_token
|
||||
match ($stream).next()? {
|
||||
Some(token) => match token.value() {
|
||||
$(
|
||||
$pat => {
|
||||
Some($result)
|
||||
},
|
||||
)+
|
||||
_ => {
|
||||
$stream.error(crate::parse::Error::new($expected, Some(token), $guidance))?;
|
||||
$stream.back(token);
|
||||
None
|
||||
},
|
||||
}
|
||||
None => {
|
||||
$stream.error(crate::parse::Error::new($expected, None, $guidance))?;
|
||||
None
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! get_optional_element {
|
||||
($stream :expr, $($pat:pat => $result:expr,)+) => {
|
||||
match ($stream).next()? {
|
||||
None => None,
|
||||
Some(token) => match token.value() {
|
||||
$(
|
||||
$pat => Some($result),
|
||||
)+
|
||||
_ => {
|
||||
$stream.back(token);
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! get_optional_element_with_token {
|
||||
($stream :expr, $($pat:pat => $result:expr,)+) => {
|
||||
match ($stream).next()? {
|
||||
None => None,
|
||||
Some(token) => match token.value() {
|
||||
$(
|
||||
$pat => {
|
||||
Some(($result, token))
|
||||
},
|
||||
)+
|
||||
_ => {
|
||||
$stream.back(token);
|
||||
None
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user