aboutsummaryrefslogtreecommitdiff
path: root/macros/src/syntax.rs
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2023-01-03 07:51:35 +0100
committerGravatar Henrik Tjäder <henrik@tjaders.com> 2023-03-01 00:31:04 +0100
commitd7ed7a8b9f78344f6855fa1c2655ae0d85e44068 (patch)
treea5888257f8047b3ba67e143aa5104c1f496ad036 /macros/src/syntax.rs
parent9829d0ac07180967208403610bc9a25249b9fe85 (diff)
downloadrtic-d7ed7a8b9f78344f6855fa1c2655ae0d85e44068.tar.gz
rtic-d7ed7a8b9f78344f6855fa1c2655ae0d85e44068.tar.zst
rtic-d7ed7a8b9f78344f6855fa1c2655ae0d85e44068.zip
syntax: Remove parse settings struct
Diffstat (limited to 'macros/src/syntax.rs')
-rw-r--r--macros/src/syntax.rs24
1 files changed, 4 insertions, 20 deletions
diff --git a/macros/src/syntax.rs b/macros/src/syntax.rs
index 09b2ab3d..d6f5a476 100644
--- a/macros/src/syntax.rs
+++ b/macros/src/syntax.rs
@@ -13,7 +13,6 @@ mod accessors;
pub mod analyze;
pub mod ast;
mod check;
-mod optimize;
mod parse;
/// An ordered map keyed by identifier
@@ -31,10 +30,10 @@ pub enum Context<'a> {
/// The `init`-ialization function
Init,
- /// A software task: `#[task]`
+ /// A async software task
SoftwareTask(&'a Ident),
- /// A hardware task: `#[exception]` or `#[interrupt]`
+ /// A hardware task
HardwareTask(&'a Ident),
}
@@ -93,36 +92,21 @@ impl<'a> Context<'a> {
}
}
-/// Parser and optimizer configuration
-#[derive(Default)]
-#[non_exhaustive]
-pub struct Settings {
- /// Whether to accept the `binds` argument in `#[task]` or not
- pub parse_binds: bool,
- /// Whether to parse `extern` interrupts (functions) or not
- pub parse_extern_interrupt: bool,
- /// Whether to "compress" priorities or not
- pub optimize_priorities: bool,
-}
-
/// Parses the input of the `#[app]` attribute
pub fn parse(
args: TokenStream,
input: TokenStream,
- settings: Settings,
) -> Result<(ast::App, analyze::Analysis), syn::parse::Error> {
- parse2(args.into(), input.into(), settings)
+ parse2(args.into(), input.into())
}
/// `proc_macro2::TokenStream` version of `parse`
pub fn parse2(
args: TokenStream2,
input: TokenStream2,
- settings: Settings,
) -> Result<(ast::App, analyze::Analysis), syn::parse::Error> {
- let mut app = parse::app(args, input, &settings)?;
+ let app = parse::app(args, input)?;
check::app(&app)?;
- optimize::app(&mut app, &settings);
match analyze::app(&app) {
Err(e) => Err(e),
an be viewed in "Matrix-Static" by users who aren't registered on Matrix (e.g. for previewing). Hopefully this will also get the room content into search engines. n.b. The new matrix.to URL uses the room name instead of the room ID, because the ID didn't work with Matrix-Static, and the matrix.to README at: https://github.com/matrix-org/matrix.to says... "Note that linking to rooms by ID should only be used for rooms to which the target user has been invited: these links cannot be assumed to work for all visitors." 2019-10-10critical sections: each task gets its own contextGravatar chrysn 1-1/+1 Fixing what was probably a copy-paste error; different tasks each have different types for their context argument. 2019-09-17fix linkchecker warningGravatar Jorge Aparicio 1-1/+1 2019-09-17fix more linksGravatar Jorge Aparicio 8-15/+15 2019-09-17update the CHANGELOGGravatar Jorge Aparicio 2-3/+38 also fix link to the older documentation 2019-09-17www: fix book placementGravatar Jorge Aparicio 1-4/+3 2019-09-17www: prefix latest docs with the minor versionGravatar Jorge Aparicio 1-3/+6 2019-09-15remove reference from README to CONTRIBUTINGGravatar nils-grepit 1-1/+1 The book (which includes the text from README.md) does not need to go into that level of detail. 2019-09-15turn git deps into crates.io depsGravatar Jorge Aparicio 2-4/+2 2019-09-15add CONTRIBUTING.md and link to Matrix roomGravatar nils-grepit 2-0/+26 2019-09-15Revert "Fixed install script"Gravatar Emil Fresk 1-2/+2 This reverts commit 0f5894cafe3ebab6597174dbfcca0df38bb6da83. 2019-09-15Fixed install scriptGravatar Emil Fresk 1-2/+2 2019-09-15fix install scriptGravatar Jorge Aparicio 1-1/+1 2019-09-15Book fixGravatar Emil Fresk 1-1/+1 2019-09-150.4: don't cross compile docsGravatar Jorge Aparicio 1-0/+1 2019-09-15One more place updatedGravatar Emil Fresk 1-1/+1 2019-09-15faster doc builds and fix redirect on 0.4Gravatar Jorge Aparicio 2-12/+16 2019-09-15fix redirects and CNAMEGravatar Jorge Aparicio 2-4/+11 2019-09-15Updated links in README for rtfm.rsGravatar Emil Fresk 2-3/+3 2019-09-15link to older docs from the bookGravatar Jorge Aparicio 1-1/+4