Akuli / jou

Yet another programming language
MIT License
11 stars 4 forks source link

types.jou? #376

Closed littlewhitecloud closed 1 year ago

littlewhitecloud commented 1 year ago

I found a "TODO" in ast.jou

# TODO: move to stdlib
declare isprint(b: int) -> int

I have created a pr(#227), but it failed, beacause it doesn't return anything...

# Check if character is alphanumeric
declare isalnum(c: bytes) -> bool
# Check if character is alphabetic
declare isalpha(c: bytes) -> bool
# Check if character is a control character
declare iscntrl(c: bytes) -> bool
# Check if character is decimal digit
declare isdigit(c: int) -> bool
# Check if character has graphical representation
declare isgraph(c: bytes) -> bool
# Check if character is lowercase letter
declare islower(c: bytes) -> bool
# Check if character is printable 
declare isprint(c: bytes) -> bool
# Check if character is a punctuation character
declare ispunct(c: bytes) -> bool
# Check if character is a white-space
declare isspace(c: bytes) -> bool
# Check if character is uppercase letter
declare isupper(c: bytes) -> bool
# Check if character is hexadecimal digit
declare isxdigit(c: int) -> bool
# Convert uppercase letter to lowercase
declare tolower(c: bytes) -> bytes
# Convert lowercase letter to uppercase
declare toupper(c: bytes) -> bytes