Cobol_preproc.Diagnostics
type error =
| Copybook_lookup_error of {
copyloc : Cobol_common.Srcloc.TYPES.srcloc option;
lnf : Cobol_common.Copybook.lookup_error;
}
| Cyclic_copy of {
copyloc : Cobol_common.Srcloc.TYPES.srcloc;
filename : string;
}
| Feature_error of Cobol_config.DIAG.error
| Forbidden of {
loc : Cobol_common.Srcloc.TYPES.srcloc;
stuff : forbidden_stuff;
}
| Invalid of {
loc : Cobol_common.Srcloc.TYPES.srcloc;
stuff : invalid_stuff;
}
| Literal_error of Cobol_data.Diagnostics.error
| Malformed of {
loc : Cobol_common.Srcloc.TYPES.srcloc;
stuff : malformed_stuff;
}
| Missing of {
loc : Cobol_common.Srcloc.TYPES.srcloc;
stuff : missing_stuff;
}
| Unexpected of {
loc : Cobol_common.Srcloc.TYPES.srcloc;
stuff : unexpected_stuff;
}
| Unterminated of {
loc : Cobol_common.Srcloc.TYPES.srcloc;
stuff : unterminated_stuff;
}
and unexpected_stuff =
| Alphanumeric_literal
| Elif_compiler_directive of {
suggestion : suggested_missing option;
}
| Else_compiler_directive of {
suggestion : suggested_missing option;
}
| EndIf_compiler_directive
| Pseudotext
and suggested_missing =
| EndIf_compiler_directive_missing of {
initial_if_loc : Cobol_common.Srcloc.TYPES.srcloc;
}
and unterminated_stuff =
| If_compiler_directive of {
suggested_endif_loc : Cobol_common.Srcloc.TYPES.srcloc;
}
| Exec_block
val error_loc : error -> Cobol_common.srcloc option
val pp_forbidden_stuff : Stdlib.Format.formatter -> forbidden_stuff -> unit
val pp_invalid_stuff : Stdlib.Format.formatter -> invalid_stuff -> unit
val pp_suggestion : Stdlib.Format.formatter -> suggested_missing -> unit
val pp_missing_stuff : Stdlib.Format.formatter -> missing_stuff -> unit
val pp_unexpected_stuff : Stdlib.Format.formatter -> unexpected_stuff -> unit
val pp_unterminated : Stdlib.Format.formatter -> unterminated_stuff -> unit
val pp_error : Stdlib.Format.formatter -> error -> unit
type warning =
| Feature_warning of Cobol_config.DIAG.warning
| Ignored of {
loc : Cobol_common.Srcloc.TYPES.srcloc;
item : ignored_item;
}
| Incompatible of {
loc : Cobol_common.Srcloc.TYPES.srcloc;
stuff : incompatible_warning_stuff;
}
| Undefined_warning of {
loc : Cobol_common.Srcloc.TYPES.srcloc;
stuff : undefined_warning_stuff;
}
| Unexpected_warning of {
loc : Cobol_common.Srcloc.TYPES.srcloc;
stuff : unexpected_warning_stuff;
}
val warning_loc : warning -> Cobol_common.srcloc
val pp_ignored_item : Stdlib.Format.formatter -> ignored_item -> unit
val pp_incompatible_warning_stuff :
Stdlib.Format.formatter ->
incompatible_warning_stuff ->
unit
val pp_undefined_warning_stuff :
Stdlib.Format.formatter ->
undefined_warning_stuff ->
unit
val pp_unexpected_warning_stuff :
Stdlib.Format.formatter ->
unexpected_warning_stuff ->
unit
val pp_warning : Stdlib.Format.formatter -> warning -> unit
type t = diagnostics
val none : diagnostics
val union : diagnostics -> diagnostics -> diagnostics
val add_error : error -> diagnostics -> diagnostics
val add_warning : warning -> diagnostics -> diagnostics
val has_errors : diagnostics -> bool
val add_src_diagnostics :
Cobol_preproc__.Src_diagnostics.diagnostics ->
diagnostics ->
diagnostics
val add_literal_diagnostics :
Cobol_data.Diagnostics.diagnostics ->
diagnostics ->
diagnostics
val translate : t -> Cobol_common__Diagnostics.TYPES.diagnostics