Get a macro description
@param {String} macroName Name of the macro
@return {Object}
772660
function (macroName) {
            var res = this.macros[macroName];
            if (res == null) {
                res = {};
                this.macros[macroName] = res;
            }
            return res;
        }
656443
def macro_def(self, macro_ref, frame):
        """"""
        arg_tuple = ', '.join(repr(x.name) for x in macro_ref.node.args)
        name = getattr(macro_ref.node, 'name', None)
        if len(macro_ref.node.args) == 1:
            arg_tuple += ','
        self.write('Macro(environment, macro, %r, (%s), %r, %r, %r, '
                   'context.eval_ctx.autoescape)' %
                   (name, arg_tuple, macro_ref.accesses_kwargs,
                    macro_ref.accesses_varargs, macro_ref.accesses_caller))
16383
function macro(name, value) {
  var val = value || ''

  if (val && val.charAt(0) !== '\n') {
    val = ' ' + val
  }

  return '.' + name + val
}
559403
public function getDescription($name)
    {
        if (!$this->isParsed) {
            $this->parseDefinitions();
        } //if

        $longName = (strlen($name) == 1 ? ( isset($this->shortNames[$name]) ? $this->shortNames[$name] : '') : $name);

        if (isset($this->longNames[$longName])) {
            return $this->longNames[$longName]['description'];
        } else {
            return null;
        } //if
    }
249047
def macro_def(self, node, frame):
        """"""
        arg_tuple = ', '.join(repr(x.name) for x in node.args)
        name = getattr(node, 'name', None)
        if len(node.args) == 1:
            arg_tuple += ','
        self.write('Macro(environment, macro, %r, (%s), (' %
                   (name, arg_tuple))
        for arg in node.defaults:
            self.visit(arg, frame)
            self.write(', ')
        self.write('), %r, %r, %r)' % (
            bool(frame.accesses_kwargs),
            bool(frame.accesses_varargs),
            bool(frame.accesses_caller)
        ))
1213193
protected I_CmsFormatterBean getFormatterForMacro(String macro) {

        CmsUUID formatterId = null;
        if (m_formatterReferences.containsKey(macro)) {
            formatterId = m_formatterReferences.get(macro);
        } else {
            try {
                I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(
                    CmsFormatterConfigurationCache.TYPE_FORMATTER_CONFIG);
                CmsResourceFilter filter = CmsResourceFilter.DEFAULT.addRequireType(type);
                if (m_cms.existsResource(macro, filter)) {
                    CmsResource res = m_cms.readResource(macro);
                    formatterId = res.getStructureId();
                }
            } catch (CmsException e) {
                LOG.error("Failed to read formatter configuration.", e);
            }
        }
        if (formatterId != null) {
            return OpenCms.getADEManager().getCachedFormatters(
                m_cms.getRequestContext().getCurrentProject().isOnlineProject()).getFormatters().get(formatterId);
        }
        return null;
    }
872302
def macro_list(self, args: argparse.Namespace) -> None:
        """"""
        if args.name:
            for cur_name in utils.remove_duplicates(args.name):
                if cur_name in self.macros:
                    self.poutput("macro create {} {}".format(cur_name, self.macros[cur_name].value))
                else:
                    self.perror("Macro '{}' not found".format(cur_name), traceback_war=False)
        else:
            sorted_macros = utils.alphabetical_sort(self.macros)
            for cur_macro in sorted_macros:
                self.poutput("macro create {} {}".format(cur_macro, self.macros[cur_macro].value))
895594
private String
      getPreprocessorDefinitions(final CommandLineCompilerConfiguration compilerConfig, final boolean isDebug) {
    final StringBuffer defines = new StringBuffer();
    final String[] args = compilerConfig.getPreArguments();
    for (final String arg : args) {
      if (arg.startsWith("/D")) {
        String macro = arg.substring(2);
        if (isDebug) {
          if (macro.equals("NDEBUG")) {
            macro = "_DEBUG";
          }
        } else {
          if (macro.equals("_DEBUG")) {
            macro = "NDEBUG";
          }
        }
        defines.append(macro);
        defines.append(";");
      }
    }

    if (defines.length() > 0) {
      defines.setLength(defines.length() - 1);
    }
    return defines.toString();
  }
