|
Blender V4.3
|
#include <cstring>#include "BLI_blenlib.h"#include "DNA_space_types.h"#include "DNA_text_types.h"#include "BKE_text.h"#include "text_format.hh"Go to the source code of this file.
Functions | |
Local Functions (for #TextFormatType::format_line) | |
| static int | txtfmt_osl_find_builtinfunc (const char *string) |
| static int | txtfmt_osl_find_reserved (const char *string) |
| static int | txtfmt_osl_find_specialvar (const char *string) |
| static int | txtfmt_osl_find_preprocessor (const char *string) |
| static char | txtfmt_osl_format_identifier (const char *str) |
Format Line Implementation (#TextFormatType::format_line) | |
| static void | txtfmt_osl_format_line (SpaceText *st, TextLine *line, const bool do_next) |
Registration | |
| void | ED_text_format_register_osl () |
Local Literal Definitions | |
| static const char * | text_format_osl_literals_builtinfunc_data [] |
| static const char * | text_format_osl_literals_reserved_data [] |
| static const char * | text_format_osl_literals_specialvar_data [] |
| static const Span< const char * > | text_format_osl_literals_builtinfunc (text_format_osl_literals_builtinfunc_data, ARRAY_SIZE(text_format_osl_literals_builtinfunc_data)) |
| static const Span< const char * > | text_format_osl_literals_reserved (text_format_osl_literals_reserved_data, ARRAY_SIZE(text_format_osl_literals_reserved_data)) |
| static const Span< const char * > | text_format_osl_literals_specialvar (text_format_osl_literals_specialvar_data, ARRAY_SIZE(text_format_osl_literals_specialvar_data)) |
Note that this formatter shares core logic with text_format_glsl.cc, improvements here may apply there too.
Definition in file text_format_osl.cc.
| void ED_text_format_register_osl | ( | ) |
Definition at line 378 of file text_format_osl.cc.
References BLI_assert, TextFormatType::comment_line, ED_text_format_register(), TextFormatType::ext, TextFormatType::format_identifier, TextFormatType::format_line, text_format_osl_literals_builtinfunc(), text_format_osl_literals_reserved(), text_format_osl_literals_specialvar(), text_format_string_literals_check_sorted_array(), txtfmt_osl_format_identifier(), and txtfmt_osl_format_line().
Referenced by ED_spacetype_text().
|
static |
Referenced by ED_text_format_register_osl(), and txtfmt_osl_find_builtinfunc().
|
static |
Referenced by ED_text_format_register_osl(), and txtfmt_osl_find_reserved().
|
static |
Referenced by ED_text_format_register_osl(), and txtfmt_osl_find_specialvar().
|
static |
Definition at line 134 of file text_format_osl.cc.
References text_check_identifier(), text_format_osl_literals_builtinfunc(), and text_format_string_literal_find().
Referenced by txtfmt_osl_format_identifier(), and txtfmt_osl_format_line().
|
static |
Definition at line 168 of file text_format_osl.cc.
References text_check_identifier(), and text_check_whitespace().
Referenced by txtfmt_osl_format_identifier(), and txtfmt_osl_format_line().
|
static |
Definition at line 145 of file text_format_osl.cc.
References text_check_identifier(), text_format_osl_literals_reserved(), and text_format_string_literal_find().
Referenced by txtfmt_osl_format_identifier(), and txtfmt_osl_format_line().
|
static |
Definition at line 156 of file text_format_osl.cc.
References text_check_identifier(), text_format_osl_literals_specialvar(), and text_format_string_literal_find().
Referenced by txtfmt_osl_format_identifier(), and txtfmt_osl_format_line().
|
static |
Definition at line 184 of file text_format_osl.cc.
References FMT_TYPE_DEFAULT, FMT_TYPE_DIRECTIVE, FMT_TYPE_KEYWORD, FMT_TYPE_RESERVED, FMT_TYPE_SPECIAL, str, txtfmt_osl_find_builtinfunc(), txtfmt_osl_find_preprocessor(), txtfmt_osl_find_reserved(), and txtfmt_osl_find_specialvar().
Referenced by ED_text_format_register_osl().
Definition at line 209 of file text_format_osl.cc.
References BLI_assert, BLI_str_utf8_size_safe(), FlattenString::buf, ELEM, flatten_string(), flatten_string_free(), FMT_CONT_ALL, FMT_CONT_COMMENT_C, FMT_CONT_NOP, FMT_CONT_QUOTEDOUBLE, FMT_CONT_QUOTESINGLE, FMT_TYPE_COMMENT, FMT_TYPE_DEFAULT, FMT_TYPE_DIRECTIVE, FMT_TYPE_KEYWORD, FMT_TYPE_NUMERAL, FMT_TYPE_RESERVED, FMT_TYPE_SPECIAL, FMT_TYPE_STRING, FMT_TYPE_SYMBOL, FMT_TYPE_WHITESPACE, len, SpaceText::next, str, text_check_delim(), text_check_digit(), text_check_format_len(), text_format_fill(), text_format_fill_ascii(), txtfmt_osl_find_builtinfunc(), txtfmt_osl_find_preprocessor(), txtfmt_osl_find_reserved(), txtfmt_osl_find_specialvar(), and txtfmt_osl_format_line().
Referenced by ED_text_format_register_osl(), and txtfmt_osl_format_line().
|
static |
OSL builtin function. list is from https://github.com/imageworks/OpenShadingLanguage/raw/master/src/doc/osl-languagespec.pdf
Definition at line 32 of file text_format_osl.cc.
|
static |
OSL reserved keywords See: https://github.com/imageworks/OpenShadingLanguage/raw/master/src/doc/osl-languagespec.pdf
Definition at line 70 of file text_format_osl.cc.
|
static |
Definition at line 115 of file text_format_osl.cc.