diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-29 22:25:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-29 22:25:03 +0400 |
commit | e9c7aaaa3ccd83ee0bb6076f1f9fb2ac5653187f (patch) | |
tree | 974e3fd9e901997e46532fafaa1d255bbac6fdcf /source/blender/makesdna | |
parent | 14ea0845807dc98a9d4601fcb5d7b232262be5dd (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/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_text_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h index 6ce883905d4..cd4e31c2521 100644 --- a/source/blender/makesdna/DNA_text_types.h +++ b/source/blender/makesdna/DNA_text_types.h @@ -82,5 +82,7 @@ typedef struct Text { #define TXT_TRISTR 0x04 /* triplets of quotes: """ or ''' */ #define TXT_SNGTRISTR 0x05 /*(TXT_TRISTR | TXT_SNGQUOTSTR)*/ #define TXT_DBLTRISTR 0x06 /*(TXT_TRISTR | TXT_DBLQUOTSTR)*/ +#define TXT_CONT_COMMENT_C 0x08 /* multi-line comments, OSL only (C style) */ +#define TXT_CONT_COMMENT_CXX 0x10 /* single-line comments, OSL only (C++ style) */ #endif diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 1dc25e0ab5e..530caeca910 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -248,6 +248,7 @@ typedef struct ThemeSpace { char syntaxl[4], syntaxn[4], syntaxb[4]; /* syntax for textwindow and nodes */ char syntaxv[4], syntaxc[4]; + char syntaxd[4], syntaxr[4]; char movie[4], movieclip[4], mask[4], image[4], scene[4], audio[4]; /* for sequence editor */ char effect[4], hpad0[4], transition[4], meta[4]; |