172 if (
string[0] ==
'#') {
216 char cont_orig, cont, find, prev =
' ';
222 cont = fmt[strlen(fmt) + 1];
230 if (line->
format !=
nullptr) {
232 cont_orig = fmt[strlen(fmt) + 1];
265 if (*
str ==
'*' && *(
str + 1) ==
'/') {
290 if (*
str ==
'/' && *(
str + 1) ==
'/') {
295 else if (*
str ==
'/' && *(
str + 1) ==
'*') {
302 else if (
ELEM(*
str,
'"',
'\'')) {
309 else if (*
str ==
' ') {
367 if (cont != cont_orig && do_next && line->
next) {
383 static const char *ext[] = {
"osl",
nullptr};
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void ED_text_format_register_osl()
int flatten_string(const SpaceText *st, FlattenString *fs, const char *in)
bool text_check_identifier(char ch)
bool text_check_digit(char ch)
int text_check_format_len(TextLine *line, uint len)
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 void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const bool do_next)
bool text_format_string_literals_check_sorted_array(const Span< const char * > string_literals)
static const Span< const char * > text_format_osl_literals_specialvar(text_format_osl_literals_specialvar_data, ARRAY_SIZE(text_format_osl_literals_specialvar_data))
static char txtfmt_osl_format_identifier(const char *str)
int text_format_string_literal_find(const Span< const char * > string_literals, const char *text)
bool text_check_delim(char ch)
void flatten_string_free(FlattenString *fs)
static const char * text_format_osl_literals_reserved_data[]
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
static const char * text_format_osl_literals_builtinfunc_data[]
int BLI_str_utf8_size_safe(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool text_check_whitespace(char ch)
static int txtfmt_osl_find_preprocessor(const char *string)
static int txtfmt_osl_find_builtinfunc(const char *string)
static int txtfmt_osl_find_reserved(const char *string)
void ED_text_format_register(TextFormatType *tft)
static const char * text_format_osl_literals_specialvar_data[]
void text_format_fill_ascii(const char **str_p, char **fmt_p, const char type, const int len)
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 int txtfmt_osl_find_specialvar(const char *string)
void text_format_fill(const char **str_p, char **fmt_p, const char type, const int len)
const char * comment_line
char(*) format_identifier(const char *string)
void(*) format_line(SpaceText *st, TextLine *line, bool do_next)