renderIdentifierComma
Render an identifier, and the comma that follows it, if it is present in the source.
If a comma is present, and space is Space.comma, render only a single comma.
Function parameters
Parameters
- r:*Render
- token:Ast.TokenIndex
Type definitions in this namespace
Types
Functions in this namespace
Functions
Error sets in this namespace
Error Sets
Source
Implementation
fn renderIdentifierComma(r: *Render, token: Ast.TokenIndex, space: Space, quote: QuoteBehavior) Error!void {
const tree = r.tree;
const maybe_comma = token + 1;
if (tree.tokenTag(maybe_comma) == .comma and space != .comma) {
try renderIdentifier(r, token, .none, quote);
return renderToken(r, maybe_comma, space);
} else {
return renderIdentifier(r, token, space, quote);
}
}