jyn514 / saltwater

A C compiler written in Rust, with a focus on good error messages.
BSD 3-Clause "New" or "Revised" License
294 stars 27 forks source link

Replce shared_str with arcstr #511

Closed Stupremee closed 4 years ago

Stupremee commented 4 years ago

Resolves #509

hdamron17 commented 4 years ago

To answer the previous question about literal!, here is the explanation. To paraphrase, it means anything created as a literal is static and .clone() does effectively nothing.

hdamron17 commented 4 years ago

Also, possibly you can add a test that ensures the pointer returned by Lexer::slice is identical to the lexer's ArcStr. This would use pointer_eq! provided by arcstr, I believe.

Stupremee commented 4 years ago

Closed in favor of #514