summaryrefslogtreecommitdiff
path: root/src/process_file.mli
diff options
context:
space:
mode:
authorAlasdair2020-04-14 17:16:29 +0100
committerAlasdair2020-04-14 17:29:15 +0100
commit26510d7798daac30a400e8d04278a86ea8b83983 (patch)
tree705fea19904ee1b4c1af3f349296ac7648f6bab9 /src/process_file.mli
parent8d28bb30b0ff1812fa0ad58147d42cddde3099da (diff)
Add add_symbol to the API of Process_file
Allows clients of sail as a library to define custom symbols for $ifdef and $ifndef Iterate vector concat assignment and tuple assignment to handle unusual nesting cases when compiling to C. These rewrites should really be one rewrite anyway though! Don't add type annotations when introducing tuple patterns during rewriting. I guess not adding them could also cause an error in some circumstances, but if that's the case it could probably be fixed by tweaking some rules in the type-checker.
Diffstat (limited to 'src/process_file.mli')
-rw-r--r--src/process_file.mli1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/process_file.mli b/src/process_file.mli
index d1fa2cb8..c9eb5e9e 100644
--- a/src/process_file.mli
+++ b/src/process_file.mli
@@ -54,6 +54,7 @@ val parse_file : ?loc:Parse_ast.l -> string -> Parse_ast.defs
val clear_symbols : unit -> unit
val have_symbol : string -> bool
+val add_symbol : string -> unit
val preprocess_ast : (Arg.key * Arg.spec * Arg.doc) list -> Parse_ast.defs -> Parse_ast.defs
val check_ast : Type_check.Env.t -> unit Ast.defs -> Type_check.tannot Ast.defs * Type_check.Env.t