Exemplo n.º 1
0
        bool ParseNetErrorValue(List <EnumValueNode> members)
        {
            var member = new EnumValueNode();

            Mark();
            ParseCommentBlock(member.Comments);
            var success = Scan(@"NET_ERROR\((\w+),\s*([0-9-]+)\)", () => {
                member.Name  = Match.Groups[1].Value;
                member.Value = Match.Groups[2].Value;
            });

            if (success)
            {
                members.Add(member);
            }
            Unmark(success);
            return(success);
        }
Exemplo n.º 2
0
        private bool ParseCefEnumValue(List <EnumValueNode> members)
        {
            var member = new EnumValueNode();

            Mark();
            ParseSummary(member.Comments);
            var success = Scan(@"\w+", () => member.Name = Value);

            if (success)
            {
                if (Skip("="))
                {
                    Ensure(Scan("[^,}\n/]+", () => member.Value = Value.Trim()));
                }
                members.Add(member);
            }
            Skip(",");
            Unmark(success);
            return(success);
        }