summaryrefslogtreecommitdiff
path: root/nasmlib
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-11-28 15:01:40 -0800
committerH. Peter Anvin <hpa@zytor.com>2018-11-28 15:01:40 -0800
commit53e2e4c0991e768c42cca9a8c9c9ddd134ddde6f (patch)
treeb7ca886e01e963f025e6db6bce8519cb908a439a /nasmlib
parent1350620bf1dc474b39ca05eb9ba23813a90042b5 (diff)
downloadnasm-53e2e4c0991e768c42cca9a8c9c9ddd134ddde6f.tar.gz
nctype: add nasm_isquote()
Add nasm_isquote() to test for a NASM quoted string. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'nasmlib')
-rw-r--r--nasmlib/nctype.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/nasmlib/nctype.c b/nasmlib/nctype.c
index 657e4e74..b04f9d19 100644
--- a/nasmlib/nctype.c
+++ b/nasmlib/nctype.c
@@ -96,13 +96,16 @@ static void ctype_tab_init(void)
nasm_ctype_tab[i] = ct;
}
- nasm_ctype_tab['-'] |= NCT_MINUS;
- nasm_ctype_tab['$'] |= NCT_DOLLAR|NCT_ID;
- nasm_ctype_tab['_'] |= NCT_UNDER|NCT_ID|NCT_IDSTART;
- nasm_ctype_tab['.'] |= NCT_ID|NCT_IDSTART;
- nasm_ctype_tab['@'] |= NCT_ID|NCT_IDSTART;
- nasm_ctype_tab['#'] |= NCT_ID;
- nasm_ctype_tab['~'] |= NCT_ID;
+ nasm_ctype_tab['-'] |= NCT_MINUS;
+ nasm_ctype_tab['$'] |= NCT_DOLLAR|NCT_ID;
+ nasm_ctype_tab['_'] |= NCT_UNDER|NCT_ID|NCT_IDSTART;
+ nasm_ctype_tab['.'] |= NCT_ID|NCT_IDSTART;
+ nasm_ctype_tab['@'] |= NCT_ID|NCT_IDSTART;
+ nasm_ctype_tab['#'] |= NCT_ID;
+ nasm_ctype_tab['~'] |= NCT_ID;
+ nasm_ctype_tab['\''] |= NCT_QUOTE;
+ nasm_ctype_tab['\"'] |= NCT_QUOTE;
+ nasm_ctype_tab['`'] |= NCT_QUOTE;
}
void nasm_ctype_init(void)