summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCpp/SyntaxHighlighter.h
AgeCommit message (Collapse)Author
2022-11-27LibSyntax: Teach each highlighter about it's comment syntaxKyle Lanmon
2022-03-10Libraries: Use default constructors/destructors in LibCppLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2022-02-09LibCpp: Add SemanticSyntaxHighlighterItamar
The SemanticSyntaxHighlighter uses TokenInfo results from the language server to provide 'semantic' syntax highlighting, which provides more fin-grained text spans results. For example, the SemanticSyntaxHighlighter can color function calls, member fields references and user-defined types in different colors. With the simple lexer-only syntax highlighter, all of these tokens were given the same text highlighting span type. Since we have to provide immediate highlighting feedback to the user after each edit and before we get the result for the language server, we use a heuristic which computes the diff between the current tokens and the last known tokens with compete semantic information (We use LibDiff for this). This heuristic is not very performant, and starts feeling sluggish with bigger (~200 LOC) files. A possible future improvement would be only computing the diff for tokens in text ranges that have changes since the last commit.
2021-06-07LibWeb+LibSyntax: Implement nested syntax highlightersAli Mohammad Pur
And use them to highlight javascript in HTML source. This commit also changes how TextDocumentSpan::data is interpreted, as it used to be an opaque pointer, but everyone stuffed an enum value inside it, which made the values not unique to each highlighter; that field is now a u64 serial id. The syntax highlighters don't need to change their ways of stuffing token types into that field, but a highlighter that calls another nested highlighter needs to register the nested types for use with token pairs.
2021-06-05LibCpp: Use east const style in Lexer and SyntaxHighlighterMax Wipfli
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-02-11LibSyntax: Make rehighlight() take Gfx::Palette as by const-referenceAndreas Kling
2021-02-07LibSyntax: Move GUI::Highlighter to Syntax::Highlighter in LibSyntaxAndreas Kling
This is a move towards dropping more LibGUI dependencies.
2021-02-07LibGUI+LibCpp: Move C++ syntax highlighter to LibCppAndreas Kling
This makes LibGUI not depend on LibCpp.