def continues

bolt@1.27.0.0 · src/syntax/lex.bend:131

import bolt@1.27.0.0/src/syntax/lex.bend as Lex
import Base

131# does a char of this class continue the token the machine is inside of?
132def continues(mm: Mode, cls: Class) -> Bool:
133  match mm cls:
134    case Fresh{} c:
135      False{}
136    case InName{} CAlpha{}:
137      True{}
138    case InName{} CDigit{}:
139      True{}
140    case InName{} CDot{}:
141      True{}
142    case InNum{} CDigit{}:
143      True{}
144    case InNum{} CDot{}:
145      True{}
146    case InNum{} CAlpha{}:
147      True{}
148    case InStr{} c:
149      True{}
150    case InStrEsc{} c:
151      True{}
152    case InChar{} CNewline{}:
153      False{}
154    case InChar{} c:
155      True{}
156    case InCharEsc{} CNewline{}:
157      False{}
158    case InCharEsc{} c:
159      True{}
160    case InComment{} CNewline{}:
161      False{}
162    case InComment{} c:
163      True{}
164    case InSpace{} CSpace{}:
165      True{}
166    case InOp{} COp{}:
167      True{}
168    case InOp{} CDot{}:
169      True{}
170    case m c:
171      False{}

Uses (3)

Used by (1)