diff options
author | alimarin | 2002-06-03 09:49:30 +0000 |
---|---|---|
committer | alimarin | 2002-06-03 09:49:30 +0000 |
commit | 4505f798844949021d529670dde91dcd0d22f9cd (patch) | |
tree | be3742504873d11df0bbecae502e609935c3fe84 /frontend/scanner.icl | |
parent | - improved handling of equivalent types within one application to share a (diff) |
added constructor/type/field information to generics
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1079 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/scanner.icl')
-rw-r--r-- | frontend/scanner.icl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/frontend/scanner.icl b/frontend/scanner.icl index bdd168e..5930c1e 100644 --- a/frontend/scanner.icl +++ b/frontend/scanner.icl @@ -196,6 +196,7 @@ ScanOptionNoNewOffsideForSeqLetBit:==4; | DeriveToken // derive | GenericOpenToken // {| | GenericCloseToken // |} + | GenericOfToken // of | ExistsToken // E. | ForAllToken // A. @@ -206,6 +207,7 @@ ScanOptionNoNewOffsideForSeqLetBit:==4; | TypeContext | FunctionContext | CodeContext + | GenericContext instance == ScanContext where @@ -794,6 +796,7 @@ CheckReserved GeneralContext s i = CheckGeneralContext s i CheckReserved TypeContext s i = CheckTypeContext s i CheckReserved FunctionContext s i = CheckFunctContext s i CheckReserved CodeContext s i = CheckCodeContext s i +CheckReserved GenericContext s i = CheckGenericContext s i CheckGeneralContext :: !String !Input -> (!Token, !Input) CheckGeneralContext s input @@ -846,6 +849,7 @@ CheckTypeContext s input "Dynamic" -> (DynamicTypeToken , input) "special" -> (SpecialToken , input) "from" -> (FromToken , input) + "of" -> (GenericOfToken , input) // AA s -> CheckEveryContext s input CheckFunctContext :: !String !Input -> (!Token, !Input) @@ -873,6 +877,12 @@ CheckCodeContext s input "inline" -> (InlineToken , input) s -> CheckEveryContext s input +CheckGenericContext :: !String !Input -> (!Token, !Input) +CheckGenericContext s input + = case s of + "of" -> (GenericOfToken , input) + s -> CheckEveryContext s input + GetPrio :: !Input -> (!Optional String, !Int, !Input) GetPrio input # (error, c, input) = SkipWhites input |