strip_line_comments

Function strip_line_comments 

Source
pub(super) fn strip_line_comments(s: &str) -> String
Expand description

Strip C++-style // … line comments from MD2 expression source.

The MD2 .milk format isn’t formally specified, but in practice authors append // notes to per-frame equations. Our .milk parser splits on \n/; and ships the trailing fragment to the evaluator, where evalexpr trips on the unbalanced / operator. Run before any other rewrite so the comment can’t contain syntax that later passes would mistakenly transform.