MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / findFieldRef

Method findFieldRef

src/ast/ast.cpp:534–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532 }
533
534 Structure::FieldDeclarationRef Structure::findFieldRef ( const string & fieldName ) const {
535 auto pField = findField(fieldName);
536 if ( pField ) {
537 FieldDeclarationRef ref;
538 ref.owner = const_cast<Structure *>(this);
539 ref.index = int32_t(pField - &fields[0]);
540 return ref;
541 } else {
542 return FieldDeclarationRef{};
543 }
544 }
545
546 const Structure::FieldDeclaration * Structure::findField ( const string & na ) const {
547 if ( fieldLookup.size()==fields.size() ) {

Callers 2

visitMethod · 0.80
patchMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected