parse division vs regexps properly

* module/language/ecmascript/tokenize.scm (make-tokenizer/1): Whoops, fix
  the cases in which we detect that division is valid.
This commit is contained in:
Andy Wingo 2009-02-22 17:37:59 +01:00
commit 68776b1d94

View file

@ -456,7 +456,10 @@
(syntax-error "unexpected right brace" stack)))
((semicolon)
(set! eoi? (null? stack))))
(set! div? (and (pair? tok) (eq? (car tok) 'identifier)))
(set! div? (and (pair? tok)
(or (eq? (car tok) 'Identifier)
(eq? (car tok) 'NumericLiteral)
(eq? (car tok) 'StringLiteral))))
tok)))))
(define (tokenize port)