MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / opt

Function opt

quest/src/core/parser.cpp:54–54  ·  view source on GitHub ↗

captures sub-patterns for later extraction

Source from the content-addressed store, hash-verified

52 string group(string in) { return "(?:" + in + ")"; } // groups sub-patterns to control eval order
53 string capt (string in) { return "(" + in + ")"; } // captures sub-patterns for later extraction
54 string opt (string in) { return group(in) + "?"; } // groups and makes optional a sub-pattern
55
56 // sub-numbers
57 string mantissa = "[0-9]+" + opt("[.][0-9]*") + "|[.][0-9]+"; // e.g. 0 0. .0 0.0

Callers 1

parser.cppFile · 0.85

Calls 1

groupFunction · 0.85

Tested by

no test coverage detected