Commit Graph

17 Commits

Author SHA1 Message Date
Denis Merigoux
6b9bc90b9a
End with @JusBanuls!
Now we have to finish the implem, clean, review and deploy :)
2023-03-06 15:02:19 +01:00
Denis Merigoux
bfc827296c
Merge branch 'master' into aides_logement_outre_mer 2023-03-06 14:09:51 +01:00
Louis Gesbert
d3ccfe9b91 Adjust examples for the new function declaration syntax 2023-02-28 15:53:50 +01:00
Denis Merigoux
fdd9f510d9
Fin de la partie législative outre-mer du CCH avec @JusBanuls 2023-02-28 15:47:42 +01:00
Louis Gesbert
2003566867 Force parens in compound logic formulas
Closes #373

This forbids expressions such as `a and b or c`, avoiding the need to set an
implicit priority between `and`, `or` and `xor`, which I find error-prone.

Instead, when that appears, a message asking for explicit parentheses will be
shown to the user.

Implementation note: since that would be extremely tedious to do in the parser
directly, the parser is set to allow right-associativity without discrimination
for the logical operators, and the check is done during desugaring. This
required to explicit parentheses in the surface AST to discriminate the case
where the priority was explicit.
2023-01-04 10:46:14 +01:00
Louis Gesbert
09d49ab1cc French syntax: replace 'sortie' with 'résultat'
as per comment in #357
2022-12-13 12:27:33 +01:00
Louis Gesbert
71bb67163c Remove explicitely typed operators in tests and examples
Command used: `sed -i 's/\([-+*/><=]=\?\)[.$@^€$]/\1/g' **/*/*.catala_*`

The overload test, of course, is kept unchanged and ensures that explicit
operators still work.
2022-12-13 12:00:04 +01:00
Louis Gesbert
4ee4a96ac7 Remove *all* struct field access qualifiers in catala code
They are no longer needed \o/
2022-11-28 16:42:02 +01:00
Louis Gesbert
0ab7a0f9ce Turn all existing tests to inline tests
Done using
```bash
process() { FILE=$1; awk 'match($0, /^```catala-test *{ *id *= *"(.*)" *}/, a) {print "```catala-test-inline"; f="'"$(dirname $FILE)/output/$(basename $FILE)"'." a[1]; getline; print "$ " $0; while ((getline<f) > 0) print; next} {print}' $FILE >$FILE.new; mv $FILE.new $FILE; }
for f in tests/test_*/*/*.catala_* examples/**/*.catala_*; do process $f; git add $f; done
for d in $(find -name output -type d); do git rm -r $d; done
```
2022-09-23 14:45:10 +02:00
Denis Merigoux
a4207c9d9e
Last corrections 2022-09-08 14:54:02 +02:00
Denis Merigoux
3756a6fb22
Fix french housing benefits 2022-09-07 17:14:36 +02:00
Denis Merigoux
e41e0f9dcc
Fix line length and display lines of code 2022-08-26 12:05:22 +02:00
Denis Merigoux
a1ebb6715c
Remove age prompts, deduct from birth date correctly 2022-08-16 11:08:13 +02:00
Louis Gesbert
1d268a940b Add tests for the examples as well 2022-07-08 17:18:58 +02:00
Denis Merigoux
ff7e94d89a
Nitpicks 2022-06-06 18:11:06 +02:00
Denis Merigoux
33c21e9a07
Include prestations familiales in allocations logement for L512-3 logic 2022-05-06 12:21:57 +02:00
Denis Merigoux
c936e7b6ed
Reshuffle code, make it work, correct a few yes/no inversion bugs 2022-03-15 19:47:41 +01:00