mrdocs::Corpus::lookup

lookup overloads

Synopses

Declared in <mrdocs/Corpus.hpp>

Return the Symbol for the matching string in the global context.

Expected<Symbol const&>
lookup(std::string_view name) const;

Return the Symbol for the matching string in a given context.

virtual
Expected<Symbol const&>
lookup(
    SymbolID const& context,
    std::string_view name) const = 0;

Return Value

  • The Symbol for the symbol with the specified name in the global context, or an error if not found.

  • The Symbol for the symbol with the specified name in the specified context, or an error if not found. If multiple symbols match, one is returned arbitrarily. Use traverse to find all matching symbols.

Parameters

Name Description

name

The name of the symbol to look up.

context

The context to look up the symbol in.

Created with MrDocs