diff options
| author | Robert Norton | 2018-11-19 15:27:24 +0000 |
|---|---|---|
| committer | Robert Norton | 2018-11-19 15:27:24 +0000 |
| commit | b891846bef840ecbe5673c3b22cbd0f2cfceef0f (patch) | |
| tree | f40a1626b17a3cb0e373aaca925b32c938f52220 /src/process_file.ml | |
| parent | 1bc81fa6dcafcfe24fce3685c2eb61f882e6b65c (diff) | |
| parent | 8c2739ace6ddc9b506d8e6782a4075574115cb34 (diff) | |
Merge branch 'latex' into sail2
Diffstat (limited to 'src/process_file.ml')
| -rw-r--r-- | src/process_file.ml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/process_file.ml b/src/process_file.ml index 53293849..c3d0be0e 100644 --- a/src/process_file.ml +++ b/src/process_file.ml @@ -75,7 +75,8 @@ let parse_file ?loc:(l=Parse_ast.Unknown) (f : string) : Parse_ast.defs = with | Parser.Error -> let pos = Lexing.lexeme_start_p lexbuf in - raise (Fatal_error (Err_syntax (pos, "no information"))) + let tok = Lexing.lexeme lexbuf in + raise (Fatal_error (Err_syntax (pos, "current token: " ^ tok))) | Lexer.LexError(s,p) -> raise (Fatal_error (Err_lex (p, s))) end @@ -204,8 +205,8 @@ let rec preprocess opts = function let help = "Make sure the filename is surrounded by quotes or angle brackets" in (Util.warn ("Skipping bad $include " ^ file ^ ". " ^ help); preprocess opts defs) - | Parse_ast.DEF_pragma (p, arg, _) :: defs -> - (Util.warn ("Bad pragma $" ^ p ^ " " ^ arg); preprocess opts defs) + | Parse_ast.DEF_pragma (p, arg, l) :: defs -> + Parse_ast.DEF_pragma (p, arg, l) :: preprocess opts defs (* realise any anonymous record arms of variants *) | Parse_ast.DEF_type (Parse_ast.TD_aux |
