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

# Utility

Class in [Yarn.Compiler](/2.5/api/csharp/yarn.compiler.md)

Inherits from `System.Object`

## Summary

Utility methods for working with line tags.

```csharp
public static class Utility
```

## Methods

| Name                                                                                                                                                                                                                                       | Description                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
| [AddTagsToLines(string,ICollection)](/2.5/api/csharp/yarn.compiler/yarn.compiler.utility/yarn.compiler.utility.addtagstolines.md)                                                                                                          | Given Yarn source code, adds line tags to the ends of all lines that need one and do not already have one.                        |
| [DetermineNodeConnections(string\[\])](/2.5/api/csharp/yarn.compiler/yarn.compiler.utility/yarn.compiler.utility.determinenodeconnections.md)                                                                                              | Finds and collates every jump in every node.                                                                                      |
| [ExtractStringBlocks(IEnumerable)](/2.5/api/csharp/yarn.compiler/yarn.compiler.utility/yarn.compiler.utility.extractstringblocks.md)                                                                                                       |                                                                                                                                   |
| [GenerateYarnFileWithDeclarations(IEnumerable\<Yarn.Compiler.Declaration>,string,IEnumerable,IDictionary\<string, string>)](/2.5/api/csharp/yarn.compiler/yarn.compiler.utility/yarn.compiler.utility.generateyarnfilewithdeclarations.md) | Generates a Yarn script that contains a node that declares variables.                                                             |
| [ParseSource(string)](/2.5/api/csharp/yarn.compiler/yarn.compiler.utility/yarn.compiler.utility.parsesource.md)                                                                                                                            | Parses a string of Yarn source code, and produces a FileParseResult and (if there were any problems) a collection of diagnostics. |
| [TagLines(string,ICollection)](/2.5/api/csharp/yarn.compiler/yarn.compiler.utility/yarn.compiler.utility.taglines.md)                                                                                                                      | Given Yarn source code, adds line tags to the ends of all lines that need one and do not already have one.                        |
