diff options
author | Chimrod <> | 2024-12-09 10:13:50 +0100 |
---|---|---|
committer | Chimrod <> | 2024-12-09 10:13:50 +0100 |
commit | 65164f2ebe61a566d96119c2cde23eee6771007b (patch) | |
tree | 35ce714acce0da7bf172c8d7161b1be953af6f72 /bin/qsp_parser.ml | |
parent | 53c02501935b3cb2db78e79deb4d38c997505a95 (diff) |
Splitted the code and declare the test catalog in it’s own module
Diffstat (limited to 'bin/qsp_parser.ml')
-rw-r--r-- | bin/qsp_parser.ml | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/bin/qsp_parser.ml b/bin/qsp_parser.ml index cdd509c..a8ee457 100644 --- a/bin/qsp_parser.ml +++ b/bin/qsp_parser.ml @@ -19,12 +19,12 @@ type ctx = { error_nb : int; warn_nb : int; debug_nb : int; fatal_error : bool } *) let available_checks = [ - snd @@ Qsp_checks.Check.build (module Qsp_checks.Type_of); - snd @@ Qsp_checks.Check.build (module Qsp_checks.Dead_end); - snd @@ Qsp_checks.Check.build (module Qsp_checks.Nested_strings); - snd @@ Qsp_checks.Check.build (module Qsp_checks.Locations); - snd @@ Qsp_checks.Check.build (module Qsp_checks.Dup_test); - snd @@ Qsp_checks.Check.build (module Qsp_checks.Write_only); + snd @@ Qsp_syntax.Catalog.build (module Qsp_checks.Type_of); + snd @@ Qsp_syntax.Catalog.build (module Qsp_checks.Dead_end); + snd @@ Qsp_syntax.Catalog.build (module Qsp_checks.Nested_strings); + snd @@ Qsp_syntax.Catalog.build (module Qsp_checks.Locations); + snd @@ Qsp_syntax.Catalog.build (module Qsp_checks.Dup_test); + snd @@ Qsp_syntax.Catalog.build (module Qsp_checks.Write_only); ] let pp_module formatter (module A : Qsp_syntax.S.Analyzer) = @@ -70,8 +70,8 @@ let pp_modules formatter = (** Get all the tests to apply. - The expression is declared lazy in order to be sure to apply the filters - from the command line before. *) + The expression is declared lazy in order to be sure to apply the filters + from the command line before. *) let checkers : (module Qsp_syntax.S.Analyzer) Lazy.t = lazy (let module Check = Qsp_checks.Check.Make (struct @@ -89,8 +89,7 @@ let checkers : (module Qsp_syntax.S.Analyzer) Lazy.t = read properly), or until the first syntax error. The function update the context (list of errors) passed in arguments. *) -let parse_location : - type context. +let parse_location : type context. ctx:ctx ref -> (module Qsp_syntax.S.Analyzer with type context = context) -> context -> |