489016
function getTransformMacroExpressions(babelTemplate) {
  return {
    visitor: {
        StringLiteral(path) {
            const node = path.node;
            if (!node.macro) {
                // This has nothing to do with macros but it's necessary to prevent
                // Babel from escaping Unicode strings. See #784
                if (typeof node.value === "string") {
                    node.extra = {
                        raw: JSON.stringify(node.value),
                        rawValue: node.value,
                    };
                }
                return;
            }

            const DOLLAR_REGEX = /\$\d+/g;
            const buildArgs = {};
            const originalMacro = node.value;
            let macro = originalMacro;

            try {
                // Check if there are more placeholders than args, this may happen
                // if null optional arguments have been removed.
                let m = null;
                const placeholders = [];
                const args = node.args || [];

                // tslint:disable-next-line:no-conditional-assignment
                while (m = DOLLAR_REGEX.exec(macro)) {
                    placeholders.push(parseInt(m[0].substr(1), 10));
                }

                if (placeholders.length > 0) {
                    const max = placeholders.reduce((x, y) => Math.max(x, y));
                    // If there're actually more args than placeholders (e.g `$0($1...)`), use the args length
                    const argsLength = Math.max(max + 1, args.length);
                    for (let i = 0; i < argsLength; i++) {
                        buildArgs["$" + String(i)] =
                            args[i] == null
                                ? { type: "NullLiteral" }
                                : args[i];
                    }
                }

                macro = macro
                    // Macro transformations, see http://fable.io/docs/interacting.html#emit-attribute
                    .replace(/\$(\d+)\.\.\./, (_, i) => {
                        const rep = [];
                        for (let j = parseInt(i, 10); j < args.length; j++) {
                            rep.push("$" + j);
                        }
                        return rep.join(",");
                    })
                    .replace(/\{\{\s*\$(\d+)\s*\?(.*?)\:(.*?)\}\}/g, (_, g1, g2, g3) => {
                        const i = parseInt(g1, 10);
                        return typeof args[i] === "object" && args[i].value ? g2 : g3;
                    })
                    .replace(/\{\{([^\}]*\$(\d+).*?)\}\}/g, (_, g1, g2) => {
                        const i = parseInt(g2, 10);
                        return typeof args[i] === "object" && args[i].type !== "NullLiteral" ? g1 : "";
                    })
                    .replace(/\$(\d+)!/, (_, i) => {
                        const arg = args[parseInt(i, 10)]
                        return typeof arg === "object" && arg.type === "StringLiteral" ? arg.value : "";
                    });

                // Babel 7 throws error if there're unused arguments, remove them
                const actualArgs = [];
                const buildArgKeys = Object.keys(buildArgs);

                // tslint:disable-next-line:no-conditional-assignment
                while (m = DOLLAR_REGEX.exec(macro)) {
                    actualArgs.push(m[0]);
                }
                for (const key of buildArgKeys) {
                    if (actualArgs.indexOf(key) < 0) {
                        delete buildArgs[key];
                    }
                }

                // console.log("MACRO 1", originalMacro);
                // console.log("MACRO 2", macro);
                // console.log("MACRO ARGS", buildArgs);

                const builtMacro = babelTemplate(macro, {
                    placeholderPattern: /^\$\d+$/,
                })(buildArgs);

                if (builtMacro != null) {
                    path.replaceWithMultiple(builtMacro);
                } else {
                    // Apparently if the macro is just a string, babel-template will fail
                    path.replaceWith({
                        type: "StringLiteral",
                        value: JSON.parse(macro),
                    });
                }
            } catch (err) {
                throw new Error(
                    "BABEL ERROR: Failed to parse macro: " + originalMacro + " -> " + macro + "\n" +
                    "MACRO ARGUMENTS: " + Object.keys(buildArgs).join() + "\n" +
                    err.message);
            }
        },
    },
  };
}
240358
function(_part){
        if (!_part||!_part.length) return;
        _part.shift(); // remove macro key word
        var _name = _part[0].split('(')[0];
        return 'var '+_name+' = function'+_part.join('').replace(_name,'')+'{var __OUT=[];';
    }
218984
public static String macroCase(String name) {
        return Strings.c_case(name).toUpperCase(Locale.US);
    }
892837
public static String processSimpleMacros(String input, Object[] args)
    {
        if (input == null || input.isEmpty() || args.length == 0)
        {
            return input;
        }

        StringBuilder out = new StringBuilder();

        int stringIndex = 0;
        int argIndex = 0;
        int len = input.length();
        char current;
        char next;

        while (stringIndex < len)
        {
            current = input.charAt(stringIndex);
            if (current == ESCAPE && stringIndex + 1 < len)
            {
                next = input.charAt(stringIndex + 1);
                if (next == ESCAPE || next == MACRO_BEGIN)
                {
                    stringIndex++;
                    out.append(next);
                }
                else
                {
                    out.append(current);
                }
            }
            else if (current == MACRO_BEGIN && stringIndex + 1 < len)
            {
                next = input.charAt(stringIndex + 1);
                if (next == MACRO_END && argIndex < args.length)
                {
                    stringIndex++;
                    out.append(args[argIndex++]);
                }
                else
                {
                    out.append(current);
                }
            }
            else
            {
                out.append(current);
            }

            stringIndex++;
        }

        return out.toString();
    }
1131815
function getBasicInfo() {
    const result = {};
    for (const key in info) {
        if (info.hasOwnProperty(key)) {
            result[key] = info[key]();
        }
    }
    return result;
}
1099821
function createMacroInstance ($tagName)
  {
    $propsClass       = $tagName . 'Properties';
    $path             = $this->findMacroFile ($tagName);
    $com              = new MacroCall;
    $com->propsClass  = $propsClass;
    $com->templateUrl = $path;
    return $com;
  }
334694
function getObject(section) {
  var o = {}
    , i
    , k
    , name
    , method
    , sections = section ? [section] : keys
    , rusage = proc.usage();

  for(i = 0;i < sections.length;i++) {
    k = sections[i];
    name = k.charAt(0).toUpperCase() + k.substr(1);
    method = 'get' + name
    o[k] = {
      header: name,
      data: this[method](rusage)
    }
  }
  return o;
}
179052
def get_description(expression, options=None):
    
    descripter = ExpressionDescriptor(expression, options)
    return descripter.get_description(DescriptionTypeEnum.FULL)
523010
function getCommand(commandName) {
    return _.find(commands, function (command) {
      return _.includes(command.aliases, commandName);
    });
  }