diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-05-22 14:21:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-22 11:21:37 -0700 |
| commit | 076a4c06767cca12c5205d950e9cd37451f91488 (patch) | |
| tree | dc3bcc376e18e5233f61b2cedfa3419717798a01 /source/slang/slang-check-modifier.cpp | |
| parent | daf53bb2708982a2bcc6d6cc08fe88790ccf0bc2 (diff) | |
Tidy up around AST nodes (#1353)
* Fields from upper to lower case in slang-ast-decl.h
* Lower camel field names in slang-ast-stmt.h
* Fix fields in slang-ast-expr.h
* slang-ast-type.h make fields lowerCamel.
* slang-ast-base.h members functions lowerCamel.
* Method names in slang-ast-type.h to lowerCamel.
* GetCanonicalType -> getCanonicalType
* Substitute -> substitute
* Equals -> equals
ToString -> toString
* ParentDecl -> parentDecl
Members -> members
Diffstat (limited to 'source/slang/slang-check-modifier.cpp')
| -rw-r--r-- | source/slang/slang-check-modifier.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp index 97da31f39..b8b3846dc 100644 --- a/source/slang/slang-check-modifier.cpp +++ b/source/slang/slang-check-modifier.cpp @@ -133,7 +133,7 @@ namespace Slang auto structDecl = lookupResult.item.declRef.as<StructDecl>().getDecl(); if(!structDecl) return nullptr; - auto attrUsageAttr = structDecl->FindModifier<AttributeUsageAttribute>(); + auto attrUsageAttr = structDecl->findModifier<AttributeUsageAttribute>(); if (!attrUsageAttr) return nullptr; @@ -163,7 +163,7 @@ namespace Slang // // TODO: This step should skip `static` fields. // - for(auto member : structDecl->Members) + for(auto member : structDecl->members) { if(auto varMember = as<VarDecl>(member)) { @@ -173,22 +173,22 @@ namespace Slang paramDecl->nameAndLoc = member->nameAndLoc; paramDecl->type = varMember->type; paramDecl->loc = member->loc; - paramDecl->SetCheckState(DeclCheckState::Checked); + paramDecl->setCheckState(DeclCheckState::Checked); - paramDecl->ParentDecl = attrDecl; - attrDecl->Members.add(paramDecl); + paramDecl->parentDecl = attrDecl; + attrDecl->members.add(paramDecl); } } // We need to end by putting the new attribute declaration // into the AST, so that it can be found via lookup. // - auto parentDecl = structDecl->ParentDecl; + auto parentDecl = structDecl->parentDecl; // // TODO: handle the case where `parentDecl` is generic? // - attrDecl->ParentDecl = parentDecl; - parentDecl->Members.add(attrDecl); + attrDecl->parentDecl = parentDecl; + parentDecl->members.add(attrDecl); // Finally, we perform any required semantic checks on // the newly constructed attribute decl. @@ -615,7 +615,7 @@ namespace Slang // If any of these match `attrTarget`, then we are good. // bool validTarget = false; - for(auto attrTargetMod : attrDecl->GetModifiersOfType<AttributeTargetModifier>()) + for(auto attrTargetMod : attrDecl->getModifiersOfType<AttributeTargetModifier>()) { if(attrTarget->getClass().isSubClassOf(attrTargetMod->syntaxClass)) { |
