Skip to main content

java_style_list

Function java_style_list 

Source
pub fn java_style_list<T: Display>(items: &[T]) -> String
Expand description

Formats a slice the way Java’s List.toString does: [a, b, c].

ANTLR’s runtime-testsuite descriptors byte-compare output produced by Java’s list rendering (getRuleInvocationStack(), token-getter lists). Rust’s Vec Debug quotes elements, so — like Go’s antlr.PrintArrayJavaStyle and Python’s str_list — the Rust target exposes a dedicated formatter for generated test actions.