MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / AddMacro

Method AddMacro

parser/parser.cc:1739–1748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1737 ParserOptions& GetOptions() override { return options_; }
1738
1739 absl::Status AddMacro(const cel::Macro& macro) override {
1740 for (const auto& existing_macro : macros_) {
1741 if (existing_macro.key() == macro.key()) {
1742 return absl::AlreadyExistsError(
1743 absl::StrCat("macro already exists: ", macro.key()));
1744 }
1745 }
1746 macros_.push_back(macro);
1747 return absl::OkStatus();
1748 }
1749
1750 absl::Status AddLibrary(cel::ParserLibrary library) override {
1751 if (!library.id.empty()) {

Callers 10

OptionalCompilerLibraryFunction · 0.80
TESTFunction · 0.80
AddStandardLibraryMacrosFunction · 0.80
TESTFunction · 0.80
TestLibraryMethod · 0.80
AddMathExtensionMacrosFunction · 0.80
ConfigureParserFunction · 0.80
ConfigureParserFunction · 0.80
ConfigureParserFunction · 0.80

Calls 1

keyMethod · 0.80

Tested by 3

TESTFunction · 0.64
TESTFunction · 0.64
TestLibraryMethod · 0.64