MCPcopy Create free account
hub / github.com/Squirrel/Squirrel.Windows / prerelease_hook_impl

Function prerelease_hook_impl

src/StubExecutable/Semver200_parser.cpp:110–121  ·  view source on GitHub ↗

Validate every individual prerelease identifier, determine it's type and add it to collection.

Source from the content-addressed store, hash-verified

108
109 /// Validate every individual prerelease identifier, determine it's type and add it to collection.
110 void prerelease_hook_impl(string& id, Prerelease_identifiers& prerelease) {
111 if (id.empty()) throw Parse_error("version identifier cannot be empty");
112 Id_type t = Id_type::alnum;
113 if (is_identifier_numeric(id)) {
114 t = Id_type::num;
115 if (check_for_leading_0(id)) {
116 throw Parse_error("numeric identifiers cannot have leading 0");
117 }
118 }
119 prerelease.push_back(Prerelease_identifier(id, t));
120 id.clear();
121 }
122
123 /// Validate every individual build identifier and add it to collection.
124 void build_hook_impl(string& id, Parser_state& pstate, Build_identifiers& build,

Callers 2

build_hook_implFunction · 0.85
parseMethod · 0.85

Calls 3

Parse_errorClass · 0.85
is_identifier_numericFunction · 0.85
check_for_leading_0Function · 0.85

Tested by

no test coverage detected