CM6 equivalent for extractLlineClasses functionality

I’m trying to apply additional CSS classes to a .cm-line from within a legacy mode StreamParser. In CodeMirror 5, we accomplished this by prefixing the returning token name with line, such as line-foobar. Then extractLineClasses at highlight.js#L193 would automatically apply foobar to the whole line. I’m looking for similar functionality in CodeMirror 6.

I’m aware of line decorations, however in my case I don’t have access to the view. All the styles are applied in the StreamParser tokenizer, contained in a separate file that exports a LanguageSupport instance. This is separate from the code that creates the EditorView, etc.

Is it possible to style entire lines from within the stream parser, or could the extractLineClasses feature in CM5 be added to CM6?

Thank you!

You cannot style lines from language modes anymore. But it would be possible to write an extension that looks for certain patterns in the syntax tree and derives a set of line decorations from that.