def Glyph.of
bend-lint-rules@0.2.0.0 · lib/linter/directives.bend:48
import bend-lint-rules@0.2.0.0/lib/linter/directives.bend as Directives
import Base
48def Glyph.of(+c: Char) -> Glyph:
49 Bool.pick(
50 Glyph,
51 Char.is_eq(c, '\n'),
52 LineEnd{},
53 Bool.pick(
54 Glyph,
55 Char.is_eq(c, '#'),
56 Hash{},
57 Bool.pick(
58 Glyph,
59 Char.is_eq(c, '"'),
60 DoubleQuote{},
61 Bool.pick(
62 Glyph,
63 Char.is_eq(c, '\''),
64 SingleQuote{},
65 Bool.pick(
66 Glyph,
67 Char.is_eq(c, '\\'),
68 Backslash{},
69 Bool.pick(
70 Glyph,
71 Char.is_eq(c, '\r'),
72 CarriageReturn{},
73 Bool.pick(Glyph, Char.is_eq(c, ' ') || Char.is_eq(c, '\t'), Blank{}, Other{})
74 )
75 )
76 )
77 )
78 )
79 )