blob: f6fa3da90b89f4e8528aae6d80ae1f5a58f81082 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
(define-module (c operators))
;;; Simple operators are those which can be combined with '='
(define simple-operators
`(+ - * / & ,(symbol #\|) ^ << >> % < > =))
;; apparently part of C
(define-public wordy-binary-operators
'(bitand and_eq and bitor or_eq or xor_eq xor))
(define-public symbol-binary-operators
(append (map (lambda (x) (symbol-append x '=)) simple-operators)
`(&& ,(symbol #\| #\|) != ,(symbol #\,)
-> ,(symbol #\.))
simple-operators))
(define-public binary-operators
(append symbol-binary-operators
wordy-binary-operators))
|