diff --git a/generator/README.md b/generator/README.md index 14f84dd..9392307 100644 --- a/generator/README.md +++ b/generator/README.md @@ -1,6 +1,6 @@ # generator -# Responsibilities +## Responsibilities Given a compilation target, turn a well-formed FSPL semantic tree into an LLVM IR module tree. @@ -8,9 +8,9 @@ IR module tree. ## Organization Generator defines the Target type, which contains information about the system -that the program is being compiled for. The [native sub-package](native) uses -Go's conditional compilation directives to provide a default Target that matches -the system the compiler has been natively built for. +that the program is being compiled for. The native sub-package uses Go's +conditional compilation directives to provide a default Target that matches the +system the compiler has been natively built for. The entry point for all logic defined in this package is Target.Generate(). This method creates a new generator, and uses it to recursively generate and return an @@ -18,9 +18,9 @@ LLVM module. The details of the generator are hidden from other packages, and instances of it only last for the duration of Target.Generate(). The generator contains a stack of blockManagers, which plays a similar role to -[analyzer](../analyzer).scopeContextManager, except that the stack of -blockManagers is managed directly by the generator, which contains appropriate -methods for pushing/popping them. +analyzer.scopeContextManager, except that the stack of blockManagers is managed +directly by the generator, which contains appropriate methods for +pushing/popping them. Like the analyzer, the generator greedily generates code, and one function may be generated in the middle of the generation process of another function. Thus, @@ -83,4 +83,4 @@ expression. If it is specifically requested to generate a value for an expression with only its location component defined or vice versa, generator.generateVal/Loc() will -automatically do the conversion. +automatically perform the conversion.