> 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/yarn.compiler.utility/yarn.compiler.utility.parsesourcetext.md).

# ParseSourceText(string,string)

Method in [Utility](/3.1/api/csharp/yarn.compiler/yarn.compiler.utility.md)

## Summary

Parses a string of Yarn source code, and produces a [FileParseResult](/3.1/api/csharp/yarn.compiler/yarn.compiler.fileparseresult.md) .

```csharp
public static FileParseResult ParseSourceText(string source, string sourceName = "<input>")
```

## Parameters

| Name                | Description               |
| ------------------- | ------------------------- |
| `string` source     | The source code to parse. |
| `string` sourceName | The name of the source.   |

## Returns

A [FileParseResult](/3.1/api/csharp/yarn.compiler/yarn.compiler.fileparseresult.md) representing the result of parsing the source.
