summaryrefslogtreecommitdiff
path: root/compiler/parser/Parser.y
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2020-01-02 15:13:03 +0300
committerVladislav Zavialov <vlad.z.4096@gmail.com>2020-01-02 23:05:24 +0300
commit94e45f585038c291a013295aa3298d6cf6d62dfb (patch)
tree4322ed266ab7d773ce28dc5b238f10540a75ca06 /compiler/parser/Parser.y
parentb84c09d533faf576c406ce9f7163efecf3037787 (diff)
downloadhaskell-94e45f585038c291a013295aa3298d6cf6d62dfb.tar.gz
Add lexerDbg to dump the tokens fed to the parserwip/lexer-dbg
This a small utility function that comes in handy when debugging the lexer and the parser.
Diffstat (limited to 'compiler/parser/Parser.y')
-rw-r--r--compiler/parser/Parser.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index ce4d277f6b..c96cd92f5a 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -618,6 +618,8 @@ TH_QQUASIQUOTE { L _ (ITqQuasiQuote _) }
%monad { P } { >>= } { return }
%lexer { (lexer True) } { L _ ITeof }
+ -- Replace 'lexer' above with 'lexerDbg'
+ -- to dump the tokens fed to the parser.
%tokentype { (Located Token) }
-- Exported parsers