MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / GetParser

Method GetParser

Test/src/TestHelper.cpp:80–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80LuaParser 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
97bool TestHelper::TestPattern(std::string_view pattern, std::string_view path) {
98 EditorconfigPattern p;

Callers

nothing calls this directly

Calls 4

GetTokensMethod · 0.80
SupportCLikeCommentsMethod · 0.45
ParseMethod · 0.45

Tested by

no test coverage detected