Skip to content

Commit e89d5cb

Browse files
author
Kapil Borle
committed
Add method to get extent width in TokenOperations
1 parent a522aaf commit e89d5cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Engine/TokenOperations.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,11 @@ public IEnumerable<Tuple<Token, int>> GetOpenParensWithWhiteSpacesBefore()
272272
return GetTokenAndPrecedingWhitespace(TokenKind.LParen);
273273
}
274274

275+
public static int GetExtentWidth(IScriptExtent extent)
276+
{
277+
return extent.EndOffset - extent.StartOffset;
278+
}
279+
275280
private bool OnSameLine(Token token1, Token token2)
276281
{
277282
return token1.Extent.StartLineNumber == token2.Extent.EndLineNumber;

0 commit comments

Comments
 (0)