mirror of https://gitlab.com/cppit/jucipp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
388 B
25 lines
388 B
|
7 years ago
|
#pragma once
|
||
|
|
|
||
|
|
#include <regex>
|
||
|
|
#include <string>
|
||
|
|
#include <vector>
|
||
|
|
|
||
|
|
class Snippets {
|
||
|
|
Snippets();
|
||
|
|
|
||
|
|
public:
|
||
|
|
class Snippet {
|
||
|
|
public:
|
||
|
|
std::string prefix;
|
||
|
|
std::string body;
|
||
|
|
std::string description;
|
||
|
|
};
|
||
|
|
|
||
|
|
static Snippets &get() {
|
||
|
|
static Snippets singleton;
|
||
|
|
return singleton;
|
||
|
|
}
|
||
|
|
|
||
|
|
std::vector<std::pair<std::regex, std::vector<Snippet>>> snippets;
|
||
|
|
void load();
|
||
|
|
};
|