> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/api/csharp/yarn.compiler.md).

# Yarn.Compiler Namespace

## Summary

Contains classes for compiling Yarn code.

## Classes

| Name                                                                                  | Description                                                                                                                |
| ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [CompilationResult](/api/csharp/yarn.compiler/yarn.compiler.compilationresult.md)     | The result of a compilation.                                                                                               |
| [Compiler](/api/csharp/yarn.compiler/yarn.compiler.compiler.md)                       | Compiles Yarn code.                                                                                                        |
| [Declaration](/api/csharp/yarn.compiler/yarn.compiler.declaration.md)                 | Represents a variable declaration                                                                                          |
| [DeclarationBuilder](/api/csharp/yarn.compiler/yarn.compiler.declarationbuilder.md)   | Provides methods for constructing [Declaration](/api/csharp/yarn.compiler/yarn.compiler.declaration.md) objects.           |
| [Diagnostic](/api/csharp/yarn.compiler/yarn.compiler.diagnostic.md)                   | A diagnostic message that describes an error, warning or informational message that the user can take action on.           |
| [EnumTypeBuilder](/api/csharp/yarn.compiler/yarn.compiler.enumtypebuilder.md)         | Provides methods for constructing [EnumType](/api/csharp/yarn/yarn.enumtype.md) objects.                                   |
| [FunctionTypeBuilder](/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder.md) | Provides methods for constructing [FunctionType](/api/csharp/yarn/yarn.functiontype.md) objects.                           |
| [IndentAwareLexer](/api/csharp/yarn.compiler/yarn.compiler.indentawarelexer.md)       | A Lexer subclass that detects newlines and generates indent and dedent tokens accordingly.                                 |
| [NodeDebugInfo](/api/csharp/yarn.compiler/yarn.compiler.nodedebuginfo.md)             | Contains debug information for a node in a Yarn file.                                                                      |
| [Position](/api/csharp/yarn.compiler/yarn.compiler.position.md)                       | Represents a position in a multi-line string.                                                                              |
| [Project](/api/csharp/yarn.compiler/yarn.compiler.project.md)                         | Yarn Projects represent instructions on where to find Yarn scripts and associated assets, and how they should be compiled. |
| [ProjectDebugInfo](/api/csharp/yarn.compiler/yarn.compiler.projectdebuginfo.md)       | Contains debugging information for compiled Yarn Projects.                                                                 |
| [Range](/api/csharp/yarn.compiler/yarn.compiler.range.md)                             | Represents a range of text in a multi-line string.                                                                         |
| [Utility](/api/csharp/yarn.compiler/yarn.compiler.utility.md)                         | Utility methods for working with line tags.                                                                                |

## Namespaces

| Name                                                            | Description                                                                       |
| --------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [Yarn.Compiler.Upgrader](/api/csharp/yarn.compiler.upgrader.md) | Contains classes for upgrading Yarn code to more recent versions of the language. |

## Structs

| Name                                                                          | Description                                                                                    |
| ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [CompilationJob](/api/csharp/yarn.compiler/yarn.compiler.compilationjob.md)   | An object that contains Yarn source code to compile, and instructions on how to compile it.    |
| [FileParseResult](/api/csharp/yarn.compiler/yarn.compiler.fileparseresult.md) | Contains the result of parsing a single file of source code.                                   |
| [StringInfo](/api/csharp/yarn.compiler/yarn.compiler.stringinfo.md)           | Information about a string. Stored inside a string table, which is produced from the Compiler. |
