Commit 3013592a authored by Martin Wierich's avatar Martin Wierich
Browse files

bugfix: the parser did not accept

  from m import :: :+:
parent f9a06467
......@@ -884,11 +884,11 @@ want_2_0_import_declaration token pState
// ..MW5
= case token of
DoubleColonToken
# (name, pState) = wantUpperCaseName "import type" pState
# (name, pState) = wantConstructorName "import type" pState
(type_id, pState) = stringToIdent name IC_Type pState
(ii_extended, token, pState) = optional_extension_with_next_token pState
| token == OpenToken
# (conses, pState) = want_names (wantUpperCaseName "import type (..)") IC_Expression CloseToken pState
# (conses, pState) = want_names (wantConstructorName "import type (..)") IC_Expression CloseToken pState
-> (ID_Type { ii_ident = type_id, ii_extended = ii_extended } (Yes conses), pState)
| token == CurlyOpenToken
# (fields, pState) = want_names (wantLowerCaseName "import record fields") (IC_Field type_id) CurlyCloseToken pState
......@@ -3108,7 +3108,7 @@ wantConstructorName string pState
| isUpperCaseName name || isFunnyIdName name
-> (name, pState)
_
-> ("", parseError string (Yes token) "upper case ident" pState)
-> ("", parseError string (Yes token) "upper case or funny ident" pState)
/*
isTypeStartToken :: ! Token -> Bool
......
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