INNER CODE UNIT · C#

IsSelectedField

axmolengine/axmol · tools/bindings-generator/src/BindingGenerator.cs:1035

    private static bool IsSelectedField(string className, string fieldName, GenerationRequest request) =>
        request.FieldRules.Any(rule =>
            (rule.ClassPattern == "*" || MatchesConfiguredPattern(className, rule.ClassPattern)) &&
            rule.FieldPatterns.Any(pattern => MatchesConfiguredPattern(fieldName, pattern)));

    private static bool IsSupportedSignature(CXCursor cursor, CursorTree tree)
    {
        var context = GetQualifiedName(clang.getCursorSemanticParent(cursor));
        var types = GetParameters(cursor, tree)
            .Select(x => ExpandCallableAliases(x.Type.Spelling.CString, tree))
            .Append(cursor.Kind == CXCursorKind.CXCursor_Constructor
                ? string.Empty
                : ExpandCallableAliases(cursor.ResultType.Spelling.CString, tree));
        return types.All(type =>
            // A variadic C ABI parameter has no meaningful Lua equivalent;
            // emitting it produces a method that compiles but can never be
            // called safely from Lua (for example MenuItemToggle's va_list
            // overload).

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…