Parsing Some Opcodes
Summary:
Can now fully parse the `.hhas` of `hello.php`, the file outlined in T118282235.
This means we can parse a limited number of opcodes as well as a partial `.hhas` outline (since `hello.hhas` doesn't have classes and its function takes no arguments, these constructs will be parsed later)
Also added some functions to `escaper.rs`. Similar to
D37054531 (https://github.com/facebook/hhvm/commit/
e1c5fac7d7efa0eb3c5b2dbaeee461c871f92a02), `escaper.rs` could unescape `&str` but not `&[u8]`, and to avoid risking `from_utf8` errors I added a `byte` literal escaping method to `escape.rs`.
Also made all `into_xxx` token functions have the same return type (`Result<&'a [u8]>`) so we can pass to `expect_is_str`, even though most tokens don't carry data (just return their string rep)
Reviewed By: hgoldstein
Differential Revision:
D37181124
fbshipit-source-id:
310582a70f08e7c022113a0035757a784ef0263d