Skip to content

Instantly share code, notes, and snippets.

View vguerra's full-sized avatar
💭
🏂

Victor Guerra vguerra

💭
🏂
View GitHub Profile
@HassanElDesouky
HassanElDesouky / ContributionStarterGuide.md
Last active March 24, 2020 11:18
Swift compiler contribution starter guide

Contribution Starter Guide

Introduction

This guide aims to help you start your first PR on Swift! The guide contains links for blogs and talks that are ralated on how to start contribution to Swift.

Compiler Pipeline

It's very important that we understand the general pipeline of the compiler. This is useful to understand where new changes or where to fix things should go. In each section, I'll show you an example of what the process is doing, and at the end of each section I'll give you an error that happens in that stage.

Lexer

import Cocoa
enum CoroutineState {
case Fresh, Running, Blocked, Canceled, Done
}
struct CoroutineCancellation: ErrorType {}
class CoroutineImpl<InputType, YieldType> {
let body: (yield: YieldType throws -> InputType) throws -> Void