Aleksey Kladov
adf624b433
Add file support to expect
2020-07-01 11:19:40 +02:00
Aleksey Kladov
9d64525daa
Simplify
2020-06-24 11:50:53 +02:00
Aleksey Kladov
e9cb818c26
Use fixtures more
2020-06-24 11:05:47 +02:00
Paul Daniel Faria
0b971625c3
Fix underflow panic when doctests are at top of file
2020-06-22 22:29:08 -04:00
Leander Tentrup
df5b37cb61
Syntax highlighting for documentation comments on macro definitions
2020-06-20 00:02:42 +02:00
Leander Tentrup
2145e2d878
Syntax highlighting for escape sequences in strings
2020-06-17 15:27:13 +02:00
Leander Tentrup
8ff91cf6b6
Inspect markdown code fences to determine whether to apply syntax highlighting
2020-06-16 23:03:59 +02:00
Leander Tentrup
c4b3db0c2f
Syntactic highlighting of NAME_REF for injections
...
This commit adds a function that tries to determine the syntax highlighting class of NAME_REFs based on the usage.
It is used for highlighting injections (such as highlighting of doctests) as the semantic logic will most of the time result in unresolved references.
It also adds a color to unresolved references in HTML encoding.
2020-06-15 22:13:53 +02:00
Leander Tentrup
06f89e5f3a
Fix syntax highlighting of recursive macros
...
Add syntax highlighting for the BANG (`!`) token if the parent is `MACRO_CALL`.
2020-06-15 15:03:13 +02:00
Aleksey Kladov
db1cadd444
In field patterns, don't highlight local binding as a field
2020-06-10 12:34:23 +02:00
Aleksey Kladov
3b4d000250
Better unsafe highlihgting tests
2020-06-08 15:23:03 +02:00
Leander Tentrup
4a2efb2f42
Implement syntax highlighting for doctests
2020-06-08 14:18:16 +02:00
Leander Tentrup
65943c0585
Remove redundancy in syntax highlighting tests
2020-06-07 14:50:02 +02:00
Paul Daniel Faria
a9cb2933fb
Add highlight support for unsafe fn calls and raw ptr deref
2020-06-02 18:54:00 -04:00
Roland Ruckerbauer
780c89959a
Test case for format string highlighting of closing curlybrace
2020-05-30 18:35:11 +02:00
George Fraser
63b75a40c8
Color for
as a regular keyword when it's part of impl _ for _
2020-05-10 13:11:14 -07:00
George Fraser
3f1c73633e
Color in
as a control keyword
2020-05-10 13:07:28 -07:00
Matthew Jasper
11c0a5bb60
Highlight mutable statics as mutable
2020-05-10 16:25:51 +01:00
Aleksey Kladov
8843588fca
Convert tests to text-size
2020-04-25 11:59:18 +02:00
Leander Tentrup
445052f6d4
Adapt format specifier highlighting to support escaped squences and unicode identifiers
2020-04-22 15:28:35 +02:00
Leander Tentrup
ac798e1f7c
Implement syntax highlighting for format strings
...
Detailed changes:
1) Implement a lexer for string literals that divides the string in format specifier `{}` including the format specifier modifier.
2) Adapt syntax highlighting to add ranges for the detected sequences.
3) Add a test case for the format string syntax highlighting.
2020-04-20 11:19:15 +02:00
Leander Tentrup
2e2c03ee2d
Fix incorrect order of syntax highlight ranges
2020-04-17 22:50:30 +02:00
Leander Tentrup
bf96d46fee
Simplify HTML highlighter and add test case for highlight_injection logic
2020-04-06 23:00:09 +02:00
Leander Tentrup
bb45aca909
Flatten nested highlight ranges during DFS traversal
2020-04-03 09:46:07 +02:00
Aleksey Kladov
56ce34c6a7
Correctly flag 'lifetime definitions as definitions
2020-02-28 16:53:12 +01:00
Aleksey Kladov
5ebfcb9cb7
Fix highlighting of const patterns
2020-02-28 16:38:36 +01:00
Aleksey Kladov
9464ca97c9
Fix highlighting test
2020-02-28 14:47:33 +01:00
Aleksey Kladov
8215b74032
Move tests to a new file
2020-02-27 14:20:22 +01:00