Parse a tag command.
340014
def _parse_tag(self, name):
        """"""
        from_ = self._get_from(b'tag')
        tagger = self._get_user_info(b'tag', b'tagger',
                accept_just_who=True)
        message = self._get_data(b'tag', b'message')
        return commands.TagCommand(name, from_, tagger, message)
918173
function parseCommand(data) {
  var command,
      str = data.toString('utf8', 0, data.length);

  command = str.split('\n');
  return command[0];
}
637854
def _parse_tags(element):
    

    tags = []
    items = element.findall("./{%s}tag" % WP_NAMESPACE)

    for item in items:
        term_id = item.find("./{%s}term_id" % WP_NAMESPACE).text
        slug = item.find("./{%s}tag_slug" % WP_NAMESPACE).text
        name = item.find("./{%s}tag_name" % WP_NAMESPACE).text

        tag = {
            "term_id": term_id,
            "slug": slug,
            "name": name,
        }

        tags.append(tag)

    return tags
1245764
def parse(self, text):
        """"""
        text = self.preprocess(text)
        token_stack = []
        last_pos = 0

        # Iterate through all matched tokens
        for match in self.regex.finditer(text):
            # Find which token has been matched by regex
            token, match_type, group = self.get_matched_token(match)

            # Get params from stack of tokens
            params = self.get_params(token_stack)

            # Should we skip interpreting tokens?
            skip = token_stack[-1].skip if token_stack else False

            # Check for end token first
            if match_type == MatchType.end:
                if not skip or token_stack[-1] == token:
                    removed = self.remove_token(token_stack, token)
                    if removed:
                        skip = False
                    else:
                        skip = True

            if not skip:
                # Append text preceding matched token
                start_pos = match.start(group)
                if start_pos > last_pos:
                    yield Segment(self.postprocess(text[last_pos:start_pos]), **params)

                # Actions specific for start token or single token
                if match_type == MatchType.start:
                    token_stack.append(token)
                elif match_type == MatchType.single:
                    single_params = params.copy()
                    single_params.update(token.params)
                    single_text = token.text if token.text is not None else match.group(group)
                    yield Segment(single_text, token=token, match=match, **single_params)

                # Move last position pointer to the end of matched token
                last_pos = match.end(group)

        # Append anything that's left
        if last_pos < len(text):
            params = self.get_params(token_stack)
            yield Segment(self.postprocess(text[last_pos:]), **params)
98237
function parseTag(position, tokens) {
	let token;
	let tag = {
		name : null,
		self : false,
		open : true
	};

	while (token = tokens[position++]) {
		// tag's end found so parsing must stop
		if (token.type === TokenTypes.TagEnd) {
			break;
		}

		// save the tag's name and continue parsing
		if (!tag.name && token.type === TokenTypes.TagName) {
			tag.name = token.value;
			continue;
		}

		// if a "/" is found after the tag's name, then it's a self-closing tag
		if (token.type === TokenTypes.TagClose) {
			tag.self = tag.open = !!tag.name;
		}
	}

	return tag;
}
351661
function parseTags(tags) {
    if (tags.length > 0 && util.isArray(tags[0])) {
        tags = tags[0];
    }

    return tags;
}
401942
def command(self):
        """"""
        if not self._command_calculated:

            self._command_calculated = True
            if self.operation == 'command':
                try:
                    command_idx = self.split_tokens.index('command:')
                    command = self.split_tokens[command_idx + 1]
                    if command == '{':
                        # workaround for <= 2.2 log files,
                        # where command was not listed separately
                        command = self.split_tokens[command_idx + 2][:-1]
                    self._command = command.lower()
                except ValueError:
                    pass

        return self._command
1015561
function parse(cmd, params)
{
  return Object.keys(params).reduce(iterator.bind(this, params), cmd);
}
270714
def git_tag(repo_dir, tagname, message=None, force=True):
    """"""
    message = message or "%s" % tagname
    command = ['git', 'tag', '--annotate', '--message', message]
    if force:
        command.append('--force')
    # append the tag as the final arg
    command.append(tagname)
    return execute_git_command(command, repo_dir=repo_dir)
1260464
def parse_input(self, text):
        

        parts = util.split(text)
        command = parts[0] if text and parts else None
        command = command.lower() if command else None
        args = parts[1:] if len(parts) > 1 else []

        return (command, args)
716412
def tag(self, *tag, **kwtags):
        """"""
        if not tag:
            pass
        elif len(tag) == 1 and isinstance(tag[0], dict):
            self._meta.update(tag[0])
        else:
            raise TypeError('Tags must be provided as key-word arguments or '
                            'a dictionary')
        self._meta.update(kwtags)
        return self
216709
def _tag(val, tag):
        """"""
        if isinstance(val, str):
            val = bytes(val, 'utf-8')
        return (bytes('<' + tag + '>', 'utf-8') + val +
                bytes('</' + tag + '>', 'utf-8'))
724980
def parse(command)
      case command.class.name.downcase.to_sym #Array => :array
      when :array
        command.compact.join(' && ')
      when :string
        command.chomp
      else
        raise Trooper::MalformedCommandError, "Command Not a String or Array: #{command.inspect}"
      end
    end
675046
function parseAllTags(buf) {
  var result = [];
  var element;
  
  while (buf.length > 0) {
    element = parseTag(buf);
    buf = buf.slice(element.length);
    result.push(element.tag);
  }
  
  return result;
}
821045
def ReadTag(buf, pos):
  """"""
  try:
    start = pos
    while ORD_MAP_AND_0X80[buf[pos]]:
      pos += 1
    pos += 1
    return (buf[start:pos], pos)
  except IndexError:
    raise ValueError("Invalid tag")
519291
function parseCommandLine() {
	var commands = process.argv.slice(2);
	var args = {};

	for (var i = 0; i < commands.length; i++) {
		var match = commands[i].match(/^--(.+)=(.+)$/);
		if (match)
			args[match[1]] = match[2];
		else if (i < commands.length - 1 && commands[i].substr(0, 1) === "-") {
			args[commands[i].substr(1)] = commands[i + 1];
			i++;
		}
		else if (i === 0) args[commandKey] = commands[i];
		else if (i === 1) args[commandHost] = commands[i];
	}

	return args;
}
726332
def parse(code="", mode="sys"):
    """"""
    if CLI.comp is None:
        setup()
    if mode in PARSERS:
        return PARSERS[mode](CLI.comp)(code)
    else:
        raise CoconutException(
            "invalid parse mode " + ascii(mode),
            extra="valid modes are " + ", ".join(PARSERS),
        )