diff --git a/deps/tblgen/jl-generators.cc b/deps/tblgen/jl-generators.cc index c154f713..b628e708 100644 --- a/deps/tblgen/jl-generators.cc +++ b/deps/tblgen/jl-generators.cc @@ -107,6 +107,7 @@ namespace leading_spaces_str += "[ ]"; description = std::regex_replace(description, std::regex("\n" + leading_spaces_str), "\n"); } + description = std::regex_replace(description, std::regex(R"(\\)"), R"(\\)"); description = std::regex_replace(description, std::regex("(['\"$])"), "\\$1"); description = std::regex_replace(description, std::regex("(^|\n)(Example|Syntax):"), "$1# $2"); @@ -141,7 +142,7 @@ namespace } // check if name colides with Julia keywords, generated module name, or "location": // https://docs.julialang.org/en/v1/base/base/#Keywords - std::vector reservedKeywords = {"location", "baremodule", "begin", "break", "catch", "const", "continue", "do", "else", "elseif", "end", "export", "false", "finally", "for", "function", "global", "if", "import", "let", "local", "macro", "module", "public", "quote", "return", "struct", "true", "try", "using", "while"}; + std::vector reservedKeywords = {"include", "location", "baremodule", "begin", "break", "catch", "const", "continue", "do", "else", "elseif", "end", "export", "false", "finally", "for", "function", "global", "if", "import", "let", "local", "macro", "module", "public", "quote", "return", "struct", "true", "try", "using", "while"}; if (modulename.has_value()) { reservedKeywords.push_back(modulename.value()); }