protobuf-simple 0.1.0.2 → 0.1.0.3
raw patch · 3 files changed
+14/−8 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
protobuf-simple.cabal view
@@ -3,7 +3,7 @@ name: protobuf-simple synopsis: Simple Protocol Buffers library (proto2)-version: 0.1.0.2+version: 0.1.0.3 homepage: https://github.com/sru-systems/protobuf-simple license: MIT license-file: LICENSE
src/Parser/ProtoParser.hs view
@@ -426,7 +426,13 @@ int32 :: Parsec String u Int32-int32 = read <$> lexeme (many1 digit)+int32 = read <$> lexeme ((:) <$> char '0' <*> zeroStart+ <|> many1 digit)+ where+ zeroStart = choice [ (:) <$> oneOf "xX" <*> many1 hexDigit+ , (:) <$> oneOf "oO" <*> many1 octDigit+ , many digit+ ] keyword :: String -> Parsec String u String
test/Parser/ProtoParserSpec.hs view
@@ -133,15 +133,15 @@ , " optional fixed32 f04 = 4;" , " optional fixed64 f05 = 5;" , " optional float f06 = 6;"- , " optional int32 f07 = 7;"- , " optional int64 f08 = 8;"+ , " optional int32 f07 = 0o7;"+ , " optional int64 f08 = 0o10;" , " optional sfixed32 f09 = 9;" , " optional sfixed64 f10 = 10;" , " optional sint32 f11 = 11;" , " optional sint64 f12 = 12;" , " optional string f13 = 13;"- , " optional uint32 f14 = 14;"- , " optional uint64 f15 = 15;"+ , " optional uint32 f14 = 0xe;"+ , " optional uint64 f15 = 0xF;" , "}" ]) `shouldParse`@@ -195,11 +195,11 @@ it "parses a message with a enum field" $ parseProto "Test.proto" (unlines [ "message EnumMessage {"- , " optional EnumType value = 1;"+ , " optional EnumType value = 0x1;" , "}" , "enum EnumType {" , " UNKNOWN = 0;"- , " INIT = 1;"+ , " INIT = 0x1;" , "}" ]) `shouldParse`