move asm parsing code into rustc_parse
This commit is contained in:
@@ -3525,3 +3525,73 @@ pub(crate) struct MoveSelfModifier {
|
||||
pub insertion_span: Span,
|
||||
pub modifier: String,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_asm_unsupported_operand)]
|
||||
pub(crate) struct AsmUnsupportedOperand<'a> {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub(crate) span: Span,
|
||||
pub(crate) symbol: &'a str,
|
||||
pub(crate) macro_name: &'static str,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_asm_underscore_input)]
|
||||
pub(crate) struct AsmUnderscoreInput {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_asm_sym_no_path)]
|
||||
pub(crate) struct AsmSymNoPath {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_asm_requires_template)]
|
||||
pub(crate) struct AsmRequiresTemplate {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_asm_expected_comma)]
|
||||
pub(crate) struct AsmExpectedComma {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_asm_expected_other)]
|
||||
pub(crate) struct AsmExpectedOther {
|
||||
#[primary_span]
|
||||
#[label(parse_asm_expected_other)]
|
||||
pub(crate) span: Span,
|
||||
pub(crate) is_inline_asm: bool,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_asm_non_abi)]
|
||||
pub(crate) struct NonABI {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_asm_expected_string_literal)]
|
||||
pub(crate) struct AsmExpectedStringLiteral {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_asm_expected_register_class_or_explicit_register)]
|
||||
pub(crate) struct ExpectedRegisterClassOrExplicitRegister {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user