stole bits of jeremy's coffeescript lexer