From 695c2700de54a5fec72ce7214c137a1dc3a02d7b Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Wed, 9 Aug 2017 10:13:40 -0700 Subject: Major naming overhaul: - `ExpressionSyntaxNode` becomes `Expr` - `StatementSyntaxNode` becomes `Stmt` - `StructSyntaxNode` becomes `StructDecl` - `ProgramSyntaxNode` becomes `ModuleDecl` - `ExpressionType` becomes `Type` - Existing fields names `Type` become `type` - There might be some collateral damage here if there were, e.g., `enum`s named `Type`, but I can live with that for now and fix those up as a I see them --- source/slang/slang.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 03bb6a09b..0dcbf44ea 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -112,7 +112,7 @@ void CompileRequest::parseTranslationUnit( for(auto& def : translationUnit->preprocessorDefinitions) combinedPreprocessorDefinitions.Add(def.Key, def.Value); - RefPtr translationUnitSyntax = new ProgramSyntaxNode(); + RefPtr translationUnitSyntax = new ModuleDecl(); translationUnit->SyntaxNode = translationUnitSyntax; for (auto sourceFile : translationUnit->sourceFiles) @@ -355,7 +355,7 @@ int CompileRequest::addEntryPoint( return (int) result; } -RefPtr CompileRequest::loadModule( +RefPtr CompileRequest::loadModule( String const& name, String const& path, String const& source, @@ -386,7 +386,7 @@ RefPtr CompileRequest::loadModule( // - RefPtr moduleDecl = translationUnit->SyntaxNode; + RefPtr moduleDecl = translationUnit->SyntaxNode; mapPathToLoadedModule.Add(path, moduleDecl); mapNameToLoadedModules.Add(name, moduleDecl); @@ -406,7 +406,7 @@ void CompileRequest::handlePoundImport( // Imported code is always native Slang code RefPtr languageScope = mSession->slangLanguageScope; - RefPtr translationUnitSyntax = new ProgramSyntaxNode(); + RefPtr translationUnitSyntax = new ModuleDecl(); translationUnit->SyntaxNode = translationUnitSyntax; parseSourceFile( @@ -424,7 +424,7 @@ void CompileRequest::handlePoundImport( // - RefPtr moduleDecl = translationUnit->SyntaxNode; + RefPtr moduleDecl = translationUnit->SyntaxNode; // TODO: It is a bit broken here that we use the module path, // as the "name" when registering things, but this saves @@ -436,13 +436,13 @@ void CompileRequest::handlePoundImport( loadedModulesList.Add(moduleDecl); } -RefPtr CompileRequest::findOrImportModule( +RefPtr CompileRequest::findOrImportModule( String const& name, CodePosition const& loc) { // Have we already loaded a module matching this name? // If so, return it. - RefPtr moduleDecl; + RefPtr moduleDecl; if (mapNameToLoadedModules.TryGetValue(name, moduleDecl)) return moduleDecl; @@ -505,7 +505,7 @@ RefPtr CompileRequest::findOrImportModule( loc); } -RefPtr findOrImportModule( +RefPtr findOrImportModule( CompileRequest* request, String const& name, CodePosition const& loc) -- cgit v1.2.3