Skip to main content

Module java

Module java 

Source
Expand description

Java minifier.

Distinguishing features vs the generic C-family base:

  • Text blocks """…""" (Java 13+) — content can span multiple lines and contain unescaped ". We treat the whole literal as one StrLit, scanning until the next """ not preceded by \.
  • Annotations: @Override, @SuppressWarnings("foo"). The @ is not a comment marker — it’s part of an identifier-like token. We emit @<ident> as one Word.
  • Block comments do not nest (unlike Rust).

Strategy: aggressive (Strategy A). Java requires explicit semicolons, so newlines can be stripped freely.

Functions§

minify