def is_not_line_end
import bend-lint-rules@0.2.0.0/layout/format.bend as Formatimport Base
317# Lexer
318# -----
319#
320# A branch that uses a string or a character its match took apart gets it
321# rebuilt: a string as character + rest, a rope that the next read copies
322# whole, and a character bit by bit. So a def that needs the whole value in
323# a branch takes it twice, as keep, and matches the other copy.
324def is_not_line_end(s: String) -> Bool:
325 match s:
326 case SNil{}:
327 False{}
328 case SCon{'\n', rest}:
329 False{}
330 case SCon{'\r', rest}:
331 False{}
332 case _:
333 True{}