예제 #1
0
        private bool ParseCefTypeStructMember(List <StructMemberNode> members)
        {
            var m = new StructMemberNode();

            Mark();
            ParseSummary(m.Comments);
            var success =
                ParseType(m.MemberType) &&
                Scan(@"\w+", () => m.Name = Value) &&
                Skip(";");

            if (success)
            {
                members.Add(m);
            }
            Unmark(success);
            return(success);
        }
예제 #2
0
    public StructMember(CefStructType parent, StructCategory structCategory, Parser.StructMemberNode smd, ApiTypeBuilder api)
    {
        Debug.Assert(structCategory == StructCategory.Values);
        Debug.Assert(smd.MemberType != null);

        Name      = smd.Name;
        Comments  = smd.Comments;
        cefConfig = smd.CefConfig;

        MemberType = api.GetApiType(smd.MemberType, false);
        if (MemberType.Name == "int" && Comments != null)
        {
            foreach (var c in Comments.Lines)
            {
                if (c.Contains("true") || c.Contains("false"))
                {
                    MemberType = BooleanInteger.Convert(MemberType);
                }
            }
        }
    }