diff options
Diffstat (limited to 'source/blender/editors/space_text/text_format_py.c')
-rw-r--r-- | source/blender/editors/space_text/text_format_py.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/space_text/text_format_py.c b/source/blender/editors/space_text/text_format_py.c index 47d0168195b..28f536ffa98 100644 --- a/source/blender/editors/space_text/text_format_py.c +++ b/source/blender/editors/space_text/text_format_py.c @@ -59,9 +59,9 @@ static int txtfmt_py_find_builtinfunc(const char *string) /* clang-format off */ if (STR_LITERAL_STARTSWITH(string, "and", len)) { i = len; - } else if (STR_LITERAL_STARTSWITH(string, "as", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "assert", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "async", len)) { i = len; + } else if (STR_LITERAL_STARTSWITH(string, "as", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "await", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "break", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "case", len)) { i = len; @@ -425,7 +425,7 @@ static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const bool do_n } *fmt = FMT_TYPE_STRING; } - /* White-space (all ws. has been converted to spaces). */ + /* White-space (all white-space has been converted to spaces). */ else if (*str == ' ') { *fmt = FMT_TYPE_WHITESPACE; } @@ -447,18 +447,19 @@ static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const bool do_n else if ((*str != '@') && text_check_delim(*str)) { *fmt = FMT_TYPE_SYMBOL; } - /* Identifiers and other text (no previous ws. or delims. so text continues) */ + /* Identifiers and other text (no previous white-space/delimiters so text continues). */ else if (prev == FMT_TYPE_DEFAULT) { str += BLI_str_utf8_size_safe(str) - 1; *fmt = FMT_TYPE_DEFAULT; } - /* Not ws, a digit, punct, or continuing text. Must be new, check for special words */ + /* Not white-space, a digit, punctuation, or continuing text. + * Must be new, check for special words. */ else { - /* Keep aligned args for readability. */ + /* Keep aligned arguments for readability. */ /* clang-format off */ /* Special vars(v) or built-in keywords(b) */ - /* keep in sync with 'txtfmt_py_format_identifier()' */ + /* keep in sync with `txtfmt_py_format_identifier()`. */ if ((i = txtfmt_py_find_specialvar(str)) != -1) { prev = FMT_TYPE_SPECIAL; } else if ((i = txtfmt_py_find_builtinfunc(str)) != -1) { prev = FMT_TYPE_KEYWORD; } else if ((i = txtfmt_py_find_decorator(str)) != -1) { prev = FMT_TYPE_DIRECTIVE; |