haskell / alex

A lexical analyser generator for Haskell
https://hackage.haskell.org/package/alex
BSD 3-Clause "New" or "Revised" License
298 stars 82 forks source link

alex: fix generated type for 'alex_accept' #99

Closed trofi closed 8 years ago

trofi commented 8 years ago

The change fixes lexer generation failure for GHC lexer. GHC lexer is special because it calls alexScanUser to thread lexer state.

Added minimal test tokens_scan_user.x to cover alexScanUser use.

Signature was reintroduced in commit 00431304aa18ada0a12aab43443023a86521f353 accidentally.

Fixes https://github.com/simonmar/alex/issues/98

Signed-off-by: Sergei Trofimovich siarheit@google.com

erikd commented 8 years ago

LGTM! :+1:

@simonmar This fix and mine from last week suggest we need a 3.2.1 release.

simonmar commented 8 years ago

Thankyou!