nyacc: fixed c99/CPP bug: need to skip space before lparen
This commit is contained in:
parent
7b665385c9
commit
2df0f57a30
|
@ -1,3 +1,8 @@
|
|||
2017-01-02 Matt Wette <mwette@alumni.caltech.edu>
|
||||
|
||||
* lang/c99/cppbody.scm (expand-cpp-mref): skip ws between ident
|
||||
and left paren
|
||||
|
||||
2017-01-01 Matt Wette <mwette@alumni.caltech.edu>
|
||||
|
||||
* lang/c99/body.scm (gen-c-lexer): in code mode now expands includes
|
||||
|
|
|
@ -163,9 +163,12 @@
|
|||
|
||||
(define (collect-args argd dict used)
|
||||
;;(simple-format #t "collect-args\n")
|
||||
(if (not (eqv? (read-char) #\()) (throw 'parse-error "collect-args"))
|
||||
(if (not (eqv? (skip-ws (read-char)) #\())
|
||||
(let ((fn (or (port-filename (current-input-port)) "(unknown)"))
|
||||
(ln (1+ (port-line (current-input-port)))))
|
||||
(throw 'parse-error "~A:~A: CPP expecting `('" fn ln)))
|
||||
(let iter ((argl (list (scan-cpp-input argd dict used #t))))
|
||||
(simple-format #t "args: ~S\n" argl)
|
||||
;;(simple-format #t "args: ~S\n" argl)
|
||||
(let ((ch (read-char)))
|
||||
(if (eqv? ch #\)) (reverse argl)
|
||||
(iter (cons (scan-cpp-input argd dict used #t) argl))))))
|
||||
|
|
Loading…
Reference in a new issue