Alex Crichton
da3625161d
Removing imports of std::vec_ng::Vec
...
It's now in the prelude.
2014-03-20 09:30:14 -07:00
Daniel Micay
14f656d1a7
rename std::vec_ng -> std::vec
...
Closes #12771
2014-03-20 04:25:32 -04:00
Eduard Burtescu
90cbe0cad2
De-@ ParseSess uses.
2014-03-17 09:53:07 +02:00
Patrick Walton
198cc3d850
libsyntax: Fix errors arising from the automated ~[T]
conversion
2014-03-01 22:40:52 -08:00
Patrick Walton
58fd6ab90d
libsyntax: Mechanically change ~[T]
to Vec<T>
2014-03-01 22:40:52 -08:00
Patrick Walton
8e52b85d5a
libsyntax: De-@str
literal strings in the AST
2014-02-02 01:44:48 +11:00
Patrick Walton
70c5a0fbf7
libsyntax: Introduce an InternedString
type to reduce @str
in the
...
compiler and use it for attributes
2014-02-02 01:44:47 +11:00
Eduard Burtescu
6b221768cf
libsyntax: Renamed types, traits and enum variants to CamelCase.
2014-01-09 22:25:28 +02:00
Patrick Walton
758d854436
libsyntax: De-@mut
token
in the parser
2014-01-02 14:16:07 -08:00
Patrick Walton
f499d365ad
libsyntax: Make the parser mutable
2014-01-02 14:16:07 -08:00
Alex Crichton
ab387a6838
Register new snapshots
2013-11-28 20:27:56 -08:00
Brian Anderson
6ef1ab99c1
syntax: Forbid non-string literals in meta items. #623
2013-10-30 14:06:22 -07:00
Alex Crichton
daf5f5a4d1
Drop the '2' suffix from logging macros
...
Who doesn't like a massive renaming?
2013-10-22 08:09:56 -07:00
Alex Crichton
af3b132285
syntax: Remove usage of fmt!
2013-09-30 23:21:19 -07:00
Marvin Löbel
539f37925c
Modernized a few type names in rustc and syntax
2013-09-01 14:43:26 +02:00
Erick Tryzelaar
e20d46056d
Fix warnings in librustc and libsyntax
2013-08-17 08:41:42 -07:00
Niko Matsakis
33c6d3fd78
Allow attributes to appear as macro arguments
...
Fixes #8393
2013-08-08 19:41:02 -04:00
Huon Wilson
cc760a647a
syntax: modernise attribute handling in syntax::attr.
...
This does a number of things, but especially dramatically reduce the
number of allocations performed for operations involving attributes/
meta items:
- Converts ast::meta_item & ast::attribute and other associated enums
to CamelCase.
- Converts several standalone functions in syntax::attr into methods,
defined on two traits AttrMetaMethods & AttributeMethods. The former
is common to both MetaItem and Attribute since the latter is a thin
wrapper around the former.
- Deletes functions that are unnecessary due to iterators.
- Converts other standalone functions to use iterators and the generic
AttrMetaMethods rather than allocating a lot of new vectors (e.g. the
old code would have to allocate a new vector to use functions that
operated on &[meta_item] on &[attribute].)
- Moves the core algorithm of the #[cfg] matching to syntax::attr,
similar to find_inline_attr and find_linkage_metas.
This doesn't have much of an effect on the speed of #[cfg] stripping,
despite hugely reducing the number of allocations performed; presumably
most of the time is spent in the ast folder rather than doing attribute
checks.
Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so
that `rustc --cfg 'foo(bar)'` now works.
2013-07-20 01:06:16 +10:00
Patrick Walton
99b33f7219
librustc: Remove all uses of "copy".
2013-07-17 14:57:51 -07:00
Patrick Walton
a1531ed946
librustc: Remove the broken overloaded assign-ops from the language.
...
They evaluated the receiver twice. They should be added back with
`AddAssign`, `SubAssign`, etc., traits.
2013-06-28 10:44:16 -04:00
Huon Wilson
096f6f56a8
Use @str instead of @~str in libsyntax and librustc. Fixes #5048 .
...
This almost removes the StringRef wrapper, since all strings are
Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts
several things to be &'static str (the lint table and the intrinsics
table).
There are many instances of .to_managed(), unfortunately.
2013-06-13 10:20:52 +10:00
Seo Sanghyeon
8f80323f09
Remove unnecessary allocations flagged by lint
2013-05-28 03:14:44 +09:00
Alex Crichton
82fa0018c8
Remove all unnecessary allocations (as flagged by lint)
2013-05-20 16:10:40 -05:00
Seo Sanghyeon
a0d8873097
More accurate spans
2013-05-03 02:36:24 +09:00
Brendan Zabarauskas
e596128bd8
Remove 'Local Variable' comments
2013-05-02 13:22:04 +10:00
John Clements
fa5ba17c89
parser comments
...
parser comments
2013-04-28 09:51:14 -07:00
Alex Crichton
fd97cac251
syntax: remove unused 'mut' variables
2013-04-20 21:03:24 -04:00
Alex Crichton
dfb5c10dea
Remove unused imports throughout src/
2013-03-04 12:27:01 -05:00
Erick Tryzelaar
4a73426aa2
libsyntax: add &self to parser methods
2013-03-03 15:25:08 -08:00
Erick Tryzelaar
85fecd0ba7
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-03-01 07:01:48 -08:00
Alex Crichton
2df07ddc25
Fix implicit leaks of imports throughout libraries
...
Also touch up use of 'pub' and move some tests around so the tested functions
don't have to be 'pub'
2013-02-28 18:00:34 -05:00
Erick Tryzelaar
4ae91e2961
libsyntax: add explicit copies
2013-02-26 20:48:11 -08:00
Erick Tryzelaar
28691a0852
libsyntax: more minor cleanup
2013-02-26 02:14:01 -08:00
Erick Tryzelaar
cf6e21a17f
libsyntax: change attr::parse_seq_* to take &Token
2013-02-26 00:22:30 -08:00
Erick Tryzelaar
272c25e938
libsyntax: minor cleanup
2013-02-25 22:52:57 -08:00
Erick Tryzelaar
3635480b15
libsyntax: change expect to take &token::Token
2013-02-25 22:30:32 -08:00
Erick Tryzelaar
5b9e110eab
libsyntax: Convert ast::attribute_ to store a @meta_item
2013-02-25 06:19:44 -08:00
Patrick Walton
934c938f90
libsyntax: De-mut the parser. rs=demuting
2013-02-22 16:09:16 -08:00
John Clements
27b06777e6
Cleanup, commenting, trivial renaming
2013-02-21 16:17:06 -08:00
Luqman Aden
b02f5c2090
Get rid of structural records in libsyntax and the last bit in librustc.
2013-02-21 00:19:15 -08:00
Erick Tryzelaar
de5fdaf934
convert ast::meta_items to take @~strs
2013-02-19 10:02:52 -08:00
Patrick Walton
9143688197
librustc: Replace impl Type : Trait
with impl Trait for Type
. rs=implflipping
2013-02-14 14:44:12 -08:00
John Clements
53688addaa
test cases, cleanup
2013-01-31 23:05:12 -08:00
Patrick Walton
95b892c8a7
libsyntax: De-export a lot of libsyntax. rs=deëxporting
2013-01-29 13:55:30 -08:00
Erick Tryzelaar
4b0f702608
convert ast::attribute_ and ast::view_item to a struct
2013-01-14 18:15:54 -08:00
Patrick Walton
2db3abddcd
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 22:02:35 -08:00
Patrick Walton
44ab00ee37
Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
...
This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6.
2013-01-08 19:29:16 -08:00
Patrick Walton
a8d37af247
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 19:27:57 -08:00
Patrick Walton
57c599914a
librustc: Terminate name searches at the nearest module scope for paths that contain at least two components. r=graydon
2012-12-27 10:02:54 -08:00
Patrick Walton
4c2e4c37ce
librustc: Make use
statements crate-relative by default. r=brson
2012-12-13 13:05:22 -08:00