mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-01 23:30:28 +02:00
lua/lexer tweaks
* module/language/lua/lexer.scm: Some tweaks and reindentations. Remove the define/init lexer interface; I don't like separating declaration and initialization. * module/language/lua/parser.scm: * test-suite/tests/lua-lexer.test: Adapt to lexer interface change.
This commit is contained in:
parent
d87639dfe4
commit
04175c7dda
3 changed files with 72 additions and 81 deletions
|
@ -25,14 +25,11 @@
|
|||
|
||||
(with-test-prefix "lua-lexer"
|
||||
(define (from-string string)
|
||||
(define-lua-lexer get-source-info lex)
|
||||
(call-with-input-string
|
||||
string
|
||||
(lambda (port)
|
||||
|
||||
(initialize-lua-lexer! port get-source-info lex)
|
||||
(lex))))
|
||||
|
||||
(call-with-values (lambda ()
|
||||
(call-with-input-string string make-lexer))
|
||||
(lambda (get-source-info lex)
|
||||
(lex))))
|
||||
|
||||
(let-syntax
|
||||
((test
|
||||
(syntax-rules (eof)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue