summaryrefslogtreecommitdiff
path: root/source/slang/syntax.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/syntax.h')
-rw-r--r--source/slang/syntax.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/slang/syntax.h b/source/slang/syntax.h
index 8d6a1edbc..f5e22d9b5 100644
--- a/source/slang/syntax.h
+++ b/source/slang/syntax.h
@@ -74,6 +74,29 @@ namespace Slang
kConversionCost_ScalarToVector = 1,
};
+ // TODO(tfoley): We should ditch this enumeration
+ // and just use the IR opcodes that represent these
+ // types directly. The one major complication there
+ // is that the order of the enum values currently
+ // matters, since it determines promotion rank.
+ // We either need to keep that restriction, or
+ // look up promotion rank by some other means.
+ //
+ enum class BaseType
+ {
+ // Note(tfoley): These are ordered in terms of promotion rank, so be vareful when messing with this
+
+ Void = 0,
+ Bool,
+ Int,
+ UInt,
+ UInt64,
+ Half,
+ Float,
+ Double,
+ };
+
+
// Forward-declare all syntax classes
#define SYNTAX_CLASS(NAME, BASE, ...) class NAME;