Add documentation
This commit is contained in:
parent
8fe6710b4d
commit
db9d3769b4
1 changed files with 9 additions and 0 deletions
|
@ -283,6 +283,10 @@ fn parse_args<'a>(
|
||||||
Ok(args)
|
Ok(args)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Report a duplicate option error.
|
||||||
|
///
|
||||||
|
/// This function must be called immediately after the option token is parsed.
|
||||||
|
/// Otherwise, the suggestion will be incorrect.
|
||||||
fn err_duplicate_option<'a>(p: &mut Parser<'a>, symbol: Symbol, span: Span) {
|
fn err_duplicate_option<'a>(p: &mut Parser<'a>, symbol: Symbol, span: Span) {
|
||||||
let mut err = p
|
let mut err = p
|
||||||
.sess
|
.sess
|
||||||
|
@ -305,6 +309,11 @@ fn err_duplicate_option<'a>(p: &mut Parser<'a>, symbol: Symbol, span: Span) {
|
||||||
err.emit();
|
err.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Try to set the provided option in the provided `AsmArgs`.
|
||||||
|
/// If it is already set, report a duplicate option error.
|
||||||
|
///
|
||||||
|
/// This function must be called immediately after the option token is parsed.
|
||||||
|
/// Otherwise, the error will not point to the correct spot.
|
||||||
fn try_set_option<'a>(
|
fn try_set_option<'a>(
|
||||||
p: &mut Parser<'a>,
|
p: &mut Parser<'a>,
|
||||||
args: &mut AsmArgs,
|
args: &mut AsmArgs,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue