summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-dump.cpp
diff options
context:
space:
mode:
authorDietrich Geisler <dag368@cornell.edu>2020-06-02 12:12:35 -0400
committerGitHub <noreply@github.com>2020-06-02 09:12:35 -0700
commit926a0c51071f6cf5718c77958cc801030ce9d404 (patch)
treec02e84cd402afc6383db2e169c08d05c2a12fbc6 /source/slang/slang-ast-dump.cpp
parent8acb704ecabc10c31e664de3814c544572e3945f (diff)
Working matrix swizzle (#1354)
* Working matrix swizzle. Supports one and zero indexing and multiple elements. Performs semantic checking of the swizzle. Matrix swizzles are transformed into a vector of indexing operations during lowering to the IR. This change does not handle matrix swizzle as lvalues. * Renaming * Added missing semicolon * Initialize variable for gcc * Added the expect file for diagnostics * Matrix swizzle updated per PR feedback * Stylistic fix * Formatting fixes * Fix compiling with AST change. Change indentation. Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
Diffstat (limited to 'source/slang/slang-ast-dump.cpp')
-rw-r--r--source/slang/slang-ast-dump.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/slang-ast-dump.cpp b/source/slang/slang-ast-dump.cpp
index 2157b7c19..d0b2497bb 100644
--- a/source/slang/slang-ast-dump.cpp
+++ b/source/slang/slang-ast-dump.cpp
@@ -450,6 +450,15 @@ struct Context
m_writer->emit("}");
}
+ void dump(const MatrixCoord& coord)
+ {
+ m_writer->emit("(");
+ m_writer->emit(coord.row);
+ m_writer->emit(", ");
+ m_writer->emit(coord.col);
+ m_writer->emit(")\n");
+ }
+
void dump(const LookupResult& result)
{
auto& nonConstResult = const_cast<LookupResult&>(result);