diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2022-07-26 00:43:48 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2022-07-26 00:43:48 +0300 |
commit | f081e76037432cb926be45e980eac201d337032c (patch) | |
tree | dd1225521c12ea21c0b0c3d51ec1ae3f8730755f /source/blender/editors/space_text/text_format_osl.c | |
parent | fa2084ae58a77b1201289b6bedac427f73c762d1 (diff) | |
parent | 462f99bf38648a08226b1fba423315aec2bc577b (diff) |
Merge branch 'master' into geometry-nodes-iterative-cachegeometry-nodes-rigid-body-integration
Diffstat (limited to 'source/blender/editors/space_text/text_format_osl.c')
-rw-r--r-- | source/blender/editors/space_text/text_format_osl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/space_text/text_format_osl.c b/source/blender/editors/space_text/text_format_osl.c index 27dc1174c49..575eadeee66 100644 --- a/source/blender/editors/space_text/text_format_osl.c +++ b/source/blender/editors/space_text/text_format_osl.c @@ -285,7 +285,7 @@ static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const bool do_ cont = (*str == '"') ? FMT_CONT_QUOTEDOUBLE : FMT_CONT_QUOTESINGLE; *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; } @@ -298,18 +298,19 @@ static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const bool do_ 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 or 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_osl_format_identifier()' */ + /* keep in sync with `txtfmt_osl_format_identifier()`. */ if ((i = txtfmt_osl_find_specialvar(str)) != -1) { prev = FMT_TYPE_SPECIAL; } else if ((i = txtfmt_osl_find_builtinfunc(str)) != -1) { prev = FMT_TYPE_KEYWORD; } else if ((i = txtfmt_osl_find_reserved(str)) != -1) { prev = FMT_TYPE_RESERVED; |