aboutsummaryrefslogtreecommitdiff
path: root/lib/qparser
diff options
context:
space:
mode:
authorChimrod <>2023-11-03 10:19:29 +0100
committerChimrod <>2023-11-03 10:19:29 +0100
commit180529c30282d39f3506633716e3fe439db03309 (patch)
tree4535ffa8574c2caf62ee087ca4e52d1db1e9e3d5 /lib/qparser
parentfd02a44392304986a756e7d06f8142538b386529 (diff)
Extracting the report from the Location checker is now in it’s own function
Diffstat (limited to 'lib/qparser')
-rw-r--r--lib/qparser/analyzer.ml1
-rw-r--r--lib/qparser/parser.mly2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/qparser/analyzer.ml b/lib/qparser/analyzer.ml
index a79535e..e3a2774 100644
--- a/lib/qparser/analyzer.ml
+++ b/lib/qparser/analyzer.ml
@@ -36,6 +36,7 @@ let parse :
in
evaluation
+ |> Result.map (fun r -> (r, S.Location.v r))
|> Result.map_error (fun e ->
let message =
match e.IncrementalParser.code with
diff --git a/lib/qparser/parser.mly b/lib/qparser/parser.mly
index 81b630a..73d77b7 100644
--- a/lib/qparser/parser.mly
+++ b/lib/qparser/parser.mly
@@ -18,7 +18,7 @@
%}
%parameter<Analyzer: Qsp_syntax.S.Analyzer>
-%start <(Analyzer.Location.t * Qsp_syntax.Report.t list)>main
+%start <(Analyzer.Location.t)>main
%on_error_reduce expression instruction unary_operator assignation_operator
%%