tools/binary_size/libsupersize/linker_map_parser.py
def ParseArmAnnotations(tok):
    """Decides whether a Level 3 token is an annotation.

    Returns:
      A 2-tuple (is_annotation, next_thumb2_mode):
        is_annotation: Whether |tok| is an annotation.
        next_thumb2_mode: New |thumb2_mode| value, or None if keep old value.
    """
    # Annotations for ARM match '$t', '$d.1', but not '$_21::invoke'.
    if tok.startswith('$') and (len(tok) == 2 or
                                (len(tok) >= 3 and tok[2] == '.')):
      if tok.startswith('$t'):
        return True, True  # Is annotation, enter Thumb2 mode.
      if tok.startswith('$a'):
        return True, False  # Is annotation, enter ARM32 mode.
      return True, None  # Is annotation, keep old |thumb2_mode| value.
    return False, None
Decides whether a Level 3 token is an annotation.

    Returns:
      A 2-tuple (is_annotation, next_thumb2_mode):
        is_annotation: Whether |tok| is an annotation.
        next_thumb2_mode: New |thumb2_mode| value, or None if keep old value.
    
Decides whether a Level 3 token is an annotation.
Decides whether a Level 3 token is an annotation .
def ParseArmAnnotations(tok):
    if tok.startswith('$') and (len(tok) == 2 or
                                (len(tok) >= 3 and tok[2] == '.')):
      if tok.startswith('$t'):
        return True, True  
      if tok.startswith('$a'):
        return True, False  
      return True, None  
    return False, None
def ParseArmAnnotations ( tok ) : if tok . startswith ( '$' ) and ( len ( tok ) == 2 or ( len ( tok ) >= 3 and tok [ 2 ] == '.' ) ) : if tok . startswith ( '$t' ) : return True , True if tok . startswith ( '$a' ) : return True , False return True , None return False , None
Decides whether a Level 3 token is an annotation.
Decides whether a Level 3 token is an annotation .
"""Decides whether a Level 3 token is an annotation.

    Returns:
      A 2-tuple (is_annotation, next_thumb2_mode):
        is_annotation: Whether |tok| is an annotation.
        next_thumb2_mode: New |thumb2_mode| value, or None if keep old value.
    """ # Annotations for ARM match '$t', '$d.1', but not '$_21::invoke'. # Is annotation, enter Thumb2 mode. # Is annotation, enter ARM32 mode. # Is annotation, keep old |thumb2_mode| value.
A 2-tuple (is_annotation, next_thumb2_mode):
is_annotation: Whether |tok| is an annotation.
next_thumb2_mode: New |thumb2_mode| value, or None if keep old value.
A 2 - tuple ( is_annotation next_thumb2_mode ) : is_annotation : Whether |tok| is an annotation . next_thumb2_mode : New |thumb2_mode| value or None if keep old value .
tok