> 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.parserrulecontextextension.md).

# ParserRuleContextExtension

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

Inherits from `System.Object`

## Summary

Contains extension methods for `Antlr4.Runtime.ParserRuleContext` objects.

```csharp
public static class ParserRuleContextExtension
```

## Methods

| Name                                                                                                                                                                                 | Description                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetTextWithWhitespace(ParserRuleContext)](/3.1/api/csharp/yarn.compiler/yarn.compiler.parserrulecontextextension/yarn.compiler.parserrulecontextextension.gettextwithwhitespace.md) | Returns the original text of this `Antlr4.Runtime.ParserRuleContext` , including all whitespace, comments, and other information that the parser would otherwise not include. |
