def begin.mode
import bolt@1.27.0.0/src/syntax/lex.bend as Leximport Base
191# the mode and the kind of the token a char starts
192def begin.mode(cls: Class) -> Mode:
193 match cls:
194 case CAlpha{}:
195 InName{}
196 case CDigit{}:
197 InNum{}
198 case CQuote{}:
199 InStr{}
200 case CTick{}:
201 InChar{}
202 case CHash{}:
203 InComment{}
204 case CSpace{}:
205 InSpace{}
206 case COp{}:
207 InOp{}
208 case CDot{}:
209 InOp{}
210 case CBack{}:
211 InOp{}
212 case other:
213 Fresh{}