Lex.classify.go: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/syntax/lex.bend as Lex Lines 99-123 of bolt@1.27.0.0/src/syntax/lex.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&start_line=99&end_line=123 import Base # the class of a code point, given the class any other character would get. # Written as comparisons rather than as `case '.':` arms: a character literal # in a pattern is a U32 literal inside a constructor pattern, and bend's C # backend pays about 90 MB for each one -- these eighteen cost 1.57 GB as # literal arms and 0.10 GB written this way. def classify.go(+xx: U32, other: Class) -> Class: Bool.pick(Class, U32.is_eq(xx, 46), CDot{}, # '.' Bool.pick(Class, U32.is_eq(xx, 34), CQuote{}, # '"' Bool.pick(Class, U32.is_eq(xx, 39), CTick{}, # '\'' Bool.pick(Class, U32.is_eq(xx, 92), CBack{}, # '\\' Bool.pick(Class, U32.is_eq(xx, 35), CHash{}, # '#' Bool.pick(Class, U32.is_eq(xx, 32), CSpace{}, # ' ' Bool.pick(Class, U32.is_eq(xx, 9), CSpace{}, # '\t' Bool.pick(Class, U32.is_eq(xx, 13), CSpace{}, # '\r' Bool.pick(Class, U32.is_eq(xx, 10), CNewline{}, # '\n' Bool.pick(Class, U32.is_eq(xx, 58), CColon{}, # ':' Bool.pick(Class, U32.is_eq(xx, 44), CComma{}, # ',' Bool.pick(Class, U32.is_eq(xx, 40), COpen{}, # '(' Bool.pick(Class, U32.is_eq(xx, 91), COpen{}, # '[' Bool.pick(Class, U32.is_eq(xx, 123), COpen{}, # '{' Bool.pick(Class, U32.is_eq(xx, 41), CClose{}, # ')' Bool.pick(Class, U32.is_eq(xx, 93), CClose{}, # ']' Bool.pick(Class, U32.is_eq(xx, 125), CClose{}, # '}' Bool.pick(Class, U32.is_eq(xx, 95), CAlpha{}, # '_' other)))))))))))))))))) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Class