From 26510d7798daac30a400e8d04278a86ea8b83983 Mon Sep 17 00:00:00 2001 From: Alasdair Date: Tue, 14 Apr 2020 17:16:29 +0100 Subject: 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. --- src/process_file.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/process_file.ml') diff --git a/src/process_file.ml b/src/process_file.ml index d2a86595..116788b9 100644 --- a/src/process_file.ml +++ b/src/process_file.ml @@ -108,6 +108,8 @@ let have_symbol symbol = let clear_symbols () = symbols := default_symbols +let add_symbol str = symbols := StringSet.add str !symbols + let cond_pragma l defs = let depth = ref 0 in let in_then = ref true in -- cgit v1.2.3