Browse Source

Add new VisitQualifiedType overload to visitors.

pull/1514/head
Joao Matos 5 years ago committed by João Matos
parent
commit
6b53f5828a
  1. 5
      src/AST/ASTVisitor.cs
  2. 3
      src/AST/Type.cs
  3. 5
      src/Generator/Generators/CodeGenerator.cs
  4. 5
      src/Generator/Generators/TypePrinter.cs

5
src/AST/ASTVisitor.cs

@ -304,6 +304,11 @@ namespace CppSharp.AST @@ -304,6 +304,11 @@ namespace CppSharp.AST
return true;
}
public virtual bool VisitQualifiedType(QualifiedType type)
{
return type.Type.Visit(this, type.Qualifiers);
}
#endregion
#region Decl Visitors

3
src/AST/Type.cs

@ -73,7 +73,7 @@ namespace CppSharp.AST @@ -73,7 +73,7 @@ namespace CppSharp.AST
public T Visit<T>(ITypeVisitor<T> visitor)
{
return Type.Visit(visitor, Qualifiers);
return visitor.VisitQualifiedType(this);
}
public override string ToString()
@ -1287,5 +1287,6 @@ namespace CppSharp.AST @@ -1287,5 +1287,6 @@ namespace CppSharp.AST
T VisitVectorType(VectorType vectorType, TypeQualifiers quals);
T VisitCILType(CILType type, TypeQualifiers quals);
T VisitUnsupportedType(UnsupportedType type, TypeQualifiers quals);
T VisitQualifiedType(QualifiedType type);
}
}

5
src/Generator/Generators/CodeGenerator.cs

@ -524,6 +524,11 @@ namespace CppSharp.Generators @@ -524,6 +524,11 @@ namespace CppSharp.Generators
throw new NotImplementedException();
}
public bool VisitQualifiedType(QualifiedType type)
{
throw new NotImplementedException();
}
public bool VisitStmt(Stmt stmt)
{
throw new NotImplementedException();

5
src/Generator/Generators/TypePrinter.cs

@ -410,6 +410,11 @@ namespace CppSharp.Generators @@ -410,6 +410,11 @@ namespace CppSharp.Generators
throw new NotImplementedException();
}
public virtual TypePrinterResult VisitQualifiedType(QualifiedType type)
{
return type.Type.Visit(this, type.Qualifiers);
}
#endregion
}
}
Loading…
Cancel
Save