From 847d3977929216f2484ed6ae33112b74fc86776a Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 6 Jul 2010 17:30:07 +0000 Subject: [PATCH] Make pragState call mkPState, rather than duplicating everything This also means that extsBitmap gets set, whereas is was just being set to 0 before. --- compiler/parser/Lexer.x | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index 4e96176..4ce8304 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -1794,25 +1794,9 @@ alternativeLayoutRule flags = testBit flags alternativeLayoutRuleBit -- PState for parsing options pragmas -- pragState :: DynFlags -> StringBuffer -> SrcLoc -> PState -pragState dynflags buf loc = - PState { - buffer = buf, - messages = emptyMessages, - dflags = dynflags, - last_loc = mkSrcSpan loc loc, - last_len = 0, - loc = loc, - extsBitmap = 0, - context = [], - lex_state = [bol, option_prags, 0], - alr_pending_implicit_tokens = [], - alr_next_token = Nothing, - alr_last_loc = noSrcSpan, - alr_context = [], - alr_expecting_ocurly = Nothing, - alr_justClosedExplicitLetBlock = False - } - +pragState dynflags buf loc = (mkPState dynflags buf loc) { + lex_state = [bol, option_prags, 0] + } -- create a parse state -- -- 1.7.10.4