MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / tokenize

Function tokenize

src/App/Expression.cpp:3725–3742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3723}
3724
3725std::vector<std::tuple<int, int, std::string> > tokenize(const std::string &str)
3726{
3727 ExpressionParser::YY_BUFFER_STATE buf = ExpressionParser_scan_string(str.c_str());
3728 ExpressionParser::StringBufferCleaner cleaner(buf);
3729 std::vector<std::tuple<int, int, std::string> > result;
3730 int token;
3731
3732 column = 0;
3733 try {
3734 while ( (token = ExpressionParserlex()) != 0)
3735 result.emplace_back(token, ExpressionParser::last_column, yytext);
3736 }
3737 catch (...) {
3738 // Ignore all exceptions
3739 }
3740
3741 return result;
3742}
3743
3744}
3745

Callers 5

performMethod · 0.85
loadElementsMethod · 0.85
getLineDefinitionsMethod · 0.85
getLineDescriptionsMethod · 0.85
TEST_FFunction · 0.85

Calls 1

c_strMethod · 0.45

Tested by

no test coverage detected