<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Daryle,<div class=""><br class=""></div><div class="">The easiest way to start adding new features to an existing project is by cribbing from existing features that are sufficiently similar (at least enough to get started and see what fails to compile after some changes). For example, if you wanted to implement a new and awesome loop construct, then start by copying, pasting, and renaming the implementation details for an existing loop that you like (be it “for” or “while”, etc). You’ll learn far faster this way than any other way. :-)</div><div class=""><br class=""></div><div class="">Good luck,</div><div class="">Dave</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 21, 2017, at 12:50, Daryle Walker via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I downloaded (w/ GitHub Desktop on macOS) a copy of the Swift repository. I ran the build scripts to download the other parts of LLVM, built everything, and created Xcode (9 beta 4) project files. Now how do I actually do a new feature? The number of targets in the Xcode project file is so intimidatingly huge I don’t know where to start.</div><div class=""><br class=""></div><div class="">The feature is a new kind of named type. I need to start with the AST part of the compiler, plus some test cases. The format of the new type of type is:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Monaco" class="">key-tag identifier : type-inheritance-list definition-block</font></div></blockquote><div class=""><br class=""></div><div class="">where the key tag is currently “alter” and the type inheritance list must have exactly one type in it. (So an empty list or an all-protocol list is an error.) Right now, I want a test for accepting the new type at all, rejecting a new type with an empty inheritance list, and rejecting a new type with all protocols in its list. If those last two tests would be part of the semantic phase, I’ll hold off on those until the AST phase is done.</div><div class=""><br class=""></div><div class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">— </div><div class="">Daryle Walker<br class="">Mac, Internet, and Video Game Junkie<br class="">darylew AT mac DOT com </div></div>
</div>
<br class=""></div>_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-dev<br class=""></div></blockquote></div><br class=""></div></body></html>