mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibSyntax: Teach each highlighter about it's comment syntax
This commit is contained in:
parent
a8c73998f1
commit
31290c8527
Notes:
sideshowbarker
2024-07-17 21:16:31 +09:00
Author: https://github.com/lanmonster 🔰
Commit: 31290c8527
Pull-request: https://github.com/SerenityOS/serenity/pull/15803
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/Zaggy1024
Reviewed-by: https://github.com/idispatch
11 changed files with 24 additions and 0 deletions
|
@ -25,6 +25,9 @@ public:
|
|||
virtual bool is_navigatable(u64 token) const override;
|
||||
|
||||
virtual Syntax::Language language() const override { return Syntax::Language::Cpp; }
|
||||
virtual Optional<StringView> comment_prefix() const override { return "//"sv; }
|
||||
virtual Optional<StringView> comment_suffix() const override { return {}; }
|
||||
|
||||
virtual void rehighlight(Palette const&) override;
|
||||
|
||||
void update_tokens_info(Vector<CodeComprehension::TokenInfo>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue