> 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/yarn.compiler.parserrulecontextextension.gettextwithwhitespace.md).

# GetTextWithWhitespace(ParserRuleContext)

Method in [ParserRuleContextExtension](/3.1/api/csharp/yarn.compiler/yarn.compiler.parserrulecontextextension.md)

## Summary

Returns the original text of this `Antlr4.Runtime.ParserRuleContext` , including all whitespace, comments, and other information that the parser would otherwise not include.

```csharp
public static string GetTextWithWhitespace(this ParserRuleContext context)
```

## Parameters

| Name                                       | Description |
| ------------------------------------------ | ----------- |
| `Antlr4.Runtime.ParserRuleContext` context |             |

## Returns

The original text of this expression.
