Пример #1
0
def is_struct_bracket(buffer, line, column):
    is_struct_def = re.match("^type \w+ struct",
        all.get_pair_line(buffer, line, column))
    is_method_def = re.match("^func \(\w+ \w+\) ",
        all.get_pair_line(buffer, line, column))
    return is_struct_def or is_method_def
Пример #2
0
def is_if_bracket(buffer, line, column):
    return all.get_pair_line(buffer, line, column).strip().startswith("if")