alignment_ensure_trailing_comma: Ensure last pd has a trailing comma

View source: R/detect-alignment-utils.R

alignment_ensure_trailing_commaR Documentation

Ensure last pd has a trailing comma

Description

Must be after alignment_ensure_no_closing_brace() because if it comes after alignment_ensure_trailing_comma(), the last expression would not be a brace, which would make removal complicated.

Usage

alignment_ensure_trailing_comma(pd_by_line)

Arguments

pd_by_line

A list, each element corresponding to a potentially incomplete parse table that represents all token from one line.


styler documentation built on Aug. 29, 2023, 5:10 p.m.