aboutsummaryrefslogtreecommitdiff
path: root/module/c/cpp-types.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-07-13 11:35:39 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-07-13 11:35:39 +0200
commit7b78cf68200118fac395592da3d78b22b4be0cd7 (patch)
tree9cd8411147b6732a7288e4ba40ade220658d73c3 /module/c/cpp-types.scm
parentEnsure #error works. (diff)
downloadcalp-7b78cf68200118fac395592da3d78b22b4be0cd7.tar.gz
calp-7b78cf68200118fac395592da3d78b22b4be0cd7.tar.xz
Add support for "other" in preprocessing-tokens.
Diffstat (limited to 'module/c/cpp-types.scm')
-rw-r--r--module/c/cpp-types.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/module/c/cpp-types.scm b/module/c/cpp-types.scm
index 1df70594..82ebb922 100644
--- a/module/c/cpp-types.scm
+++ b/module/c/cpp-types.scm
@@ -5,8 +5,9 @@
:export (whitespace-token?
comment-token?
preprocessing-token?
- newline-token?
+ other-token?
placemaker-token?
+ newline-token?
identifier-token?
punctuator-token?
number-token?
@@ -27,6 +28,10 @@
(and (lexeme? x)
(eq? 'preprocessing-token (lexeme-type x))))
+(define (other-token? x)
+ (and (lexeme? x)
+ (eq? 'other (lexeme-type x))))
+
(define (placemaker-token? x)
(and (lexeme? x)
(eq? 'placemaker (lexeme-type x))))