Home
last modified time | relevance | path

Searched refs:Pat (Results 1 - 25 of 33) sorted by relevance

12

/third_party/rust/crates/syn/tests/
H A Dtest_pat.rs10 use syn::{parse_quote, token, Item, Pat, PatTuple, Stmt, Token};
14 match Pat::parse_single.parse2(quote!(self)).unwrap() { in test_pat_ident()
15 Pat::Ident(_) => (), in test_pat_ident()
22 match Pat::parse_single.parse2(quote!(self::CONST)).unwrap() { in test_pat_path()
23 Pat::Path(_) => (), in test_pat_path()
52 let pat = Pat::parse_single.parse2(tokens).unwrap(); in test_group()
55 Pat::TupleStruct { in test_group()
64 Pat::Wild, in test_group()
72 Pat::parse_single.parse_str("..").unwrap(); in test_ranges()
73 Pat in test_ranges()
[all...]
H A Dtest_parse_quote.rs5 use syn::{parse_quote, Attribute, Field, Lit, Pat, Stmt, Token};
81 let pat: Pat = parse_quote!(Some(false) | None); in test_pat()
83 Pat::Or { in test_pat()
85 Pat::TupleStruct { in test_pat()
94 Pat::Lit(ExprLit { in test_pat()
102 Pat::Ident { in test_pat()
109 let boxed_pat: Box<Pat> = parse_quote!(Some(false) | None); in test_pat()
152 pat: Pat::Wild, in test_vec_stmt()
H A Dtest_precedence.rs192 ExprField, ExprKind, GenericArg, GenericBound, ItemKind, Local, LocalKind, Pat, Stmt, in librustc_parenthesize()
368 fn visit_pat(&mut self, pat: &mut P<Pat>) { in librustc_parenthesize()
388 use syn::{token, BinOp, Expr, ExprParen, GenericArgument, MetaNameValue, Pat, Stmt, Type}; in syn_parenthesize()
459 fn fold_pat(&mut self, pat: Pat) -> Pat { in syn_parenthesize()
514 use syn::{token, ConstParam, Expr, ExprTuple, Pat, Path}; in collect_exprs()
531 fn fold_pat(&mut self, pat: Pat) -> Pat { in collect_exprs()
H A Dtest_size.rs6 use syn::{Expr, Item, Lit, Pat, Type};
29 assert_eq!(mem::size_of::<Pat>(), 184); in test_pat_size()
/third_party/rust/crates/syn/src/
H A Dpat.rs16 pub enum Pat { enum
79 // Pat::Box(pat) => {...}
80 // Pat::Ident(pat) => {...}
82 // Pat::Wild(pat) => {...}
105 pub subpat: Option<(Token![@], Box<Pat>)>,
115 pub cases: Punctuated<Pat, Token![|]>,
125 pub pat: Box<Pat>,
136 pub pat: Box<Pat>,
155 pub elems: Punctuated<Pat, Token![,]>,
178 pub elems: Punctuated<Pat, Toke
236 impl Pat { global() impls
[all...]
H A Dparse_quote.rs141 use crate::{Block, Pat, Stmt};
185 impl ParseQuote for Pat {
187 Pat::parse_multi_with_leading_vert(input) in parse()
192 impl ParseQuote for Box<Pat> {
194 <Pat as ParseQuote>::parse(input).map(Box::new) in parse()
H A Dexpr.rs352 pub inputs: Punctuated<Pat, Token![,]>,
398 pub pat: Box<Pat>,
461 pub pat: Box<Pat>,
894 pub pat: Pat,
2108 pat: Box::new(Pat::parse_multi_with_leading_vert(input)?), in parse()
2179 let pat = Pat::parse_multi_with_leading_vert(input)?; in parse()
2453 fn closure_arg(input: ParseStream) -> Result<Pat> { in closure_arg()
2455 let mut pat = Pat::parse_single(input)?; in closure_arg()
2458 Ok(Pat::Type(PatType { in closure_arg()
2466 Pat in closure_arg()
[all...]
H A Dstmt.rs41 pub pat: Pat,
269 let mut pat = Pat::parse_single(input)?; in stmt_local()
273 pat = Pat::Type(PatType { in stmt_local()
H A Dlib.rs465 FieldPat, Pat, PatIdent, PatOr, PatParen, PatReference, PatRest, PatSlice, PatStruct, PatTuple,
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Support/
H A DGlobPattern.cpp109 GlobPattern Pat; in create() local
114 Pat.Exact = S; in create()
115 return Pat; in create()
121 Pat.Prefix = S.drop_back(); in create()
122 return Pat; in create()
127 Pat.Suffix = S.drop_front(); in create()
128 return Pat; in create()
138 Pat.Tokens.push_back(*BV); in create()
140 return Pat; in create()
H A DFileCheck.cpp1275 StringRef Prefix, SMLoc Loc, const Pattern &Pat, in PrintMatch()
1283 if (!Req.VerboseVerbose && Pat.getCheckTy() == Check::CheckEOF) in PrintMatch()
1293 SM, Loc, Pat.getCheckTy(), Buffer, MatchPos, MatchLen, Diags); in PrintMatch()
1298 Pat.getCheckTy().getDescription(Prefix), in PrintMatch()
1301 if (Pat.getCount() > 1) in PrintMatch()
1302 Message += formatv(" ({0} out of {1})", MatchedCount, Pat.getCount()).str(); in PrintMatch()
1308 Pat.printSubstitutions(SM, Buffer, MatchRange); in PrintMatch()
1316 PrintMatch(ExpectedMatch, SM, CheckStr.Prefix, CheckStr.Loc, CheckStr.Pat, in PrintMatch()
1321 StringRef Prefix, SMLoc Loc, const Pattern &Pat, in PrintNoMatch()
1344 SM, Loc, Pat in PrintNoMatch()
1274 PrintMatch(bool ExpectedMatch, const SourceMgr &SM, StringRef Prefix, SMLoc Loc, const Pattern &Pat, int MatchedCount, StringRef Buffer, size_t MatchPos, size_t MatchLen, const FileCheckRequest &Req, std::vector<FileCheckDiag> *Diags) PrintMatch() argument
1320 PrintNoMatch(bool ExpectedMatch, const SourceMgr &SM, StringRef Prefix, SMLoc Loc, const Pattern &Pat, int MatchedCount, StringRef Buffer, bool VerboseVerbose, std::vector<FileCheckDiag> *Diags, Error MatchErrors) PrintNoMatch() argument
1602 const Pattern &Pat = *PatItr; CheckDag() local
[all...]
H A DFileCheckImpl.h571 Pattern Pat; member
584 : Pat(P), Prefix(S), Loc(L) {} in FileCheckString()
/third_party/rust/crates/syn/src/gen/
H A Dclone.rs1451 impl Clone for Pat {
1454 Pat::Const(v0) => Pat::Const(v0.clone()), in clone()
1455 Pat::Ident(v0) => Pat::Ident(v0.clone()), in clone()
1456 Pat::Lit(v0) => Pat::Lit(v0.clone()), in clone()
1457 Pat::Macro(v0) => Pat::Macro(v0.clone()), in clone()
1458 Pat in clone()
[all...]
H A Deq.rs1380 impl Eq for Pat {}
1383 impl PartialEq for Pat {
1386 (Pat::Const(self0), Pat::Const(other0)) => self0 == other0, in eq()
1387 (Pat::Ident(self0), Pat::Ident(other0)) => self0 == other0, in eq()
1388 (Pat::Lit(self0), Pat::Lit(other0)) => self0 == other0, in eq()
1389 (Pat::Macro(self0), Pat in eq()
[all...]
H A Dvisit.rs614 fn visit_pat(&mut self, i: &'ast Pat) { in visit_pat()
2876 pub fn visit_pat<'ast, V>(v: &mut V, node: &'ast Pat) in visit_pat()
2881 Pat::Const(_binding_0) => { in visit_pat()
2884 Pat::Ident(_binding_0) => { in visit_pat()
2887 Pat::Lit(_binding_0) => { in visit_pat()
2890 Pat::Macro(_binding_0) => { in visit_pat()
2893 Pat::Or(_binding_0) => { in visit_pat()
2896 Pat::Paren(_binding_0) => { in visit_pat()
2899 Pat::Path(_binding_0) => { in visit_pat()
2902 Pat in visit_pat()
[all...]
H A Dhash.rs1836 impl Hash for Pat {
1842 Pat::Const(v0) => { in hash()
1846 Pat::Ident(v0) => { in hash()
1850 Pat::Lit(v0) => { in hash()
1854 Pat::Macro(v0) => { in hash()
1858 Pat::Or(v0) => { in hash()
1862 Pat::Paren(v0) => { in hash()
1866 Pat::Path(v0) => { in hash()
1870 Pat::Range(v0) => { in hash()
1874 Pat in hash()
[all...]
H A Dfold.rs615 fn fold_pat(&mut self, i: Pat) -> Pat { in fold_pat()
2619 pub fn fold_pat<F>(f: &mut F, node: Pat) -> Pat in fold_pat()
2624 Pat::Const(_binding_0) => Pat::Const(f.fold_expr_const(_binding_0)), in fold_pat()
2625 Pat::Ident(_binding_0) => Pat::Ident(f.fold_pat_ident(_binding_0)), in fold_pat()
2626 Pat::Lit(_binding_0) => Pat in fold_pat()
[all...]
H A Dvisit_mut.rs615 fn visit_pat_mut(&mut self, i: &mut Pat) { in visit_pat_mut()
2879 pub fn visit_pat_mut<V>(v: &mut V, node: &mut Pat) in visit_pat_mut()
2884 Pat::Const(_binding_0) => { in visit_pat_mut()
2887 Pat::Ident(_binding_0) => { in visit_pat_mut()
2890 Pat::Lit(_binding_0) => { in visit_pat_mut()
2893 Pat::Macro(_binding_0) => { in visit_pat_mut()
2896 Pat::Or(_binding_0) => { in visit_pat_mut()
2899 Pat::Paren(_binding_0) => { in visit_pat_mut()
2902 Pat::Path(_binding_0) => { in visit_pat_mut()
2905 Pat in visit_pat_mut()
[all...]
H A Ddebug.rs2053 impl Debug for Pat {
2055 formatter.write_str("Pat::")?; in fmt()
2057 Pat::Const(v0) => v0.debug(formatter, "Const"), in fmt()
2058 Pat::Ident(v0) => v0.debug(formatter, "Ident"), in fmt()
2059 Pat::Lit(v0) => v0.debug(formatter, "Lit"), in fmt()
2060 Pat::Macro(v0) => v0.debug(formatter, "Macro"), in fmt()
2061 Pat::Or(v0) => v0.debug(formatter, "Or"), in fmt()
2062 Pat::Paren(v0) => v0.debug(formatter, "Paren"), in fmt()
2063 Pat::Path(v0) => v0.debug(formatter, "Path"), in fmt()
2064 Pat in fmt()
[all...]
/third_party/rust/crates/syn/examples/trace-var/trace-var/src/
H A Dlib.rs7 use syn::{parse_macro_input, parse_quote, BinOp, Expr, Ident, ItemFn, Local, Pat, Stmt, Token};
51 /// Determines whether the given `Pat` is an identifier equal to one of the
54 fn should_print_pat(&self, p: &Pat) -> bool { in should_print_pat()
56 Pat::Ident(ref p) => self.vars.contains(&p.ident), in should_print_pat()
89 Pat::Ident(ref p) => &p.ident, in let_and_print()
/third_party/json/tests/thirdparty/Fuzzer/test/
H A DRepeatedMemcmp.cpp13 const char *Pat = i % 2 ? "foo" : "bar"; in LLVMFuzzerTestOneInput() local
14 if (!memcmp(Data + i, Pat, 3)) in LLVMFuzzerTestOneInput()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
H A DGlobPattern.h31 static Expected<GlobPattern> create(StringRef Pat);
35 bool matchOne(ArrayRef<BitVector> Pat, StringRef S) const;
/third_party/typescript/tests/baselines/reference/
H A DtemplateLiteralTypesPatterns.js29 type Pat<T extends string | null | undefined> = `${T}`
30 declare function nullishes(x: Pat<null | undefined>): void;
/third_party/rust/crates/syn/tests/debug/
H A Dgen.rs3072 impl Debug for Lite<syn::Pat> {
3075 syn::Pat::Const(_val) => { in fmt()
3076 formatter.write_str("Pat::Const")?; in fmt()
3082 syn::Pat::Ident(_val) => { in fmt()
3083 let mut formatter = formatter.debug_struct("Pat::Ident"); in fmt()
3097 struct Print((syn::token::At, Box<syn::Pat>)); in fmt()
3110 syn::Pat::Lit(_val) => { in fmt()
3111 formatter.write_str("Pat::Lit")?; in fmt()
3117 syn::Pat::Macro(_val) => { in fmt()
3118 formatter.write_str("Pat in fmt()
[all...]
/third_party/rust/crates/syn/tests/common/
H A Deq.rs112 use rustc_ast::ast::Pat;
501 spanless_eq_struct!(Pat; id kind span tokens);

Completed in 41 milliseconds

12