rust/src/libsyntax
Nicholas Nethercote d5d389e4f1 Use escape_default() for strings in LitKind::token().
This avoids converting every char to \u{...} form, which bloats the
resulting strings unnecessarily. It also provides consistency with the
existing escape_default() calls in LitKind::token() used for raw
string literals, char literals, and raw byte char literals.

There are two benefits from this change.

- Compilation is faster. Most of the rustc-perf benchmarks see a
  non-trivial speedup, particularly for incremental rebuilds, with the
  best speedup over 13%, and multiple others over 10%.

- Generated rlibs are smaller. An extreme example is libfutures.rlib,
  which shrinks from 2073306 bytes to 1765927 bytes, a 15% reduction.
2018-05-03 10:31:39 +10:00
..
diagnostics Allow raw identifiers in diagnostic macros. 2018-03-18 13:27:56 -05:00
ext rustc_target: move in syntax::abi and flip dependency. 2018-04-26 17:49:16 +03:00
parse Auto merge of #50155 - est31:label_expressions, r=petrochenkov 2018-04-28 10:08:56 +00:00
print rustc_target: move in syntax::abi and flip dependency. 2018-04-26 17:49:16 +03:00
util AST/HIR: Merge field access expressions for named and numeric fields 2018-04-12 23:02:09 +03:00
ast.rs rustc_target: move in syntax::abi and flip dependency. 2018-04-26 17:49:16 +03:00
attr.rs Use escape_default() for strings in LitKind::token(). 2018-05-03 10:31:39 +10:00
build.rs rustc: Add some build scripts for librustc crates 2017-07-22 22:04:13 -07:00
Cargo.toml rustc_target: move in syntax::abi and flip dependency. 2018-04-26 17:49:16 +03:00
codemap.rs CodeMap functions refactored. 2018-03-18 20:46:29 -03:00
config.rs Rename ast::Variant_::name into ident + Fix rebase 2018-04-06 11:48:19 +03:00
diagnostic_list.rs Fix missed i128 feature gates 2018-03-26 08:37:56 -05:00
edition.rs add EDITIONS_NAME_LIST, make edition tracked, enforce that only stable editions are allowed to be used on non-nightly builds 2018-04-19 21:03:21 -07:00
entry.rs Cleanup InternedString. 2016-11-21 09:00:56 +00:00
feature_gate.rs Rollup merge of #49968 - christianpoveda:stabilize_dyn, r=nikomatsakis 2018-04-28 03:32:12 +08:00
fold.rs AST/HIR: Merge field access expressions for named and numeric fields 2018-04-12 23:02:09 +03:00
json.rs Require the code mapper to be thread-safe 2018-03-15 00:43:03 +01:00
lib.rs Use escape_default() for strings in LitKind::token(). 2018-05-03 10:31:39 +10:00
ptr.rs syntax: Rename P::unwrap into P::into_inner 2017-12-17 02:21:29 +03:00
README.md Replace many of the last references to readmes 2018-03-16 12:43:22 -05:00
show_span.rs use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
std_inject.rs Reorder injection of std to get better compilation error 2018-04-16 12:28:30 -07:00
str.rs syntax: Copy unstable str::char_at into libsyntax 2015-04-21 10:23:53 -07:00
test.rs Fixed tidy errors. 2018-04-26 17:49:24 +03:00
test_snippet.rs Remove syntax and syntax_pos thread locals 2018-03-14 11:56:01 +01:00
tokenstream.rs proc_macro: Stay on the "use the cache" path more 2018-04-18 19:36:48 -07:00
visit.rs rustc_target: move in syntax::abi and flip dependency. 2018-04-26 17:49:16 +03:00

The syntax crate contains those things concerned purely with syntax that is, the AST ("abstract syntax tree"), parser, pretty-printer, lexer, macro expander, and utilities for traversing ASTs.

For more information about how these things work in rustc, see the rustc guide: