cgswords
d59accfb06
Refactored tokentrees into their own files in preparation for tokenstreams. Modified tests to point to the new file now.
2016-06-21 11:12:36 -07:00
Jeffrey Seyfried
5033eca65f
Generalize and abstract ThinAttributes
2016-06-19 00:01:55 +00:00
Jeffrey Seyfried
962d5c16b5
Fix fallout
2016-06-17 05:21:23 +00:00
Ted Mielczarek
24e7491660
Add an abs_path member to FileMap, use it when writing debug info.
...
When items are inlined from extern crates, the filename in the debug info
is taken from the FileMap that's serialized in the rlib metadata.
Currently this is just FileMap.name, which is whatever path is passed to rustc.
Since libcore and libstd are built by invoking rustc with relative paths,
they wind up with relative paths in the rlib, and when linked into a binary
the debug info uses relative paths for the names, but since the compilation
directory for the final binary, tools trying to read source filenames
will wind up with bad paths. We noticed this in Firefox with source
filenames from libcore/libstd having bad paths.
This change stores an absolute path in FileMap.abs_path, and uses that
if available for writing debug info. This is not going to magically make
debuggers able to find the source, but it will at least provide sensible
paths.
2016-06-16 18:08:46 +01:00
Jeffrey Seyfried
0644aba0b3
Remove the type parameter from syntax::visit::Visitor
2016-06-14 07:40:32 +00:00
Jeffrey Seyfried
5bf7970ac7
Change fold_tt
and fold_tts
to take token trees by value (instead of by reference)
2016-06-14 07:40:18 +00:00
Niko Matsakis
489a6c95bf
replace fileline_{help,note} with {help,note}
...
The extra filename and line was mainly there to keep the indentation
relative to the main snippet; now that this doesn't include
filename/line-number as a prefix, it is distracted.
2016-05-02 11:49:23 -04:00
Vadim Petrochenkov
9108fb7bae
Remove some old code from libsyntax
2016-04-24 21:04:09 +03:00
Vadim Petrochenkov
546c052d22
syntax: Get rid of token::IdentStyle
2016-04-24 20:59:44 +03:00
Seo Sanghyeon
01fb27f648
Remove unused trait imports
2016-04-12 22:58:55 +09:00
Jonas Schievink
11e0ba4340
Do less panicking in general
2016-02-19 14:43:13 +01:00
Jonas Schievink
3a872782d3
Move more uses of panictry!
out of libsyntax
...
[breaking-change] for syntax extensions
2016-02-16 13:32:40 +01:00
Vadim Petrochenkov
14adc9bb63
Rename ast::Pat_ and its variants
2016-02-13 13:49:24 +03:00
Jonas Schievink
c877d61b15
Use more autoderef in libsyntax
2016-02-12 19:28:42 +01:00
Vadim Petrochenkov
77cc5764b9
Remove some unnecessary indirection from AST structures
2016-02-11 23:33:09 +03:00
Oliver 'ker' Schneider
d844bfb196
[breaking-change] don't glob export ast::Visibility variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
73fa9b2da2
[breaking-change] don't glob export ast::Mutablity variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
019614f03d
[breaking-change] don't glob export ast::Item_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
8290c950a8
[breaking-change] don't pub export ast::Stmt_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
498a2e416e
[breaking-change] don't pub export ast::IntLitType variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
69072c4f5d
[breaking-change] don't pub export ast::Lit_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
05d4cefd63
[breaking-change] don't pub export ast::Ty_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
bfa66bb389
[breaking-change] remove the sign from integer literals in the ast
2016-02-11 12:34:48 +01:00
Oliver Schneider
625e78b700
[breaking-change] don't glob export ast::{UintTy, IntTy} variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
ccf48bcd40
[breaking-change] don't glob export ast::FloatTy variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
80bf9ae18a
[breaking-change] don't glob export ast::Expr_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
243a30c931
[breaking-change] don't glob import/export syntax::abi enum variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
47b0784ba8
[breaking-change] don't glob export ast::BlockCheckMode variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
3b57d40fe5
[breaking-change] don't glob import ast::FunctionRetTy variants
2016-02-11 12:34:48 +01:00
Nick Cameron
0ac8915875
The war on abort_if_errors
2016-01-22 08:19:27 +13:00
Nick Cameron
b976d9e666
Implement JSON error emission
...
[breaking-change]
syntax::errors::Handler::new has been renamed to with_tty_emitter
Many functions which used to take a syntax::errors::ColorConfig, now take a rustc::session::config::ErrorOutputType. If you previously used ColorConfig::Auto as a default, you should now use ErrorOutputType::default().
2016-01-15 10:24:12 +13:00
Nick Cameron
9023c659af
Cut out a bunch of Result and panictry! boilerplate from libsyntax.
...
[breaking-change] if you use any of the changed functions, you'll need to remove a try! or panictry!
2015-12-31 14:29:02 +13:00
Nick Cameron
95dc7efad0
use structured errors
2015-12-30 14:27:59 +13:00
bors
709d00a231
Auto merge of #30460 - Ms2ger:BindingMode, r=alexcrichton
2015-12-21 19:10:51 +00:00
Ms2ger
143b9d80d0
Stop re-exporting the ast::BindingMode variants.
2015-12-20 22:15:26 +01:00
Manish Goregaokar
9e953df6f0
Rollup merge of #30420 - petrochenkov:owned2, r=nrc
...
Part of https://github.com/rust-lang/rust/pull/30095 not causing mysterious segfaults.
r? @nrc
2015-12-18 20:02:12 +05:30
Vadim Petrochenkov
0d298f9904
Deprecate name OwnedSlice
and don't use it
2015-12-18 00:52:56 +03:00
Nick Cameron
a478811822
Move a bunch of stuff from Session to syntax::errors
...
The intention here is that Session is a very thin wrapper over the error handling infra.
2015-12-17 09:35:51 +13:00
Nick Cameron
6309b0f5bb
move error handling from libsyntax/diagnostics.rs to libsyntax/errors/*
...
Also split out emitters into their own module.
2015-12-17 09:35:50 +13:00
Marvin Löbel
2a8f358de7
Add syntax support for attributes on expressions and all syntax
...
nodes in statement position.
Extended #[cfg] folder to allow removal of statements, and
of expressions in optional positions like expression lists and trailing
block expressions.
Extended lint checker to recognize lint levels on expressions and
locals.
2015-11-26 21:46:12 +01:00
bors
b12a3582b1
Auto merge of #29761 - eefriedman:rename-nopanic, r=sanxiyn
...
Just `sed s/_nopanic//g`. Hopefully makes libsyntax a bit more
readable.
2015-11-13 10:28:25 +00:00
Eli Friedman
69210a9635
Rename _nopanic methods to remove the suffix.
...
Just `sed s/_nopanic//g`. Hopefully makes libsyntax a bit more
readable.
2015-11-10 16:10:31 -08:00
Seo Sanghyeon
791003ad3c
Use deref coercions
2015-11-10 20:16:28 +09:00
Oliver Schneider
fcc7067904
remove Tt
prefix from TokenType variants
...
[breaking change]
2015-11-06 14:52:02 +01:00
Eli Friedman
56ba8feed6
Update libsyntax tests.
2015-10-27 20:09:10 -07:00
Eli Friedman
e5024924ad
Make fatal errors more consistent.
2015-10-27 20:09:10 -07:00
Eli Friedman
de95857129
Don't panic for fatal errors in attribute parsing.
2015-10-27 20:09:10 -07:00
Eli Friedman
c141f47c24
Delete unnecessary ParserAttr trait.
2015-10-27 20:09:10 -07:00
Eli Friedman
1dd87dcfea
Don't use panicking helpers in Parser.
2015-10-27 20:09:10 -07:00
Vadim Petrochenkov
f284cbc7af
Cleanup interfaces of Name, SyntaxContext and Ident
...
Make sure Name, SyntaxContext and Ident are passed by value
Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-24 23:05:02 +03:00