bors
5f2f952dbc
auto merge of #9181 : lkuper/rust/libsyntax-default-methods-refactor, r=alexcrichton
...
I'm getting the three `make check` failures mentioned in issue #9127 , which I also get building master.
2013-09-14 10:05:51 -07:00
Alex Crichton
6c4c5f5631
Pass a more proper span to the syntax expanders
...
Closes #5794
2013-09-13 20:54:52 -07:00
Lindsey Kuper
ade7df43d6
Refactor libsyntax Visitor impls to use default methods.
2013-09-13 20:48:58 -04:00
Erick Tryzelaar
38f97ea103
std: Rename {Option,Result}::chain{,_err}* to {and_then,or_else}
2013-09-12 18:54:13 -07:00
John Clements
422cf1adc5
change type of ExprLoop and ExprBreak elts from ident->name.
...
Lots of downstream changes in librustc, should be infinitesimally faster.
2013-09-10 14:12:54 -07:00
Niko Matsakis
a5ad4c3794
Delay assignment of node ids until after expansion. Ensures that each AST node
...
has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two
representative tests.
Fixes #7971
Fixes #6304
Fixes #8367
Fixes #8754
Fixes #8852
Fixes #2543
Fixes #7654
2013-09-10 05:45:12 -04:00
bors
059cbaadfa
auto merge of #9005 : alexcrichton/rust/rusty-log, r=brson
...
Also redefine all of the standard logging macros to use more rust code instead
of custom LLVM translation code. This makes them a bit easier to understand, but
also more flexibile for future types of logging.
Additionally, this commit removes the LogType language item in preparation for
changing how logging is performed.
2013-09-09 10:41:05 -07:00
Huon Wilson
14183114e1
syntax: aesthetic improvements to the for desugaring.
2013-09-08 23:00:05 +10:00
Huon Wilson
07351b44c6
syntax: implement labelled breaks for for.
...
`for` desugars to `loop` so it is trivial to just desugar to `loop` while
retaining any label.
2013-09-08 22:08:01 +10:00
John Clements
eabeba3ef3
added index to test cases, more debugging output
2013-09-06 13:35:14 -07:00
John Clements
1ecc1e51c0
quote_* macros no longer need to be capturing
...
This is actually almost a problem, because those were my poster-child
macros for "here's how to implement a capturing macro." Following this
change, there will be no macros that use capturing; this will probably
make life unpleasant for the first person that wants to implement a
capturing macro. I should probably create a dummy_capturing macro,
just to show how it works.
2013-09-06 13:35:14 -07:00
John Clements
6c294ba538
add test case, cleanup
2013-09-06 13:35:13 -07:00
John Clements
8330411688
fixed a bug that caused double-expand-traversal of macros that expand into modules.
2013-09-06 13:35:13 -07:00
John Clements
fddc815ada
WIP: adding mark-cancelling for macro_rules
2013-09-06 13:35:13 -07:00
John Clements
1a06584117
comment on hygienic context extension train fns
2013-09-06 13:35:13 -07:00
John Clements
dc7f3df27f
awesome new bug! added test case
2013-09-06 13:35:12 -07:00
John Clements
dbf4e19ea5
remove unneeded imports, clean up unused var warnings
2013-09-06 13:35:12 -07:00
John Clements
60562ac9f8
whitespace, reindentation, and comments only
2013-09-06 13:35:12 -07:00
John Clements
e29d25338d
remove dead code
2013-09-06 13:35:11 -07:00
John Clements
b9bb4abcb6
capturing macros now implemented
2013-09-06 13:35:11 -07:00
John Clements
2c51e262f3
add fold_mac clause to fun_to_ctxt_folder
2013-09-06 13:35:11 -07:00
John Clements
3261b6eece
WIP: adding context to macros
2013-09-06 13:35:10 -07:00
John Clements
34f31e2961
rework fold so that fold_tts takes an ast_fold rather than a thunk, stop using closures in ident traversal
2013-09-06 13:35:10 -07:00
John Clements
09e6dda4f2
add temporarily unused ctxt field to mac_invoc_tt
2013-09-06 13:35:10 -07:00
John Clements
0c31c930ff
add test case for macro token comparison
2013-09-06 13:35:10 -07:00
John Clements
963dab5dcb
marking on both input and output from macros. nice shiny new test case framework
2013-09-06 13:35:10 -07:00
John Clements
015ba31c02
test case support fns, remove debugging test case
2013-09-06 13:35:09 -07:00
John Clements
62fee04ae9
test case work
2013-09-06 13:35:09 -07:00
John Clements
1f8e856430
re-add lost call to expand_block_elts
2013-09-06 13:35:09 -07:00
John Clements
7a9af098f0
test case work
2013-09-06 13:35:09 -07:00
John Clements
f5ab867119
use empty_ctxt to simplify downstream
2013-09-06 13:35:09 -07:00
John Clements
a666ddc135
make comparison of special_idents non-hygienic
2013-09-06 13:35:08 -07:00
John Clements
3965725d51
comments
2013-09-06 13:35:08 -07:00
John Clements
9de40dfc87
remove FIXME #2888 , now bug is fixed
2013-09-06 13:35:08 -07:00
John Clements
98a6cbdba3
comments only
2013-09-06 13:35:08 -07:00
John Clements
91d3c36430
adding test case to check marking/unmarking
2013-09-06 13:35:08 -07:00
John Clements
431ede40df
removed unneccessary SyntaxExpander structs
2013-09-06 13:35:07 -07:00
John Clements
6c6d053b01
renaming test cases
2013-09-06 13:35:07 -07:00
John Clements
2f6498f7b4
flip the switch on let renaming
2013-09-06 13:35:07 -07:00
John Clements
fa6c981606
add hygiene support fns, move them around.
...
also adds test cases
2013-09-06 13:35:06 -07:00
John Clements
e1734f6d38
rename resolve to mtwt_resolve
2013-09-06 13:35:06 -07:00
Alex Crichton
8a966183fe
Remove the __log function for __log_level
...
Also redefine all of the standard logging macros to use more rust code instead
of custom LLVM translation code. This makes them a bit easier to understand, but
also more flexibile for future types of logging.
Additionally, this commit removes the LogType language item in preparation for
changing how logging is performed.
2013-09-05 01:48:20 -07:00
Chris Morgan
6b7b8f2682
Add an `unreachable!()` macro.
...
Rationale: having a function which fails means that the location of
failure which is output is that of the unreachable() function, rather
than the caller.
This is part of #8991 but is not all of it; current usage of
``std::util::unreachable()`` must remain so for the moment, until a new
snapshot is made; then I will remove that function entirely in favour of
using this macro.
2013-09-05 16:41:27 +10:00
Felix S. Klock II
6fbb64acbe
Make non-pub condition! expand to non-pub mod. Fix #6009 .
2013-09-04 10:05:10 +02:00
bors
383073883f
auto merge of #8963 : jmgrosen/rust/issue-8881, r=alexcrichton
2013-09-03 19:46:42 -07:00
jmgrosen
4a18d46130
Fixes #8881 . condition! imports parent's pub identifiers
2013-09-03 16:11:00 -07:00
Marvin Löbel
7419085337
Modernized a few more types in syntax::ast
2013-09-03 14:45:06 +02:00
Marvin Löbel
857f867320
Renamed syntax::ast::ident -> Ident
2013-09-02 02:51:21 +02:00
Marvin Löbel
539f37925c
Modernized a few type names in rustc and syntax
2013-09-01 14:43:26 +02:00
Patrick Walton
3b6314c39b
librustc: Add support for type parameters in the middle of paths.
...
For example, `foo::<T>::bar::<U>`.
This doesn't enforce that the type parameters are in the right
positions, however.
2013-08-27 18:46:51 -07:00