public ASTConverter(ASTContext context) { Context = context; typeConverter = new TypeConverter(); declConverter = new DeclConverter(typeConverter); typeConverter.declConverter = declConverter; }
public override AST.Type VisitTemplateParameter(TemplateParameterType type) { var _type = new AST.TemplateParameterType(); _type.Parameter = DeclConverter.VisitTemplateParameter(type.Parameter); VisitType(type, _type); return(_type); }
public override AST.Type VisitFunction(FunctionType type) { var _type = new AST.FunctionType(); VisitType(type, _type); _type.ReturnType = VisitQualified(type.ReturnType); _type.CallingConvention = DeclConverter.VisitCallingConvention( type.CallingConvention); for (uint i = 0; i < type.ParametersCount; ++i) { var param = type.getParameters(i); var _param = declConverter.Visit(param) as AST.Parameter; _type.Parameters.Add(_param); } return(_type); }