aboutsummaryrefslogtreecommitdiff
path: root/frontend/utilities.icl
diff options
context:
space:
mode:
authorronny2001-07-25 14:39:35 +0000
committerronny2001-07-25 14:39:35 +0000
commit21d7092be538aef72f74e5959b58d3b9ff31cac5 (patch)
tree2643ebf19e3e8f8d4fd25367a9d4fd7ea058660f /frontend/utilities.icl
parentbug fix parse_bug_forbidden_symbols (diff)
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
Diffstat (limited to 'frontend/utilities.icl')
-rw-r--r--frontend/utilities.icl19
1 files changed, 8 insertions, 11 deletions
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