Tree-native byte processing

This commit is contained in:
2026-05-06 18:53:17 -05:00
parent 1c4c49e68d
commit 89bb73ed99
3 changed files with 256 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ identifierWithHash = do
rest <- many $ letterChar
<|> digitChar <|> char '_' <|> char '-' <|> char '?'
<|> char '$' <|> char '@' <|> char '%'
<|> char '\''
_ <- char '#' -- Consume '#'
hashString <- some (alphaNumChar <|> char '-') -- Ensures at least one char for hash
<?> "hash characters (alphanumeric or hyphen)"
@@ -83,6 +84,7 @@ identifier = do
rest <- many $ letterChar
<|> digitChar <|> char '_' <|> char '-' <|> char '?'
<|> char '$' <|> char '@' <|> char '%'
<|> char '\''
let name = first : rest
if name == "t" || name == "!result"
then fail "Keywords (`t`, `!result`) cannot be used as an identifier"