Commit Graph

41 Commits

Author SHA1 Message Date
Louis Gesbert
98fc97a241 Rewriting message calls to use the new intf 2024-04-10 19:26:23 +02:00
Louis Gesbert
4cec981f62 Move global options of Cli to their own module
This resolves a dependency cycle that would forbid `Cli` from using the modue
`File`, which was annoying.
2024-03-19 15:18:35 +01:00
Louis Gesbert
26c28bbd35 Fix line overflow message, and line offset errors 2024-03-08 17:36:00 +01:00
Louis Gesbert
9aed2c7479 support for parsing Module directives 2023-09-27 13:08:11 +02:00
Louis Gesbert
4910158aea Reformat 2023-09-01 16:24:27 +02:00
Denis Merigoux
385e19b9e1 Formatting 2023-06-15 10:51:31 +02:00
Aminata-Dev
10d147a8b1 Messages renamed to Message (lighter syntax) 2023-06-13 11:50:56 +02:00
Denis Merigoux
4e6efe08da All renamings done, on with actual refactor 2023-06-02 10:50:33 +02:00
Louis Gesbert
fc531777c0 Rework and normalise the Marked interface
The module is renamed to `Mark`, and functions renamed to avoid redundancy:

`Marked.mark` is now `Mark.add`
`Marked.unmark` is now `Mark.remove`
`Marked.map_under_mark` is now simply `Mark.map`
etc.

`Marked.same_mark_as` is replaced by `Mark.copy`, but with the arguments
swapped (which seemed more convenient throughout)

Since a type `Mark.t` would indicate a mark, and to avoid confusion, the type
`Marked.t` is renamed to `Mark.ed` as a shorthand for `Mark.marked` ; this part
can easily be removed if that's too much quirkiness.
2023-05-17 17:37:00 +02:00
Denis Merigoux
1a7982d225
Better printing 2023-03-21 11:24:19 +01:00
Louis Gesbert
f1e44619e0 LaTeX literate output: handle pygments coloration from within Catala
This leverages the embedded lexer already used for HTML output, and uses the
LaTeX pygments backend to colorise code directly, without the need for `minted`.
2023-03-13 22:33:48 +01:00
Louis Gesbert
508992de33 Embed the Pygments Catala lexer
This enables the HTML output to work without a custom Pygments installation (or
the proper venv activated)
2023-03-13 14:41:24 +01:00
Louis Gesbert
e1fe37ad09 Fix coloration in HTML output 2023-03-09 15:46:00 +01:00
Louis Gesbert
9fc4c0c10c Define Catala_utils.String as an overlay to stdlib string 2022-11-28 16:38:09 +01:00
Louis Gesbert
660e5775de Rename utils to catala_utils 2022-11-28 16:38:09 +01:00
Denis Merigoux
1c3d5b9a75
Fix all lines too long problems & update assets 2022-08-29 15:46:06 +02:00
Denis Merigoux
2c40802c57
Fix again line numbers in HTML 2022-08-16 11:46:20 +02:00
Denis Merigoux
c6e448a9b7
Correctly escape character in HTML weaving 2022-08-12 09:51:43 +02:00
Denis Merigoux
da06bedaca
Fix HTML line numbers 2022-08-11 16:15:52 +02:00
Denis Merigoux
3a3c08ba7c
Fix LegiFrance link generation 2022-08-10 10:52:46 +02:00
Denis Merigoux
228b6c830a
Fix line numbers in LaTeX and HTML with leading comments in code 2022-08-10 10:45:49 +02:00
Emile Rolley
f30dc376fd doc(compiler): add information about the html generation logic + complete the doc of the Utils module 2022-08-05 19:03:59 +02:00
Emile Rolley
eacc4dcc90 fix(html): sanitize href of line links in code blocks 2022-08-05 10:55:48 +02:00
Emile Rolley
ba620fca28 ocamlformat: new break-infix rule 2022-08-05 10:55:48 +02:00
Emile Rolley
03aebf7f1c feat(backends/html): improve the code generation with ToC and details tags 2022-08-05 10:55:45 +02:00
Emile Rolley
8a3d42b623 Revert "fix(html): sanitizes href of line links in code blocks"
This reverts commit 63b069a478.
2022-08-04 16:33:24 +02:00
Emile Rolley
63b069a478 fix(html): sanitizes href of line links in code blocks 2022-08-04 16:25:56 +02:00
Louis Gesbert
af0ac95682 Propagate renaming of Pos.mark* into module Marked
this patch is just a bunch of `sed` commands

```shell
cd compiler
sed -i 's/Pos.marked/Marked.pos/g' *.ml* **/*.ml*
sed -i 's/Pos.unmark/Marked.unmark/g' *.ml* **/*.ml*
sed -i 's/Pos\.get_position/Marked.get_mark/g' *.ml* **/*.ml*
sed -i 's/Pos\.same_pos_as/Marked.same_mark_as/g' *.ml* **/*.ml*
sed -i 's/Pos\.map_under_mark/Marked.map_under_mark/g' *.ml* **/*.ml*
sed -i 's/Pos\.mark/Marked.mark/g' *.ml* **/*.ml*
sed -i 's/Pos\.compare_marked/Marked.compare/g' *.ml* **/*.ml*
```
2022-07-11 16:51:54 +02:00
Denis Merigoux
fa0d94a2b6
Remove authors feature whose behavior is not satisfactory 2022-07-08 14:41:19 +02:00
Denis Merigoux
5e45940e1b
Merge branch 'master' into allocations_logement 2022-07-06 16:43:14 +02:00
Emile Rolley
f7787ff80d fix(compiler): fix line num for HTML generation 2022-06-08 17:21:15 +02:00
Denis Merigoux
ec225994af
Add "print_only_law" option 2022-05-26 19:05:06 +02:00
Louis Gesbert
9a95a3554c Add support for backend plugins using dynlink 2022-05-19 10:40:02 +02:00
Louis Gesbert
f9fc1a8e8b Formatting: sync with master 2022-05-12 15:10:55 +02:00
Denis Merigoux
8a0d5d7916
Factoring, nitpicks and updates 2022-05-05 14:01:30 +02:00
Denis Merigoux
dd8956ea01
Use pandoc for HTML 2022-05-05 14:01:09 +02:00
Denis Merigoux
5bd66142a6
Big reformatting
ocamlformat 0.19.0 -> 0.20.1
100 -> 80 columns per line
Reestablished @emilerolley's smart fun break
2022-03-08 15:03:14 +01:00
Louis Gesbert
12ec65601d Use format strings directly in debug/error/log functions
This avoids many intermediate calls to e.g. `Format.asprintf`; should result in
some cases in "more correct" use of `Format`¹, avoid the computation of unused
debug strings, and make the code more readable.

¹ for `Format` to work as expected, all intermediate calls need to go through
it. Some cases of formatting to an intermediate string then printing through Format
again are still present, but this makes the situation better.
2022-03-08 13:04:27 +01:00
Denis Merigoux
82865c48da
Fix #162 2021-11-29 10:36:33 +01:00
Denis Merigoux
a271d96b3a
Remove glitch in HTML literate output 2021-10-25 10:12:42 +02:00
Denis Merigoux
bbd50747d9
Big renaming and dir reorg 2021-06-21 11:39:06 +02:00