Returns a viewport-first tokenizer for text_area(). It highlights common
R keywords, strings, comments, numeric constants, operators, and function
names. It uses tolerant regular expressions and accepts incomplete syntax.
Each line produces grapheme-indexed spans with start, end, and token.
Value
A function (lines, state = NULL) suitable for text_area().