GYB documentation

Where can I find the documentation for GYB? Literally every file in the standard library goes through it but it doesn’t seem like anyone has actually written down its syntax anywhere

1 Like

Most of it is all python syntax, if not all of it. Lines starting with % are an indicator of a gyb statement. Python relies on indentation to scope, so gyb uses a keyword end to indicate the end of an if statement, a for loop, etc. Other than that, it’s pretty much python from what I’ve used.


The ./swift/utils/gyb --help command will output a summary.