Module OpamParserTypes.FullPosSource
OpamParserTypes transitional module with full position types
Source file positions
Full position
with_pos type, used for all units, embedding the element pelem ans its position pos
type env_update_op =
OpamParserTypes.FullPos.env_update_op_kind OpamParserTypes.FullPos.with_postype value_kind = | Bool of bool(*
*)boolatoms| Int of int(*
*)intatoms| String of string(*
*)stringatoms| Relop of OpamParserTypes.FullPos.relop * OpamParserTypes.FullPos.value * OpamParserTypes.FullPos.value(*Relational operators with two values (e.g.
*)os != "win32")| Prefix_relop of OpamParserTypes.FullPos.relop * OpamParserTypes.FullPos.value(*Relational operators in prefix position (e.g.
*)< "4.07.0")| Logop of OpamParserTypes.FullPos.logop * OpamParserTypes.FullPos.value * OpamParserTypes.FullPos.value(*Logical operators
*)| Pfxop of OpamParserTypes.FullPos.pfxop * OpamParserTypes.FullPos.value(*Prefix operators
*)| Ident of string(*Identifiers
*)| List of OpamParserTypes.FullPos.value list OpamParserTypes.FullPos.with_pos(*Lists of values (
*)[x1 x2 ... x3])| Group of OpamParserTypes.FullPos.value list OpamParserTypes.FullPos.with_pos(*Groups of values (
*)(x1 x2 ... x3))| Option of OpamParserTypes.FullPos.value * OpamParserTypes.FullPos.value list OpamParserTypes.FullPos.with_pos(*Value with optional list (
*)x1 {x2 x3 x4})| Env_binding of OpamParserTypes.FullPos.value * OpamParserTypes.FullPos.env_update_op * OpamParserTypes.FullPos.value(*Environment variable binding (
*)FOO += "bar")
Base values
type opamfile_section = {section_kind : string OpamParserTypes.FullPos.with_pos;(*Section kind (e.g.
*)extra-source)section_name : string OpamParserTypes.FullPos.with_pos option;(*Section name (e.g.
*)"myfork.patch")section_items : OpamParserTypes.FullPos.opamfile_item list OpamParserTypes.FullPos.with_pos;(*Content of the section
*)
}An opamfile section
and opamfile_item_kind = | Section of OpamParserTypes.FullPos.opamfile_section(*e.g.
*)kind ["name"] { ... }| Variable of string OpamParserTypes.FullPos.with_pos * OpamParserTypes.FullPos.value(*e.g.
*)opam-version: "2.0"
An opamfile is composed of sections and variable definitions
and opamfile_item =
OpamParserTypes.FullPos.opamfile_item_kind OpamParserTypes.FullPos.with_postype opamfile = {file_contents : OpamParserTypes.FullPos.opamfile_item list;(*Content of the file
*)file_name : OpamParserTypes.FullPos.file_name;(*Name of the disk file this record was loaded from
*)
}A file is a list of items and the filename