Internals: Rename Ast on non-node classes (#3262). No functional change.

This commit has the following replacements applied:

	s/\bAstUserInUseBase\b/VNUserInUseBase/g;
        s/\bAstAttrType\b/VAttrType/g;
        s/\bAstBasicDTypeKwd\b/VBasicDTypeKwd/g;
        s/\bAstDisplayType\b/VDisplayType/g;
        s/\bAstNDeleter\b/VNDeleter/g;
        s/\bAstNRelinker\b/VNRelinker/g;
        s/\bAstNVisitor\b/VNVisitor/g;
        s/\bAstPragmaType\b/VPragmaType/g;
        s/\bAstType\b/VNType/g;
        s/\bAstUser1InUse\b/VNUser1InUse/g;
        s/\bAstUser2InUse\b/VNUser2InUse/g;
        s/\bAstUser3InUse\b/VNUser3InUse/g;
        s/\bAstUser4InUse\b/VNUser4InUse/g;
        s/\bAstUser5InUse\b/VNUser5InUse/g;
        s/\bAstVarType\b/VVarType/g;
This commit is contained in:
Wilson Snyder
2022-01-02 14:03:20 -05:00
parent 73374a0303
commit e6857df5c6
96 changed files with 1015 additions and 1030 deletions
+4 -4
View File
@@ -525,13 +525,13 @@ def write_impl(filename):
fh.write("return ")
if re.search(r'^Node', typen):
fh.write(
"static_cast<int>(nodep->type()) >= static_cast<int>(AstType::first"
"static_cast<int>(nodep->type()) >= static_cast<int>(VNType::first"
+ typen + ") && ")
fh.write(
"static_cast<int>(nodep->type()) <= static_cast<int>(AstType::last"
"static_cast<int>(nodep->type()) <= static_cast<int>(VNType::last"
+ typen + "); ")
else:
fh.write("nodep->type() == AstType::at" + typen + "; ")
fh.write("nodep->type() == VNType::at" + typen + "; ")
fh.write("}\n")
@@ -619,7 +619,7 @@ def write_macros(filename):
typen = match.group(1)
base = match.group(4)
if not typen.startswith("Node"):
macro = "#define ASTGEN_SUPER_{t}(...) {b}(AstType::at{t}, __VA_ARGS__)\n" \
macro = "#define ASTGEN_SUPER_{t}(...) {b}(VNType::at{t}, __VA_ARGS__)\n" \
.format(b=base, t=typen)
fh.write(macro)