summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorYong He <yonghe@google.com>2019-01-29 13:27:20 -0800
committerYong He <yonghe@google.com>2019-01-29 13:28:28 -0800
commitd222889d19ff57eda999269d22da6915daedc839 (patch)
treeeaf9ba2b702d7a93033e5a92ba4187a2088e5c15 /source
parentb7f8f7abcc3cc1dfa820ebba47a772b78d6a4cfb (diff)
Fix core.meta.slang
Escaped expression cannot start with '('.
Diffstat (limited to 'source')
-rw-r--r--source/slang/core.meta.slang6
-rw-r--r--source/slang/core.meta.slang.h18
2 files changed, 15 insertions, 9 deletions
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;")