summaryrefslogtreecommitdiff
path: root/src/process_file.ml
diff options
context:
space:
mode:
authorAlasdair2019-02-06 23:08:48 +0000
committerAlasdair2019-02-06 23:08:48 +0000
commitddaf05544d182bd75471ce307458daf417c9e17f (patch)
treed3101591badba8b943c9ffd1e06189387f713386 /src/process_file.ml
parentcd6466eef8a7cb878010f5d9c6f6349606393bb1 (diff)
Emacs mode understands relationships between Sail files
Allow a file sail.json in the same directory as the sail source file which contains the ordering and options needed for sail files involved in a specific ISA definition. I have an example for v8.5 in sail-arm. The interactive Sail process running within emacs then knows about the relationship between Sail files, so C-c C-l works for files in the ARM spec. Also added a C-c C-x command to jump to a type error. Requires yojson library to build interactive Sail.
Diffstat (limited to 'src/process_file.ml')
-rw-r--r--src/process_file.ml6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/process_file.ml b/src/process_file.ml
index 98dc725d..e8f255ff 100644
--- a/src/process_file.ml
+++ b/src/process_file.ml
@@ -239,12 +239,10 @@ let rec preprocess opts = function
let preprocess_ast opts (Parse_ast.Defs defs) = Parse_ast.Defs (preprocess opts defs)
-let convert_ast (order : Ast.order) (defs : Parse_ast.defs) : unit Ast.defs = Initial_check.process_ast order defs
-
-let load_file_no_check opts order f = convert_ast order (preprocess_ast opts (parse_file f))
+let load_file_no_check opts order f = Initial_check.process_ast (preprocess_ast opts (parse_file f))
let load_file opts order env f =
- let ast = convert_ast order (preprocess_ast opts (parse_file f)) in
+ let ast = Initial_check.process_ast (preprocess_ast opts (parse_file f)) in
Type_error.check env ast
let opt_just_check = ref false