MCPcopy Create free account
hub / github.com/KLayout/klayout / extract_base

Function extract_base

src/laybasic/laybasic/layParsedLayerSource.cc:393–408  ·  view source on GitHub ↗

* @brief Expression parser: extract one comparison operation */

Source from the content-addressed store, hash-verified

391 * @brief Expression parser: extract one comparison operation
392 */
393static PropertySelectorBase *
394extract_base (tl::Extractor &ex)
395{
396 bool eq = true;
397 tl::Variant n, v;
398 ex.read (n);
399 if (ex.test ("==")) {
400 eq = true;
401 } else if (ex.test ("!=")) {
402 eq = false;
403 } else {
404 ex.error (tl::to_string (tr ("'==' or '!=' operator expected")));
405 }
406 ex.read (v);
407 return new PropertySelectorEqual (n, v, eq);
408}
409
410/**
411 * @brief Expression parser: parse complex elements (bracketed expressions)

Callers 1

extract_elementFunction · 0.85

Calls 5

to_stringFunction · 0.50
trFunction · 0.50
readMethod · 0.45
testMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected