diff options
author | Chimrod <> | 2024-02-05 09:32:10 +0100 |
---|---|---|
committer | Chimrod <> | 2024-02-08 14:16:41 +0100 |
commit | 916d37b93c8ad0e2fbe98377093726baf051b708 (patch) | |
tree | e8c6b77368fb8971af11a425ac61e0b3e2014beb /test/syntax.ml | |
parent | d7a13b0e5d6e746993e67a291376bd79766e0ed1 (diff) |
Ignore the global checkers if there is a syntax error; ignore error during recovery after a syntax error
Diffstat (limited to 'test/syntax.ml')
-rw-r--r-- | test/syntax.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/syntax.ml b/test/syntax.ml index 87fe2ab..aa3eecb 100644 --- a/test/syntax.ml +++ b/test/syntax.ml @@ -29,10 +29,11 @@ let parse : string -> (S.pos location, Qsp_syntax.Report.t) result = in let context = Parser.initialize () in Qparser.Analyzer.parse (module Parser) lexing context - |> Result.map (fun (location, _report) -> + |> Result.map (fun v -> (* Uncatched excteptions here, but we are in the tests… If it’s fail here I have an error in the code. *) - Array.get location 0 |> Check.get location_id |> Option.get) + Array.get v.Qparser.Analyzer.content 0 + |> Check.get location_id |> Option.get) let location : S.pos location Alcotest.testable = let equal = equal_location (fun _ _ -> true) in |