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

# GetRange(ParserRuleContext)

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

## Summary

Gets the range covered by a `Antlr4.Runtime.ParserRuleContext` in the source code.

```csharp
public static Range GetRange(ParserRuleContext context)
```

## Parameters

| Name                                       | Description                     |
| ------------------------------------------ | ------------------------------- |
| `Antlr4.Runtime.ParserRuleContext` context | The context to get a range for. |

## Returns

The [Range](/3.1/api/csharp/yarn.compiler/yarn.compiler.range.md) covered by this context.
