mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
refactor(driver)!: removes the `NonVerbose frontend language
This commit is contained in:
parent
3772a22822
commit
a1b0601c16
@ -17,12 +17,11 @@ module Errors = Utils.Errors
|
||||
module Pos = Utils.Pos
|
||||
|
||||
(** Associates a {!type: Cli.frontend_lang} with its string represtation. *)
|
||||
let languages = [ ("en", `En); ("fr", `Fr); ("pl", `Pl); ("non-verbose", `NonVerbose) ]
|
||||
let languages = [ ("en", `En); ("fr", `Fr); ("pl", `Pl) ]
|
||||
|
||||
(** Associates a file extension with its corresponding {!type: Cli.frontend_lang} string
|
||||
representation. *)
|
||||
let extensions =
|
||||
[ (".catala_fr", "fr"); (".catala_en", "en"); (".catala_pl", "pl"); (".catala", "non-verbose") ]
|
||||
let extensions = [ (".catala_fr", "fr"); (".catala_en", "en"); (".catala_pl", "pl") ]
|
||||
|
||||
(** Entry function for the executable. Returns a negative number in case of error. Usage:
|
||||
[driver source_file debug dcalc unstyled wrap_weaved_output backend language max_prec_digits trace optimize scope_to_execute output_file]*)
|
||||
|
@ -222,13 +222,11 @@ module ParserAux (LocalisedLexer : Lexer_common.LocalisedLexer) = struct
|
||||
sedlex_with_menhir LocalisedLexer.lexer LocalisedLexer.token_list Incremental.source_file lexbuf
|
||||
end
|
||||
|
||||
module Parser_NonVerbose = ParserAux (Lexer_en)
|
||||
module Parser_En = ParserAux (Lexer_en)
|
||||
module Parser_Fr = ParserAux (Lexer_fr)
|
||||
module Parser_Pl = ParserAux (Lexer_pl)
|
||||
|
||||
let localised_parser : Cli.frontend_lang -> lexbuf -> Ast.source_file = function
|
||||
| `NonVerbose -> Parser_NonVerbose.commands_or_includes
|
||||
| `En -> Parser_En.commands_or_includes
|
||||
| `Fr -> Parser_Fr.commands_or_includes
|
||||
| `Pl -> Parser_Pl.commands_or_includes
|
||||
|
@ -12,12 +12,12 @@
|
||||
or implied. See the License for the specific language governing permissions and limitations under
|
||||
the License. *)
|
||||
|
||||
type frontend_lang = [ `Fr | `En | `NonVerbose | `Pl ]
|
||||
type frontend_lang = [ `Fr | `En | `Pl ]
|
||||
|
||||
type backend_lang = [ `Fr | `En | `Pl ]
|
||||
|
||||
let to_backend_lang (lang : frontend_lang) : backend_lang =
|
||||
match lang with `En | `NonVerbose -> `En | `Fr -> `Fr | `Pl -> `Pl
|
||||
match lang with `En | `Fr -> `Fr | `Pl -> `Pl
|
||||
|
||||
(** Source files to be compiled *)
|
||||
let source_files : string list ref = ref []
|
||||
|
@ -12,7 +12,7 @@
|
||||
or implied. See the License for the specific language governing permissions and limitations under
|
||||
the License. *)
|
||||
|
||||
type frontend_lang = [ `En | `Fr | `NonVerbose | `Pl ]
|
||||
type frontend_lang = [ `En | `Fr | `Pl ]
|
||||
|
||||
type backend_lang = [ `En | `Fr | `Pl ]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user