make it possible to use the characters ' and ? anywhere in identifiers

closes #129
This commit is contained in:
りき萌 2025-09-01 17:17:54 +02:00
parent ce9150b588
commit b9a161d474
2 changed files with 3 additions and 3 deletions

View file

@ -57,7 +57,7 @@ fn one_or_two(l: &mut Lexer<'_>, kind1: TokenKind, c2: char, kind2: TokenKind) -
}
fn is_ident_char(c: char) -> bool {
matches!(c, 'a'..='z' | 'A'..='Z' | '0'..='9' | '_')
matches!(c, 'a'..='z' | 'A'..='Z' | '0'..='9' | '_' | '\'' | '?')
}
fn ident(l: &mut Lexer<'_>) -> TokenKind {

View file

@ -45,8 +45,8 @@ or_: \\a, b ->
else b
withDotter \\d ->
visible = mod (d Num) length < length * duty
if (visible)
visible? = mod (d Num) length < length * duty
if (visible?)
stroke thickness color (line (d From) (d To))
else
()