commit 33929b8e4cfb11cf9a2b8df13d5b3064b7a2a50b
parent d13bddd9366eabb8e0b89a48626fee298457fc62
Author: ssnf <ssnf@ssnf.xyz>
Date: Wed, 27 Aug 2025 09:49:39 +0000
isword
Diffstat:
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/sim.c b/sim.c
@@ -623,17 +623,7 @@ input(String* s, uint line, char* prefix)
static int
isword(uchar c)
{
- switch (c) {
- case ' ': case '\t': case '\n': case '.':
- case '(': case ')': case '{': case '}':
- case '[': case ']': case ':': case ';':
- case ',': case '<': case '>': case '#':
- case '*': case '+': case '-': case '!':
- case '%': case '\\': case '/': case '"':
- case '=':
- return 0;
- }
- return 1;
+ return strchr(" \t\n.(){}[]:;,<>#*+-!%\\/\"=", c) == NULL;
}
static void