170 if (
string[0] ==
'#') {
214 char cont_orig, cont, find, prev =
' ';
218 if (line->prev && line->prev->format !=
nullptr) {
219 fmt = line->prev->format;
220 cont = fmt[strlen(fmt) + 1];
228 if (line->format !=
nullptr) {
230 cont_orig = fmt[strlen(fmt) + 1];
263 if (*
str ==
'*' && *(
str + 1) ==
'/') {
288 if (*
str ==
'/' && *(
str + 1) ==
'/') {
293 else if (*
str ==
'/' && *(
str + 1) ==
'*') {
300 else if (
ELEM(*
str,
'"',
'\'')) {
307 else if (*
str ==
' ') {
365 if (cont != cont_orig && do_next && line->next) {
381 static const char *ext[] = {
"osl",
nullptr};
bool text_check_digit(char ch)
bool text_check_identifier(char ch)
bool text_check_delim(char ch)
bool text_check_whitespace(char ch)
int BLI_str_utf8_size_safe(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
const char * comment_line
char(* format_identifier)(const char *string)
void(* format_line)(SpaceText *st, TextLine *line, bool do_next)
int flatten_string(const SpaceText *st, FlattenString *fs, const char *in)
void text_format_fill(const char **str_p, char **fmt_p, const char type, const int len)
void flatten_string_free(FlattenString *fs)
const bool text_format_string_literals_check_sorted_array(const Span< const char * > string_literals)
int text_format_string_literal_find(const Span< const char * > string_literals, const char *text)
void text_format_fill_ascii(const char **str_p, char **fmt_p, const char type, const int len)
void ED_text_format_register(TextFormatType *tft)
int text_check_format_len(TextLine *line, uint len)
static char txtfmt_osl_format_identifier(const char *str)
static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const bool do_next)
static int txtfmt_osl_find_builtinfunc(const char *string)
static const char * text_format_osl_literals_specialvar_data[]
static int txtfmt_osl_find_preprocessor(const char *string)
static const Span< const char * > text_format_osl_literals_reserved(text_format_osl_literals_reserved_data, ARRAY_SIZE(text_format_osl_literals_reserved_data))
void ED_text_format_register_osl()
static int txtfmt_osl_find_specialvar(const char *string)
static int txtfmt_osl_find_reserved(const char *string)
static const char * text_format_osl_literals_reserved_data[]
static const char * text_format_osl_literals_builtinfunc_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_specialvar(text_format_osl_literals_specialvar_data, ARRAY_SIZE(text_format_osl_literals_specialvar_data))