main
Brett 2023-12-23 02:51:44 -05:00
parent e79741d448
commit 4c79cf6808
2 changed files with 8 additions and 24 deletions

View File

@ -17,7 +17,7 @@
*/ */
#include "load_file.h" #include "load_file.h"
#include <blt/std/loader.h> #include <blt/std/loader.h>
#include <cstdio> #include <regex>
namespace blt namespace blt
{ {
@ -155,29 +155,13 @@ namespace blt
std::cout << std::string(func_name) << std::endl; std::cout << std::string(func_name) << std::endl;
} }
std::string_view parser::strip_func(std::string_view func) std::string parser::strip_func(std::string_view func)
{ {
auto pos = func.find("Matrix"); std::string f (func);
if (pos == std::string_view::npos)
{ std::regex matrx(R"(((Matrix)(\d|\w)+)|(\d|I|L)+(i|u|f|d|v|s|N|b|I)+)");
for (size_t i = 0; i < func.size(); i++)
{ return f;
char c = func[i];
switch (c)
{
case 'i':
case 'f':
case 'u':
pos = i - 1;
break;
default:
break;
}
if (pos != std::string_view ::npos)
break;
}
}
return std::string_view();
} }
} }

View File

@ -73,7 +73,7 @@ namespace blt
return std::isalnum(c) || c == '_'; return std::isalnum(c) || c == '_';
} }
std::string_view strip_func(std::string_view func); std::string strip_func(std::string_view func);
void process_gl_func(std::string_view func_name); void process_gl_func(std::string_view func_name);
public: public: