<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I think I got most of this, but it’s hard to completely figure out because the information is scattered across the grammar.</div><div class=""><br class=""></div><div class="">So, I’m coming up with a statement to copy over a member from one type to another:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">publish MEMBER-FROM-OTHER-TYPE</div></blockquote><div class=""><br class=""></div><div class="">and I’m trying to encapsulate this into a grammar. This requires me to figure out how to name every single declaration in a type. I got so far:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">published-member → decimal-digits</div><div class="">published-member → type-identifier</div><div class="">published-member → identifier | identifier ( argument-names_opt )</div><div class="">published-member → operator | operator (argument-names_opt )</div><div class="">published-member → init | init (argument-names_opt )</div><div class="">published-member → init ? | init ? (argument-names_opt )</div><div class="">published-member → init ! | init ! (argument-names_opt )</div><div class="">published-member → subscript | subscript ( argument-names_opt )</div></blockquote><div class=""><br class=""></div><div class="">The first line is for tuples, and the rest are for struct/enum/class. The second line covers some generics, but I don’t mention generics anywhere else. The third line covers properties and functions, while all the following lines over functions. There are two branches for those lines to cover all overloads sharing a name and to cover a specific overload.</div><div class=""><br class=""></div><div class="">Do I have to mention generic stuff in any of the lines past the second? Are there declaration kinds I’m straight-up missing? (Remember that identifier covers constants; variables; type-aliases; enumeration cases; inner structure, enumeration, class, and extensions; and operator precedence groups.)</div><div class=""><br class=""></div><div class="">— </div><div class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Daryle Walker<br class="">Mac, Internet, and Video Game Junkie<br class="">darylew AT mac DOT com </div></div>
</div>
<br class=""></body></html>