-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add minimal preprocessor for assembly files #458
Conversation
55c8ac7
to
f8c96e9
Compare
Don't forget to run |
This looks good. Just needs a |
Thanks, done! |
tools/rpp/src/lib.rs
Outdated
let key = match parts.next() { | ||
Some(k) => k, | ||
None => { | ||
return Err(ParsingError::new( | ||
String::from("#define has no name"), | ||
ctx.line_num, | ||
)) | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this could be written a bit shorter like this:
let key = parts.next().ok_or_else(|| ParsingError::new(...))?;
Similarly in other places in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! Done.
b29ed9c
to
fdedc86
Compare
In order to support macro definitions and code reuse in oreboot assembly, add a minimal preprocessor library. This library only supports the "#include" and "#define" preprocessor directives and has no toolchain-specific dependencies. Signed-off-by: Jordan Hand <jhand@google.com>
In order to support macro definitions and code reuse in oreboot
assembly, add a minimal preprocessor library. This library only supports
the "#include" and "#define" preprocessor directives and has no
toolchain-specific dependencies.
Signed-off-by: Jordan Hand jhand@google.com