summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-06-24 13:56:06 -0400
committerGitHub <noreply@github.com>2020-06-24 13:56:06 -0400
commitae41db80aa95ee7243d91a3ae4f56e6deb17f7f4 (patch)
tree444c0d10680b8ab75e82225155fcd3e8224204f0 /source/slang/slang.cpp
parentb595dd0cd984bcb4db980693363798dd2b490da4 (diff)
AST Serialization writing (#1407)
* Try to fix problem with C++ extractor concating tokens producing an erroneous result. * Improve naming/comments around C++ extractor fix. * Another small improvement around space concating when outputing token list. * Handle some more special cases for consecutive tokens for C++ extractor concat of tokens. * WIP AST serialization. * Comment out so compile works. * More work on AST serialization. * WIP AST serialize. * WIP AST Serialization - handling more types. * WIP: Compiles but not all types are converted, as not all List element types are handled. * Compiles with array types. * Finish off AST serialization of remaining types. * Remove ComputedLayoutModifier and TupleVarModifier. * Add fields to ASTSerialClass type. * Construct AST type layout. * AST Serialization working for writing to ASTSerialWriter. * Removed call to ASTSerialization::selfTest in session creation. * Fixes for gcc. * Diagnostics handling - better handling of dashify. * Improve comment around DiagnosticLookup. * Updated VS project.
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 5279b2a40..7c535d64b 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -15,6 +15,7 @@
#include "slang-type-layout.h"
#include "slang-ast-dump.h"
+#include "slang-ast-serialize.h"
#include "slang-repro.h"
@@ -1074,6 +1075,18 @@ void FrontEndCompileRequest::parseTranslationUnit(
File::writeAllText(fileName, writer.getContent());
}
}
+
+#if 0
+ // Test serialization
+ {
+ RefPtr<ASTSerialClasses> classes = new ASTSerialClasses;
+ ASTSerialWriter writer(classes);
+
+ // Lets serialize it all
+ writer.addPointer(translationUnit->getModuleDecl());
+ }
+#endif
+
}
}