internal SyntaxNodeOrToken(SyntaxNode parent, InternalSyntax.GreenNode token, int position, int index) { _position = position; _tokenIndex = index; _nodeOrParent = parent; _token = token; }
internal SyntaxToken(SyntaxNode parent, InternalSyntax.GreenNode token, int position, int index) { Parent = parent; Node = token; Position = position; Index = index; }
internal static int CountNodes(InternalSyntax.GreenNode green) { var n = 0; var s = green.SlotCount; for (int i = 0; i < s; i++) { var child = green.GetSlot(i); if (child != null) { if (!child.IsList) { n++; } else { n += child.SlotCount; } } } return(n); }
internal SyntaxNode(InternalSyntax.GreenNode internalNode, RedNode parent, int position) : base(internalNode, parent, position) { }
internal RedNode(InternalSyntax.GreenNode greenNode, RedNode parent, int position) { GreenNode = greenNode; _parent = parent; Position = position; }
private static int Occupancy(InternalSyntax.GreenNode green) { return(green.IsList ? green.SlotCount : 1); }