Skip to content
Browse files

allow passing a tokenizer stream (function) to parse-js

(courtesy of Mihai Bazon)
  • Loading branch information...
1 parent 5483bf5 commit 5fbfeee82281895ff05d74301d6ad7e79db61e30 @marijnh committed Feb 11, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/parse.lisp
View
2 src/parse.lisp
@@ -31,7 +31,7 @@
(parse-js* input strict-semicolons))))
(defun/defs parse-js* (stream &optional strict-semicolons)
- (def input (lex-js stream))
+ (def input (if (functionp stream) stream (lex-js stream)))
(def token (funcall input))
(def peeked nil)

0 comments on commit 5fbfeee

Please sign in to comment.
Something went wrong with that request. Please try again.