aboutsummaryrefslogtreecommitdiff
path: root/frontend/scanner.icl
diff options
context:
space:
mode:
authorpieter1999-11-16 16:18:12 +0000
committerpieter1999-11-16 16:18:12 +0000
commit5cc65c1bf2a4db56ec8ebf6b83ddf6ae7afe5474 (patch)
tree8b24c0b2f44ca402bb40cb03940ffa0a333a8972 /frontend/scanner.icl
parent:: T = E.x Cons x T | Nil (diff)
allow operator names like .*
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@53 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/scanner.icl')
-rw-r--r--frontend/scanner.icl12
1 files changed, 7 insertions, 5 deletions
diff --git a/frontend/scanner.icl b/frontend/scanner.icl
index d718ae2..fb66486 100644
--- a/frontend/scanner.icl
+++ b/frontend/scanner.icl
@@ -435,16 +435,18 @@ Scan c0=:'&' input co
Scan c0=:'.' input co
= case co of
TypeContext
-
-> (DotToken, input)
_ # (eof, c1, input) = ReadChar input
| eof -> (DotToken, input)
- | c1 <> '.' -> (DotToken, charBack input)
- # (eof, c2, input) = ReadChar input
- | eof -> (DotDotToken, input)
- | isSpecialChar c2
+ | c1 == '.'
+ # (eof, c2, input) = ReadChar input
+ | eof -> (DotDotToken, input)
+ | isSpecialChar c2
-> ScanOperator 2 input [c2, c1, c0] co
-> (DotDotToken, charBack input)
+ | isSpecialChar c1
+ -> ScanOperator 1 input [c1, c0] co
+ -> (DotToken, charBack input)
Scan '!' input TypeContext = (ExclamationToken, input)
Scan '\\' input co
# (eof, c, input) = ReadChar input