Commit d296cd3c authored by Pieter Koopman's avatar Pieter Koopman

fixed a small bug labelled with PK

parent d44d9809
......@@ -189,7 +189,8 @@ where
| isDigit c
-> lex_number -1 (lexUngetChar c s)
| otherwise
-> lex_ident 1 ['-'] (lexUngetChar c s)
-> lex_funny_ident 1 ['-'] (lexUngetChar c s) // PK
// -> lex_ident 1 ['-'] (lexUngetChar c s)
Just c
| isSpace c
-> lex s
......@@ -576,7 +577,7 @@ gParse{|CONS of d|} parse_arg expr
| isEmpty d.gcd_fields
| is_tuple d.gcd_name
= parse_tuple expr
| otherwise
| otherwise
= case d.gcd_prio of
GenConsNoPrio
-> parse_nonfix expr
......
......@@ -76,7 +76,7 @@ instance == GenConsAssoc where
(==) _ _ = False
mkContext :: GenericConsDescriptor -> Context
mkContext {gcd_prio=GenConsNoPrio, gcd_fields, gcd_name, gcd_arity}
mkContext {gcd_prio=GenConsNoPrio, gcd_fields, gcd_name, gcd_arity}
| isEmpty gcd_fields
| gcd_arity == 0
= CtxNullary
......@@ -117,7 +117,7 @@ needParenthesis (CtxInfix _ _ _ _) CtxNone = False
needParenthesis (CtxInfix _ _ _ _) CtxNullary = True
needParenthesis (CtxInfix _ _ _ _) CtxTuple = False
needParenthesis (CtxInfix _ _ _ _) CtxRecord = False
needParenthesis (CtxInfix _ _ _ _) CtxNonfix = False
needParenthesis (CtxInfix _ _ _ _) CtxNonfix = True // False // PK
needParenthesis (CtxInfix _ this_assoc this_prio _) (CtxInfix _ outer_assoc outer_prio branch)
= outer_prio > this_prio
|| (outer_prio == this_prio && not (this_assoc == outer_assoc && this_assoc == branch))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment