]> git.lizzy.rs Git - rust.git/commit
syntax: don't process string/char/byte/binary lits
authorCorey Richardson <corey@octayn.net>
Thu, 3 Jul 2014 07:47:30 +0000 (00:47 -0700)
committerCorey Richardson <corey@octayn.net>
Wed, 9 Jul 2014 07:06:29 +0000 (00:06 -0700)
commit9f5e21da4ef95e5d2914a76b09848ebc2504c53d
tree0bfb591a37cc94423938fd634fc3c8605addfd5c
parentbf04a7ccb1c1d23478885ea4f67fad374ffe0a72
syntax: don't process string/char/byte/binary lits

This shuffles things around a bit so that LIT_CHAR and co store an Ident
which is the original, unaltered literal in the source. When creating the AST,
unescape and postprocess them.

This changes how syntax extensions can work, slightly, but otherwise poses no
visible changes. To get a useful value out of one of these tokens, call
`parse::{char_lit, byte_lit, bin_lit, str_lit}`

[breaking-change]
src/libsyntax/ext/base.rs
src/libsyntax/ext/quote.rs
src/libsyntax/parse/lexer/mod.rs
src/libsyntax/parse/mod.rs
src/libsyntax/parse/parser.rs
src/libsyntax/parse/token.rs
src/test/run-pass/string-escapes.rs [new file with mode: 0644]