yql_ast_escaping.h 793 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <util/generic/fwd.h>
  3. #include <util/system/types.h>
  4. #include <util/generic/strbuf.h>
  5. class IOutputStream;
  6. namespace NYql {
  7. enum class EUnescapeResult
  8. {
  9. OK,
  10. INVALID_ESCAPE_SEQUENCE,
  11. INVALID_BINARY,
  12. INVALID_OCTAL,
  13. INVALID_HEXADECIMAL,
  14. INVALID_UNICODE,
  15. INVALID_END,
  16. };
  17. TStringBuf UnescapeResultToString(EUnescapeResult result);
  18. void EscapeArbitraryAtom(TStringBuf atom, char quoteChar, IOutputStream* out);
  19. EUnescapeResult UnescapeArbitraryAtom(
  20. TStringBuf atom, char endChar, IOutputStream* out, size_t* readBytes);
  21. void EscapeBinaryAtom(TStringBuf atom, char quoteChar, IOutputStream* out);
  22. EUnescapeResult UnescapeBinaryAtom(
  23. TStringBuf atom, char endChar, IOutputStream* out, size_t* readBytes);
  24. } // namspace NYql