Commit Graph

11 Commits

Author SHA1 Message Date
Leander Tentrup
2145e2d878 Syntax highlighting for escape sequences in strings 2020-06-17 15:27:13 +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
Aleksey Kladov
3b4d000250 Better unsafe highlihgting tests 2020-06-08 15:23:03 +02:00
Leander Tentrup
3aaaf924cb Fix bug in lexer for format specifier where the type and width were not correctly distinguished 2020-06-07 22:57:24 +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
Matthew Jasper
e2d36cb692 Highlight true and false as literals 2020-05-24 15:12:17 +01:00
Matthew Jasper
22b75c4cea Highlight the name in macro declarations 2020-05-10 16:25:51 +01:00
Leander Tentrup
052e9faa90 Introduce new semantic highlight token for format specifier 2020-04-28 11:13:12 +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