diff options
| author | bors <bors@rust-lang.org> | 2014-07-09 22:06:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-07-09 22:06:27 +0000 |
| commit | 942c72e1179bc2d3d351ea97235d65b39160cc18 (patch) | |
| tree | e8326084d8931aff1deabc4c6167ad695f7dfb9c /src/libsyntax | |
| parent | 66e1f11ef482d90f2ea3bd284b07cd825315fadd (diff) | |
| parent | 6f8b6c8c3650e8d73be07f119b6a435cad6db438 (diff) | |
| download | rust-942c72e1179bc2d3d351ea97235d65b39160cc18.tar.gz rust-942c72e1179bc2d3d351ea97235d65b39160cc18.zip | |
auto merge of #15550 : alexcrichton/rust/install-script, r=brson
This adds detection of the relevant LD_LIBRARY_PATH-like environment variable and appropriately sets it when testing whether binaries can run or not. Additionally, the installation prints a recommended value if one is necessary. Closes #15545
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index ebfc45d22ce..778f77ac7a8 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -561,56 +561,56 @@ pub enum TokenTree { TTNonterminal(Span, Ident) } -/// Matchers are nodes defined-by and recognized-by the main rust parser and -/// language, but they're only ever found inside syntax-extension invocations; -/// indeed, the only thing that ever _activates_ the rules in the rust parser -/// for parsing a matcher is a matcher looking for the 'matchers' nonterminal -/// itself. Matchers represent a small sub-language for pattern-matching -/// token-trees, and are thus primarily used by the macro-defining extension -/// itself. -/// -/// MatchTok -/// -------- -/// -/// A matcher that matches a single token, denoted by the token itself. So -/// long as there's no $ involved. -/// -/// -/// MatchSeq -/// -------- -/// -/// A matcher that matches a sequence of sub-matchers, denoted various -/// possible ways: -/// -/// $(M)* zero or more Ms -/// $(M)+ one or more Ms -/// $(M),+ one or more comma-separated Ms -/// $(A B C);* zero or more semi-separated 'A B C' seqs -/// -/// -/// MatchNonterminal -/// ----------------- -/// -/// A matcher that matches one of a few interesting named rust -/// nonterminals, such as types, expressions, items, or raw token-trees. A -/// black-box matcher on expr, for example, binds an expr to a given ident, -/// and that ident can re-occur as an interpolation in the RHS of a -/// macro-by-example rule. For example: -/// -/// $foo:expr => 1 + $foo // interpolate an expr -/// $foo:tt => $foo // interpolate a token-tree -/// $foo:tt => bar! $foo // only other valid interpolation -/// // is in arg position for another -/// // macro -/// -/// As a final, horrifying aside, note that macro-by-example's input is -/// also matched by one of these matchers. Holy self-referential! It is matched -/// by a MatchSeq, specifically this one: -/// -/// $( $lhs:matchers => $rhs:tt );+ -/// -/// If you understand that, you have closed the loop and understand the whole -/// macro system. Congratulations. +// Matchers are nodes defined-by and recognized-by the main rust parser and +// language, but they're only ever found inside syntax-extension invocations; +// indeed, the only thing that ever _activates_ the rules in the rust parser +// for parsing a matcher is a matcher looking for the 'matchers' nonterminal +// itself. Matchers represent a small sub-language for pattern-matching +// token-trees, and are thus primarily used by the macro-defining extension +// itself. +// +// MatchTok +// -------- +// +// A matcher that matches a single token, denoted by the token itself. So +// long as there's no $ involved. +// +// +// MatchSeq +// -------- +// +// A matcher that matches a sequence of sub-matchers, denoted various +// possible ways: +// +// $(M)* zero or more Ms +// $(M)+ one or more Ms +// $(M),+ one or more comma-separated Ms +// $(A B C);* zero or more semi-separated 'A B C' seqs +// +// +// MatchNonterminal +// ----------------- +// +// A matcher that matches one of a few interesting named rust +// nonterminals, such as types, expressions, items, or raw token-trees. A +// black-box matcher on expr, for example, binds an expr to a given ident, +// and that ident can re-occur as an interpolation in the RHS of a +// macro-by-example rule. For example: +// +// $foo:expr => 1 + $foo // interpolate an expr +// $foo:tt => $foo // interpolate a token-tree +// $foo:tt => bar! $foo // only other valid interpolation +// // is in arg position for another +// // macro +// +// As a final, horrifying aside, note that macro-by-example's input is +// also matched by one of these matchers. Holy self-referential! It is matched +// by a MatchSeq, specifically this one: +// +// $( $lhs:matchers => $rhs:tt );+ +// +// If you understand that, you have closed the loop and understand the whole +// macro system. Congratulations. pub type Matcher = Spanned<Matcher_>; #[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash)] |
