@@ -19,6 +19,8 @@ val init : unit -> unit
19
19
val token : Lexing .lexbuf -> Parser .token
20
20
val skip_hash_bang : Lexing .lexbuf -> unit
21
21
22
+ type directive_type
23
+
22
24
type error =
23
25
| Illegal_character of char
24
26
| Illegal_escape of string
@@ -28,6 +30,14 @@ type error =
28
30
| Keyword_as_label of string
29
31
| Invalid_literal of string
30
32
| Invalid_directive of string * string option
33
+ | Unterminated_paren_in_conditional
34
+ | Unterminated_if
35
+ | Unterminated_else
36
+ | Unexpected_token_in_conditional
37
+ | Expect_hash_then_in_conditional
38
+ | Illegal_semver of string
39
+ | Unexpected_directive
40
+ | Conditional_expr_expected_type of directive_type * directive_type
31
41
;;
32
42
33
43
exception Error of error * Location. t
@@ -61,3 +71,17 @@ val set_preprocessor :
61
71
(unit -> unit ) ->
62
72
((Lexing .lexbuf -> Parser .token ) -> Lexing .lexbuf -> Parser .token ) ->
63
73
unit
74
+
75
+ (* * semantic version predicate *)
76
+ val semver : Location .t -> string -> string -> bool
77
+
78
+ val filter_directive_from_lexbuf : Lexing .lexbuf -> (int * int ) list
79
+
80
+ val replace_directive_int : string -> int -> unit
81
+ val replace_directive_string : string -> string -> unit
82
+ val replace_directive_bool : string -> bool -> unit
83
+ val remove_directive_built_in_value : string -> unit
84
+
85
+ (* * @return false means failed to define *)
86
+ val define_key_value : string -> string -> bool
87
+ val list_variables : Format .formatter -> unit
0 commit comments