Rain: fixed the parsing of channel types

This commit is contained in:
Neil Brown 2007-08-23 20:52:15 +00:00
parent ab918eb9ab
commit 7e96da4922
2 changed files with 3 additions and 1 deletions

View File

@ -41,7 +41,7 @@ $hexDigit = [0-9 a-f A-F]
| "if" | "while" | "else"
| "sint8" | "sint16" | "sint32" | "sint64"
| "uint8" | "uint16" | "uint32" | "uint64"
| "int" | "bool"
| "int" | "bool" | "channel"
| "true" | "false"

View File

@ -412,6 +412,8 @@ testDataType =
,fail ("int?",RP.dataType)
,fail ("bool!",RP.dataType)
,fail ("int?int",RP.dataType)
,pass ("channel bool",RP.dataType,assertEqual "testDataType 200" $ A.Chan A.DirUnknown nonShared A.Bool)
]
testDecl :: [ParseTest (Meta, A.Structured -> A.Structured)]