Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-12-29 22:25:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-29 22:25:03 +0400
commite9c7aaaa3ccd83ee0bb6076f1f9fb2ac5653187f (patch)
tree974e3fd9e901997e46532fafaa1d255bbac6fdcf /source/blender/editors/space_text/text_format.h
parent14ea0845807dc98a9d4601fcb5d7b232262be5dd (diff)
patch [#33609] Syntax highlighting for OSL in Text Editor
from Patrick Boelens (senshi). with modifications to split it into its own function. also added C style multi-line comment support /* ... */ I've left out the part of this patch that sets the language in the space, since I think this might be better stored in the text block. For now it simply uses OSL syntax highlighting when the extension is '.osl'.
Diffstat (limited to 'source/blender/editors/space_text/text_format.h')
-rw-r--r--source/blender/editors/space_text/text_format.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/space_text/text_format.h b/source/blender/editors/space_text/text_format.h
index 0e6c0937579..dc7f35f8eaf 100644
--- a/source/blender/editors/space_text/text_format.h
+++ b/source/blender/editors/space_text/text_format.h
@@ -60,7 +60,9 @@ typedef struct TextFormatType {
* '!' Punctuation and other symbols
* 'n' Numerals
* 'l' String letters
+ * 'd' Decorator / Preprocessor directive
* 'v' Special variables (class, def)
+ * 'r' Reserved keywords currently not in use, but still prohibited (OSL -> switch e.g.)
* 'b' Built-in names (print, for, etc.)
* 'q' Other text (identifiers, etc.)
* It is terminated with a null-terminator '\0' followed by a continuation
@@ -75,6 +77,7 @@ void ED_text_format_register(TextFormatType *tft);
/* formatters */
void ED_text_format_register_py(void);
+void ED_text_format_register_osl(void);
#define STR_LITERAL_STARTSWITH(str, str_literal, len_var) \
(strncmp(str, str_literal, len_var = (sizeof(str_literal) - 1)) == 0)