Add diagnostic notation for bytes

dev
Alberto Restifo 2020-04-19 13:45:00 +02:00
parent 41f536bd46
commit ed19ece346
1 changed files with 4 additions and 1 deletions

View File

@ -14,8 +14,11 @@ class CBOR::Token
case token case token
when IntT when IntT
token.value.to_s token.value.to_s
when BytesT
return %(h'') if token.value.empty?
"h'#{token.value.hexstring}'"
else else
"NOT IMPLEMENTED YET!" raise "Diagnostic notation for type #{token.class} not implemented"
end end
end end
end end