Commit b3a98c9
Parse many literals along side idents in names (#398)
* Parse many literals along side idents in names
* Accept ints as literals
We will not accept floats because `123.123` is a float literal,
but `123 .123` is a int literal followed by a class called `123`.
This could be confusing so it will not be accepted.
Ints can have leading zeros, like `0123`, but this is not guarranteed by
the rust compiler to always work, which could cause future errors.
An example would be truncating `001` to `1`.
* Limit accepted literals using existing function
* Update error output for non-string-literal
* Test output of ints with specified type
This outputs exactly what is written, which is the obvious behaviour
* Use nightly version to generate output
Previous verison was not using nightly, causing errors in the automated
test that are using nightly
* Replace "byte_string" with "raw_string" in test
---------
Co-authored-by: Chris Wong <lambda.fairy@gmail.com>1 parent 0de60b0 commit b3a98c9
File tree
3 files changed
+41
-34
lines changed- maud_macros/src
- maud/tests
- warnings
3 files changed
+41
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
| 204 | + | |
206 | 205 | | |
207 | 206 | | |
208 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
209 | 217 | | |
210 | 218 | | |
211 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 1 | | |
14 | | - | |
| 2 | + | |
15 | 3 | | |
16 | 4 | | |
17 | 5 | | |
18 | 6 | | |
19 | 7 | | |
20 | | - | |
| 8 | + | |
21 | 9 | | |
22 | 10 | | |
23 | 11 | | |
24 | 12 | | |
25 | 13 | | |
26 | | - | |
| 14 | + | |
27 | 15 | | |
28 | 16 | | |
29 | 17 | | |
30 | 18 | | |
31 | 19 | | |
32 | | - | |
| 20 | + | |
33 | 21 | | |
34 | 22 | | |
35 | 23 | | |
36 | 24 | | |
37 | 25 | | |
38 | | - | |
| 26 | + | |
39 | 27 | | |
40 | 28 | | |
41 | 29 | | |
| |||
44 | 32 | | |
45 | 33 | | |
46 | 34 | | |
47 | | - | |
| 35 | + | |
48 | 36 | | |
49 | 37 | | |
50 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
208 | 214 | | |
209 | 215 | | |
210 | 216 | | |
| |||
702 | 708 | | |
703 | 709 | | |
704 | 710 | | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
| 711 | + | |
713 | 712 | | |
714 | | - | |
| 713 | + | |
715 | 714 | | |
716 | 715 | | |
717 | 716 | | |
718 | 717 | | |
719 | 718 | | |
720 | | - | |
| 719 | + | |
721 | 720 | | |
722 | | - | |
| 721 | + | |
723 | 722 | | |
724 | 723 | | |
725 | | - | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
726 | 737 | | |
727 | 738 | | |
728 | 739 | | |
| |||
0 commit comments