mie: builtin: add some diagnostics for value resolution
This commit is contained in:
@@ -9,8 +9,28 @@
|
||||
MIE_DIAG_CLASS_LIST_BEGIN(mie_builtin_diag)
|
||||
MIE_DIAG_CLASS(UNRECOGNISED_TOKEN, ERROR, "Unrecognised token")
|
||||
MIE_DIAG_CLASS(UNRESOLVED_VALUE, ERROR, "Unresolved value")
|
||||
MIE_DIAG_CLASS(UNRESOLVED_SUCCESSOR, ERROR, "Unresolved successor")
|
||||
MIE_DIAG_CLASS_LIST_END(mie_builtin_diag)
|
||||
|
||||
MIE_DIAG_MSG_LIST_BEGIN(mie_builtin_msg)
|
||||
MIE_DIAG_MSG(UNRECOGNISED_TOKEN, "encountered an unrecognised token.")
|
||||
MIE_DIAG_MSG(UNRESOLVED_VALUE, "cannot resolve this value reference.")
|
||||
MIE_DIAG_MSG(
|
||||
CANNOT_FIND_BLOCK,
|
||||
"cannot find a block with this name in this region.")
|
||||
MIE_DIAG_MSG(
|
||||
VALUE_DEFINED_IN_NON_DOMINANT_BLOCK,
|
||||
"this value cannot be referenced here, as it is defined in a "
|
||||
"block that does not dominate this block.")
|
||||
MIE_DIAG_MSG(
|
||||
VALUE_DEFINED_AFTER_USE,
|
||||
"this value cannot be referenced here, as it is not defined "
|
||||
"until later in this block.")
|
||||
MIE_DIAG_MSG(
|
||||
VALUE_DEFINED_OUTSIDE_ISOLATED_REGION,
|
||||
"this value cannot be referenced here, as this region is "
|
||||
"isolated from above, and the definition for this value is "
|
||||
"outside of this region.")
|
||||
MIE_DIAG_MSG(
|
||||
VALUE_DEFINED_IN_BLOCK, "the value is defined in this block.")
|
||||
MIE_DIAG_MSG_LIST_END(mie_builtin_msg)
|
||||
|
||||
@@ -18,11 +18,17 @@ struct mie_float_type;
|
||||
enum mie_builtin_diag {
|
||||
MIE_BUILTIN_E_UNRECOGNISED_TOKEN,
|
||||
MIE_BUILTIN_E_UNRESOLVED_VALUE,
|
||||
MIE_BUILTIN_E_UNRESOLVED_SUCCESSOR,
|
||||
};
|
||||
|
||||
enum mie_builtin_msg {
|
||||
MIE_BUILTIN_MSG_UNRECOGNISED_TOKEN,
|
||||
MIE_BUILTIN_MSG_UNRESOLVED_VALUE,
|
||||
MIE_BUILTIN_MSG_CANNOT_FIND_BLOCK,
|
||||
MIE_BUILTIN_MSG_VALUE_DEFINED_IN_NON_DOMINANT_BLOCK,
|
||||
MIE_BUILTIN_MSG_VALUE_DEFINED_AFTER_USE,
|
||||
MIE_BUILTIN_MSG_VALUE_DEFINED_OUTSIDE_ISOLATED_REGION,
|
||||
MIE_BUILTIN_MSG_VALUE_DEFINED_IN_BLOCK,
|
||||
};
|
||||
|
||||
enum mie_float_width {
|
||||
|
||||
Reference in New Issue
Block a user