Files
Leeksov 4647310322 GLEGram 12.5 — Initial public release
Based on Swiftgram 12.5 (Telegram iOS 12.5).
All GLEGram features ported and organized in GLEGram/ folder.

Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass,
Font Replacement, Fake Profile, Chat Export, Plugin System, and more.

See CHANGELOG_12.5.md for full details.
2026-04-06 09:48:12 +03:00

33 lines
736 B
C++

#pragma once
#include <sstream>
#include "TokenList.h"
#include <vector>
#include <map>
#include <optional>
class LanguageTree;
struct Grammar;
struct RematchOptions
{
std::string token;
size_t reach;
int j;
};
class SyntaxHighlighter
{
public:
SyntaxHighlighter(const std::string& languages);
TokenList tokenize(const std::string& text, const std::string& language);
std::map<std::string, std::string> languages() const;
private:
TokenList tokenize(std::string_view text, const Grammar* grammar);
void matchGrammar(std::string_view text, TokenList& tokenList, const Grammar* grammar, TokenListPtr startNode, size_t startPos, RematchOptions* rematch);
std::shared_ptr<LanguageTree> m_tree;
};