Code review comment: Can't/shouldn't we call `analyzeNode` instead of directly calling `accept`?

Code before review:
public void visit(BLangMappingMatchPattern mappingMatchPattern) {
BRecordTypeSymbol recordSymbol =
Symbols.createRecordSymbol(0, names.fromString("$anonRecordType$" + recordCount++),
env.enclPkg.symbol.pkgID, null, env.scope.owner, mappingMatchPattern.pos, VIRTUAL);
LinkedHashMap<String, BField> fields = new LinkedHashMap<>();
for (BLangFieldMatchPattern fieldMatchPattern : mappingMatchPattern.fieldMatchPatterns) {
fieldMatchPattern.accept(this);
String fieldName = fieldMatchPattern.fieldName.value;
BVarSymbol fieldSymbol = new BVarSymbol(0, names.fromString(fieldName), env.enclPkg.symbol.pkgID,
fieldMatchPattern.matchPattern.type, recordSymbol, fieldMatchPattern.pos, COMPILED_SOURCE);
BField field = new BField(names.fromString(fieldName), fieldMatchPattern.pos, fieldSymbol);
fields.put(fieldName, field);
mappingMatchPattern.declaredVars.putAll(fieldMatchPattern.declaredVars);
}
BRecordType recordVarType = new BRecordType(recordSymbol);
recordVarType.fields = fields;
recordVarType.restFieldType = symTable.anydataType;
if (mappingMatchPattern.restMatchPattern != null) {
BLangRestMatchPattern restMatchPattern = mappingMatchPattern.restMatchPattern;
restMatchPattern.type = new BMapType(TypeTags.MAP, symTable.anydataType, null);
restMatchPattern.accept(this);
mappingMatchPattern.declaredVars.put(restMatchPattern.variableName.value, restMatchPattern.symbol);
}
mappingMatchPattern.type = types.resolvePatternTypeFromMatchExpr(mappingMatchPattern,
recordVarType, env);
assignTypesToMemberPatterns(mappingMatchPattern, mappingMatchPattern.type);
}

Line under review: fieldMatchPattern.accept(this);

Code after addressing the review:
public void visit(BLangMappingMatchPattern mappingMatchPattern) {
EnumSet<Flag> flags = EnumSet.of(Flag.PUBLIC, Flag.ANONYMOUS);
BRecordTypeSymbol recordSymbol = Symbols.createRecordSymbol(Flags.asMask(flags), Names.EMPTY,
env.enclPkg.packageID, null, env.scope.owner, mappingMatchPattern.pos, VIRTUAL);
recordSymbol.name = names.fromString(anonModelHelper.getNextAnonymousTypeKey(env.enclPkg.packageID));
LinkedHashMap<String, BField> fields = new LinkedHashMap<>();
for (BLangFieldMatchPattern fieldMatchPattern : mappingMatchPattern.fieldMatchPatterns) {
analyzeNode(fieldMatchPattern, env);
String fieldName = fieldMatchPattern.fieldName.value;
BVarSymbol fieldSymbol = new BVarSymbol(0, names.fromString(fieldName), env.enclPkg.symbol.pkgID,
fieldMatchPattern.matchPattern.type, recordSymbol, fieldMatchPattern.pos, COMPILED_SOURCE);
BField field = new BField(names.fromString(fieldName), fieldMatchPattern.pos, fieldSymbol);
fields.put(fieldName, field);
mappingMatchPattern.declaredVars.putAll(fieldMatchPattern.declaredVars);
}
BRecordType recordVarType = new BRecordType(recordSymbol);
recordVarType.fields = fields;
recordVarType.restFieldType = symTable.anydataType;
if (mappingMatchPattern.restMatchPattern != null) {
BLangRestMatchPattern restMatchPattern = mappingMatchPattern.restMatchPattern;
restMatchPattern.type = new BMapType(TypeTags.MAP, symTable.anydataType, null);
analyzeNode(restMatchPattern, env);
mappingMatchPattern.declaredVars.put(restMatchPattern.variableName.value, restMatchPattern.symbol);
}
mappingMatchPattern.type = types.resolvePatternTypeFromMatchExpr(mappingMatchPattern,
recordVarType, env);
assignTypesToMemberPatterns(mappingMatchPattern, mappingMatchPattern.type);
}