From 21d7092be538aef72f74e5959b58d3b9ff31cac5 Mon Sep 17 00:00:00 2001 From: ronny Date: Wed, 25 Jul 2001 14:39:35 +0000 Subject: removed underscoreModule from ParseState, this is now handled by the scanner removed underscored allowed parameter of isUpperCaseName and isLowerCaseName these routines now always look at the first non-underscore character adjusted the names of some types and constructors in predef so that they start with an uppercase letter git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@571 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/utilities.icl | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'frontend/utilities.icl') diff --git a/frontend/utilities.icl b/frontend/utilities.icl index 15d1a90..36cf15b 100644 --- a/frontend/utilities.icl +++ b/frontend/utilities.icl @@ -38,9 +38,6 @@ revCharListToString [hd:tl] = revCharListToString tl +++ toString hd revCharListToString [] = "" */ -NoUnderscores :== False -UnderscoresAllowed :== True - skipUnderscores :: !Int !Int !String -> Char skipUnderscores i size s | i < size @@ -51,15 +48,15 @@ skipUnderscores i size s // otherwise: i >= size = '_' -isUpperCaseName :: ! String !Bool -> Bool -isUpperCaseName id underscoresAllowed - #! c = if underscoresAllowed (skipUnderscores 0 (size id) id) (id.[0]) - = 'A' <= c && c <= 'Z' +isUpperCaseName :: ! String -> Bool +isUpperCaseName id + #! c = skipUnderscores 0 (size id) id + = 'A' <= c && c <= 'Z' -isLowerCaseName :: ! String !Bool -> Bool -isLowerCaseName id underscoresAllowed - #! c = if underscoresAllowed (skipUnderscores 0 (size id) id) (id.[0]) - = 'a' <= c && c <= 'z' +isLowerCaseName :: ! String -> Bool +isLowerCaseName id + #! c = skipUnderscores 0 (size id) id + = 'a' <= c && c <= 'z' isFunnyIdName :: ! String -> Bool isFunnyIdName id -- cgit v1.2.3