diff options
| author | Yong He <yonghe@google.com> | 2019-01-29 13:27:20 -0800 |
|---|---|---|
| committer | Yong He <yonghe@google.com> | 2019-01-29 13:28:28 -0800 |
| commit | d222889d19ff57eda999269d22da6915daedc839 (patch) | |
| tree | eaf9ba2b702d7a93033e5a92ba4187a2088e5c15 | |
| parent | b7f8f7abcc3cc1dfa820ebba47a772b78d6a4cfb (diff) | |
Fix core.meta.slang
Escaped expression cannot start with '('.
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | source/slang/core.meta.slang | 6 | ||||
| -rw-r--r-- | source/slang/core.meta.slang.h | 18 |
3 files changed, 15 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore index b92a66e6e..206dfca5e 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,3 @@ build.*/ # Files generated by other shader compilers *.spv -/source/slang/core.meta.slang.temp.h diff --git a/source/slang/core.meta.slang b/source/slang/core.meta.slang index 50a4cbf96..54dfc6127 100644 --- a/source/slang/core.meta.slang +++ b/source/slang/core.meta.slang @@ -1289,9 +1289,9 @@ attribute_syntax [__readNone] : ReadNoneAttribute; enum AttributeTargets { - Struct = $((int) UserDefinedAttributeTargets::Struct), - Var = $((int) UserDefinedAttributeTargets::Var), - Function = $((int) UserDefinedAttributeTargets::Function), + Struct = $( (int) UserDefinedAttributeTargets::Struct), + Var = $( (int) UserDefinedAttributeTargets::Var), + Function = $( (int) UserDefinedAttributeTargets::Function), }; __attributeTarget(StructDecl) attribute_syntax [AttributeUsage(target : AttributeTargets)] : AttributeUsageAttribute;
\ No newline at end of file diff --git a/source/slang/core.meta.slang.h b/source/slang/core.meta.slang.h index 746e75bd9..f0671396d 100644 --- a/source/slang/core.meta.slang.h +++ b/source/slang/core.meta.slang.h @@ -1307,12 +1307,18 @@ SLANG_RAW("attribute_syntax [__readNone] : ReadNoneAttribute;\n") SLANG_RAW("\n") SLANG_RAW("enum AttributeTargets\n") SLANG_RAW("{\n") - - sb << "Struct = " << (int)UserDefinedAttributeTargets::Struct << ", "; - sb << "Var = " << (int)UserDefinedAttributeTargets::Var << ", "; - sb << "Function = " << (int)UserDefinedAttributeTargets::Function; - -SLANG_RAW("\n") +SLANG_RAW(" Struct = ") +SLANG_SPLICE( (int) UserDefinedAttributeTargets::Struct +) +SLANG_RAW(",\n") +SLANG_RAW(" Var = ") +SLANG_SPLICE( (int) UserDefinedAttributeTargets::Var +) +SLANG_RAW(",\n") +SLANG_RAW(" Function = ") +SLANG_SPLICE( (int) UserDefinedAttributeTargets::Function +) +SLANG_RAW(",\n") SLANG_RAW("};\n") SLANG_RAW("__attributeTarget(StructDecl)\n") SLANG_RAW("attribute_syntax [AttributeUsage(target : AttributeTargets)] : AttributeUsageAttribute;") |
