Add diagnostic notation for bytes
parent
41f536bd46
commit
ed19ece346
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue