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); }
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); }