Module IR__Annot
The Smallfoot Intermediate Language: Annotations
type t={class_name : string;name of the annotation
parameters : parameter list;}Type to represent an
@Annotationwith potentially complex parameter values such as arrays or other annotations.
and parameter={name : string option;value : value;}and value=|Str of string|Bool of bool|Enum of{class_typ : IR.Typ.t;value : string;}|Array of value list|Class of IR.Typ.t|Annot of tType to represent possible annotation parameter values. Note that support for numeric parameters is missing for now due to an issue with
MaximumSharingandint64.
val compare : t -> t -> intval compare_parameter : parameter -> parameter -> intval compare_value : value -> value -> intval equal : t -> t -> boolval equal_parameter : parameter -> parameter -> boolval equal_value : value -> value -> boolval compare : t -> t -> intval compare_parameter : parameter -> parameter -> intval compare_value : value -> value -> int
val volatile : tannotation for fields marked with the "volatile" keyword
val final : tannotation for fields marked with the "final" keyword
val has_matching_str_value : pred:(string -> bool) -> value -> boolCheck if annotation parameter value contains a string satisfying a predicate. For convenience it works both with raw
StrandStrinsideArray.
val find_parameter : t -> name:string -> value optionval pp : F.formatter -> t -> unitPretty print an annotation.
module Item : sig ... endmodule Class : sig ... endmodule Method : sig ... end