INNER CODE UNIT · C#
GetParameters
axmolengine/axmol · tools/bindings-generator/src/BindingGenerator.cs:1124
private static IReadOnlyList<CXCursor> GetParameters(CXCursor cursor, CursorTree tree) =>
GetChildren(tree, cursor)
.Where(x => x.Kind == CXCursorKind.CXCursor_ParmDecl)
.OrderBy(GetSourceOffset)
.ToArray();
private static string ResolveType(string type, string contextType, CursorTree tree)
{
if (string.IsNullOrWhiteSpace(type) || tree.TypeNames.Count == 0)
return type;
var contextParts = contextType.Split("::", StringSplitOptions.RemoveEmptyEntries).ToList();
var matches = Regex.Matches(type, @"[A-Za-z_]\w*");
if (matches.Count == 0)
return type;
var result = new StringBuilder(type.Length + 16);
var position = 0;