Exemplo n.º 1
0
def _match_trailing_comment(line):
    """
    Match if a line contains a comment, but not only whitespace
    if front of the comment.
    """
    res = not match_commented_line(line) and \
          match_line(REGEX_TRAILING_COMMENT, line)
    return res
Exemplo n.º 2
0
def _match_variable_colon(line):
    """
    Match if the line is a variable declaration with a double colon.
    This excludes outcommented lines.

    :line: Arbitracy line of code.
    """
    return match_line(__regex_variable_colon, line)
Exemplo n.º 3
0
def _match_omp_directive(line):
    """
    Match if a comment is a OMP directive.
    Use this function to filter the alignments.
    """
    return match_line(REGEX_OMP_DIRECTIVE, line)
Exemplo n.º 4
0
def _match_write_label(line):
    """
    Match if a `WRITE` statement uses a format label.
    """
    return match_line(REGEX_WRITE_LABEL, line)
Exemplo n.º 5
0
def _match_print_label(line):
    """
    Match if a `PRINT` statement uses a format label.
    """
    return match_line(REGEX_PRINT_LABEL, line)
Exemplo n.º 6
0
def _match_format_label(line):
    """
    Match if a line specifies a format label.
    """
    return match_line(REGEX_FORMAT_LABEL, line)