diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2020-06-18 13:40:08 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-18 13:40:08 -0700 |
| commit | 82ba914db9c3823ad7a0834d46b7fccedfe0acee (patch) | |
| tree | a2361c042e6a03ff957bd4a921f73efbb89dc1b7 /slang.h | |
| parent | 8c6e02bd094bbc0c9afb141265be9675f99ddb61 (diff) | |
| parent | 5952e3b3d7f505a7e6d71ecd0793911224f5bac3 (diff) | |
Merge branch 'master' into dyndispatch
Diffstat (limited to 'slang.h')
| -rw-r--r-- | slang.h | 27 |
1 files changed, 25 insertions, 2 deletions
@@ -2862,7 +2862,9 @@ namespace slang SlangPassThrough passThrough, char const* path) = 0; - /** Set the 'prelude' for generated code for a 'downstream compiler'. + /** DEPRECIATED: Use setLanguagePrelude + + Set the 'prelude' for generated code for a 'downstream compiler'. @param passThrough The downstream compiler for generated code that will have the prelude applied to it. @param preludeText The text added pre-pended verbatim before the generated source @@ -2872,7 +2874,9 @@ namespace slang SlangPassThrough passThrough, const char* preludeText) = 0; - /** Get the 'prelude' for generated code for a 'downstream compiler'. + /** DEPRECIATED: Use getLanguagePrelude + + Get the 'prelude' for generated code for a 'downstream compiler'. @param passThrough The downstream compiler for generated code that will have the prelude applied to it. @param outPrelude On exit holds a blob that holds the string of the prelude. */ @@ -2909,6 +2913,25 @@ namespace slang @return The downstream compiler for that source language */ virtual SlangPassThrough SLANG_MCALL getDefaultDownstreamCompiler( SlangSourceLanguage sourceLanguage) = 0; + + /* Set the 'prelude' placed before generated code for a specific language type. + + @param sourceLanguage The language the prelude should be inserted on. + @param preludeText The text added pre-pended verbatim before the generated source + + Note! That for pass-through usage, prelude is not pre-pended, preludes are for code generation only. + */ + virtual SLANG_NO_THROW void SLANG_MCALL setLanguagePrelude( + SlangSourceLanguage sourceLanguage, + const char* preludeText) = 0; + + /** Get the 'prelude' associated with a specific source language. + @param sourceLanguage The language the prelude should be inserted on. + @param outPrelude On exit holds a blob that holds the string of the prelude. + */ + virtual SLANG_NO_THROW void SLANG_MCALL getLanguagePrelude( + SlangSourceLanguage sourceLanguage, + ISlangBlob** outPrelude) = 0; }; #define SLANG_UUID_IGlobalSession { 0xc140b5fd, 0xc78, 0x452e, { 0xba, 0x7c, 0x1a, 0x1e, 0x70, 0xc7, 0xf7, 0x1c } }; |
