patterns: Added break and continue statements for loops

This commit is contained in:
WerWolv
2021-12-30 14:44:46 +01:00
parent c76bfceb3e
commit 3ce0f8f4a8
8 changed files with 131 additions and 76 deletions

View File

@@ -25,7 +25,12 @@ namespace hex::plugin::builtin {
static TextEditor::LanguageDefinition langDef;
if (!initialized) {
static const char* const keywords[] = {
"using", "struct", "union", "enum", "bitfield", "be", "le", "if", "else", "false", "true", "this", "parent", "addressof", "sizeof", "$", "while", "for", "fn", "return", "namespace", "in", "out"
"using", "struct", "union", "enum", "bitfield",
"be", "le", "if", "else", "false", "true",
"this", "parent", "addressof", "sizeof",
"$",
"while", "for", "fn", "return", "break", "continue",
"namespace", "in", "out"
};
for (auto& k : keywords)
langDef.mKeywords.insert(k);