> 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/3.1/api/csharp/yarn.compiler.md).

# Yarn.Compiler Namespace

## Summary

Contains classes for compiling Yarn code.

## Classes

| Name                                                                                                    | Description                                                                                                                |
| ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [CompilationResult](/3.1/api/csharp/yarn.compiler/yarn.compiler.compilationresult.md)                   | The result of a compilation.                                                                                               |
| [Compiler](/3.1/api/csharp/yarn.compiler/yarn.compiler.compiler.md)                                     | Compiles Yarn code.                                                                                                        |
| [Declaration](/3.1/api/csharp/yarn.compiler/yarn.compiler.declaration.md)                               | Represents a variable declaration                                                                                          |
| [DeclarationBuilder](/3.1/api/csharp/yarn.compiler/yarn.compiler.declarationbuilder.md)                 | Provides methods for constructing [Declaration](/3.1/api/csharp/yarn.compiler/yarn.compiler.declaration.md) objects.       |
| [Diagnostic](/3.1/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](/3.1/api/csharp/yarn.compiler/yarn.compiler.enumtypebuilder.md)                       | Provides methods for constructing [EnumType](/3.1/api/csharp/yarn/yarn.enumtype.md) objects.                               |
| [FunctionTypeBuilder](/3.1/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder.md)               | Provides methods for constructing [FunctionType](/3.1/api/csharp/yarn/yarn.functiontype.md) objects.                       |
| [IndentAwareLexer](/3.1/api/csharp/yarn.compiler/yarn.compiler.indentawarelexer.md)                     | A Lexer subclass that detects newlines and generates indent and dedent tokens accordingly.                                 |
| [NodeDebugInfo](/3.1/api/csharp/yarn.compiler/yarn.compiler.nodedebuginfo.md)                           | Contains debug information for a node in a Yarn file.                                                                      |
| [ParserRuleContextExtension](/3.1/api/csharp/yarn.compiler/yarn.compiler.parserrulecontextextension.md) | Contains extension methods for `Antlr4.Runtime.ParserRuleContext` objects.                                                 |
| [Position](/3.1/api/csharp/yarn.compiler/yarn.compiler.position.md)                                     | Represents a position in a multi-line string.                                                                              |
| [Project](/3.1/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](/3.1/api/csharp/yarn.compiler/yarn.compiler.projectdebuginfo.md)                     | Contains debugging information for compiled Yarn Projects.                                                                 |
| [Range](/3.1/api/csharp/yarn.compiler/yarn.compiler.range.md)                                           | Represents a range of text in a multi-line string.                                                                         |
| [Utility](/3.1/api/csharp/yarn.compiler/yarn.compiler.utility.md)                                       | Utility methods for working with line tags.                                                                                |

## Interfaces

| Name                                                                        | Description                               |
| --------------------------------------------------------------------------- | ----------------------------------------- |
| [ISourceInput](/3.1/api/csharp/yarn.compiler/yarn.compiler.isourceinput.md) | An input into a Yarn Spinner compilation. |

## Namespaces

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

## Structs

| Name                                                                              | Description                                                                                    |
| --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [CompilationJob](/3.1/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](/3.1/api/csharp/yarn.compiler/yarn.compiler.fileparseresult.md) | Contains the result of parsing a single file of source code.                                   |
| [StringInfo](/3.1/api/csharp/yarn.compiler/yarn.compiler.stringinfo.md)           | Information about a string. Stored inside a string table, which is produced from the Compiler. |
