From ddaf05544d182bd75471ce307458daf417c9e17f Mon Sep 17 00:00:00 2001 From: Alasdair Date: Wed, 6 Feb 2019 23:08:48 +0000 Subject: 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. --- src/process_file.ml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/process_file.ml') 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 -- cgit v1.2.3