mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +02:00
peg: remove get-code debugging foo
* module/ice-9/peg.scm (define-nonterm): Don't stash the code in a symbol property. (get-code): Remove.
This commit is contained in:
parent
a907bce657
commit
49db248111
1 changed files with 1 additions and 14 deletions
|
@ -25,7 +25,6 @@
|
|||
define-nonterm
|
||||
define-nonterm-f
|
||||
peg-match
|
||||
get-code
|
||||
define-grammar
|
||||
define-grammar-f
|
||||
peg:start
|
||||
|
@ -384,19 +383,7 @@
|
|||
(#,syn str strlen at)))
|
||||
(vector-set! #,c (modulo at *cache-size*)
|
||||
(list str at fres))
|
||||
fres))))
|
||||
|
||||
;; Store the code in case people want to debug.
|
||||
(set-symbol-property!
|
||||
'sym 'code #,(datum->syntax x (list 'quote (syntax->datum syn))))
|
||||
sym)))))))
|
||||
|
||||
;; Gets the code corresponding to NONTERM
|
||||
(define-syntax get-code
|
||||
(lambda (x)
|
||||
(syntax-case x ()
|
||||
((_ nonterm)
|
||||
#`(pretty-print (symbol-property 'nonterm 'code))))))
|
||||
fres)))))))))))
|
||||
|
||||
;; Parses STRING using NONTERM
|
||||
(define (peg-parse nonterm string)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue