make it possible to use the characters ' and ? anywhere in identifiers
closes #129
This commit is contained in:
		
							parent
							
								
									ce9150b588
								
							
						
					
					
						commit
						b9a161d474
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -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 {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
    ()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue