29 references to Width
Microsoft.AspNetCore.Razor.Language.UnitTests (4)
Syntax\GreenNodeTests.cs (4)
935
Assert.Equal(result.Length, root.
Width
);
952
Assert.Equal(0, token.
Width
);
1038
Assert.Equal(0, root.
Width
);
1134
Assert.Equal(nonZeroTokenContent.Length, root.
Width
);
Microsoft.CodeAnalysis.Razor.Compiler (25)
Language\Legacy\CSharpCodeParser.cs (1)
1331
var keywordLength = keywordToken.
Width
+ 1 /* @ */;
Language\Syntax\ChildSyntaxList.cs (3)
152
position += greenChild.
Width
;
231
var endPosition = position + greenChild.
Width
;
318
position += greenChild.
Width
;
Language\Syntax\GreenNode.cs (8)
54
_width += node.
Width
;
111
offset += child.
Width
;
120
Debug.Assert(0 <= offset && offset <
Width
);
130
accumulatedWidth += child.
Width
;
193
if (token.
Width
== _width)
202
if (token.
Width
!= 0)
268
if (node1.
Width
!= node2.
Width
)
Language\Syntax\InternalSyntax\SyntaxList.cs (3)
387
/// <param name="offset">The target offset. Must be between 0 and <see cref="GreenNode.
Width
"/>.</param>
395
Debug.Assert(offset >= 0 && offset <
Width
);
407
offset += children[i].Value.
Width
;
Language\Syntax\SyntaxNode.cs (3)
25
public int Width => Green.
Width
;
29
public TextSpan Span => new(Position, Green.
Width
);
174
offset += greenChild.
Width
;
Language\Syntax\SyntaxNodeOrToken.cs (1)
86
internal int Width => _token?.
Width
?? _nodeOrParent?.Width ?? 0;
Language\Syntax\SyntaxToken.cs (3)
61
internal int Width => Node?.
Width
?? 0;
67
=> Node != null ? new TextSpan(Position, Node.
Width
) : default;
70
=> Node != null ? Position + Node.
Width
: 0;
Language\Syntax\SyntaxTokenList.cs (1)
116
=> Node == null ? default : TextSpan.FromBounds(Position, Position + Node.
Width
);
Language\Syntax\SyntaxTokenList.Enumerator.cs (1)
81
_position += _current.
Width
;
Language\Syntax\SyntaxTokenList.Reversed.cs (1)
80
_position -= _current.
Width
;