| 78 | } |
| 79 | |
| 80 | LuaParser TestHelper::GetParser(std::string input, bool nonStandard, bool clikeComments) { |
| 81 | auto file = std::make_shared<LuaSource>(std::move(input)); |
| 82 | LuaLexer luaLexer(file); |
| 83 | if (nonStandard) { |
| 84 | luaLexer.SupportNonStandardSymbol(); |
| 85 | } |
| 86 | if (clikeComments) { |
| 87 | luaLexer.SupportCLikeComments(); |
| 88 | } |
| 89 | |
| 90 | luaLexer.Parse(); |
| 91 | |
| 92 | LuaParser p(file, std::move(luaLexer.GetTokens())); |
| 93 | p.Parse(); |
| 94 | return std::move(p); |
| 95 | } |
| 96 | |
| 97 | bool TestHelper::TestPattern(std::string_view pattern, std::string_view path) { |
| 98 | EditorconfigPattern p; |
nothing calls this directly
no test coverage detected