| /external/javaparser/javaparser-core/src/main/java/com/github/javaparser/utils/ |
| D | SourceRoot.java | 14 import java.nio.file.Path; 36 * by one or all together. <b>Note that</b> the internal cache used is thread-safe. 38 …Parse..." will return their result inside a "ParseResult", which supports parse successes and fail… 39 …* <li>methods called "parse..." will return "CompilationUnit"s. If a file fails to parse, an excep… 51 * @param localPath the path to the file that was parsed, relative to the source root path. 52 * @param absolutePath the absolute path to the file that was parsed. 55 Result process(Path localPath, Path absolutePath, ParseResult<CompilationUnit> result); in process() 58 private final Path root; 59 private final Map<Path, ParseResult<CompilationUnit>> cache = new ConcurrentHashMap<>(); 66 * source files within, like "javaparser/javaparser-core/src/main/java" [all …]
|
| D | SourceZip.java | 2 * Copyright (C) 2007-2010 Júlio Vilmar Gesser. 3 * Copyright (C) 2011, 2013-2016 The JavaParser Team. 30 import java.nio.file.Path; 43 …* A collection of Java source files and its sub-directories located in a ZIP or JAR file on the fi… 49 private final Path zipPath; 54 * used to parse the ZIP. 56 * @param zipPath The absolute path of ZIP file to parse. 58 public SourceZip(Path zipPath) { in SourceZip() 63 …ew ZIP parser. An instance of {@link JavaParser} with the given configuration will be used to parse 66 * @param zipPath The absolute path of ZIP file to parse. [all …]
|
| /external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
| D | HttpUrlTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 37 HttpUrl expected = HttpUrl.parse("http://host/"); in parseTrimsAsciiWhitespace() 38 assertEquals(expected, HttpUrl.parse("http://host/\f\n\t \r")); // Leading. in parseTrimsAsciiWhitespace() 39 assertEquals(expected, HttpUrl.parse("\r\n\f \thttp://host/")); // Trailing. in parseTrimsAsciiWhitespace() 40 assertEquals(expected, HttpUrl.parse(" http://host/ ")); // Both. in parseTrimsAsciiWhitespace() 41 assertEquals(expected, HttpUrl.parse(" http://host/ ")); // Both. in parseTrimsAsciiWhitespace() 42 assertEquals(expected, HttpUrl.parse("http://host/").resolve(" ")); in parseTrimsAsciiWhitespace() 43 assertEquals(expected, HttpUrl.parse("http://host/").resolve(" . ")); in parseTrimsAsciiWhitespace() 48 assertNull(HttpUrl.parse("http://" + host + "/")); in parseHostAsciiNonPrintable() 53 assertEquals("/%0B", HttpUrl.parse("http://h/\u000b").encodedPath()); // line tabulation in parseDoesNotTrimOtherWhitespaceCharacters() [all …]
|
| /external/rust/crates/syn/src/ |
| D | path.rs | 5 /// A path at which a named item is exported (e.g. `std::collections::HashMap`). 7 pub struct Path { 13 impl<T> From<T> for Path implementation 17 fn from(segment: T) -> Self { in from() 18 let mut path = Path { in from() localVariable 22 path.segments.push_value(segment.into()); in from() 23 path in from() 27 impl Path { impl 28 /// Determines whether this is a path of length 1 equal to the given 33 /// - the path has no leading colon, [all …]
|
| D | attr.rs | 9 use crate::parse::{Parse, ParseStream, Parser, Result}; 20 /// - Outer attributes like `#[repr(transparent)]`. These appear outside or 23 /// - Inner attributes like `#![feature(proc_macro)]`. These appear inside 26 /// - Outer one-line doc comments like `/// Example`. 28 /// - Inner one-line doc comments like `//! Please file an issue`. 30 /// - Outer documentation blocks `/** Example */`. 32 /// - Inner documentation blocks `/*! Please file an issue */`. 37 /// Every attribute has a `path` that indicates the intended interpretation 38 /// of the rest of the attribute's contents. The path and the optional 42 /// - Meta::Path — attributes whose information content conveys just a [all …]
|
| D | ty.rs | 12 /// [syntax tree enum]: Expr#syntax-tree-enums 19 /// A bare function type: `fn(usize) -> bool`. 41 /// A path like `std::slice::Iter`, optionally qualified with a 42 /// self-type as in `<Vec<T> as SomeTrait>::Associated`. 43 Path(TypePath), 95 /// A bare function type: `fn(usize) -> bool`. 162 /// A path like `std::slice::Iter`, optionally qualified with a 163 /// self-type as in `<Vec<T> as SomeTrait>::Associated`. 167 pub path: Path, 231 /// An argument in a function type: the `usize` in `fn(usize) -> bool`. [all …]
|
| /external/rust/crates/url/tests/ |
| D | unit.rs | 1 // Copyright 2013-2014 The rust-url developers. 3 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 4 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 5 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 14 use std::path::{Path, PathBuf}; 25 let base: Url = "sc://%C3%B1".parse().unwrap(); in test_relative() 32 let base: Url = "sc://%C3%B1".parse().unwrap(); in test_relative_empty() 39 let mut base: Url = "moz://foo:bar@servo/baz".parse().unwrap(); in test_set_empty_host() 47 let mut base: Url = "file://server/share/foo/bar".parse().unwrap(); in test_set_empty_host() 51 let mut base: Url = "file://server/share/foo/bar".parse().unwrap(); in test_set_empty_host() [all …]
|
| /external/mobile-data-download/javatests/com/google/android/libraries/mobiledatadownload/file/backends/ |
| D | AndroidUriAdapterTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 42 File file = adapter.toFile(Uri.parse("android://package/files/common/shared/path")); in shouldGenerateFileFromUri() 43 assertThat(file.getPath()).endsWith("/files/common/shared/path"); in shouldGenerateFileFromUri() 48 File file = adapter.toFile(Uri.parse("android://package/cache/common/shared/path")); in shouldGenerateCacheFromUri() 49 assertThat(file.getPath()).endsWith("/cache/common/shared/path"); in shouldGenerateCacheFromUri() 54 File file = adapter.toFile(Uri.parse("android://package/external/common/shared/path")); in shouldGenerateFileFromExternalLocationUri() 55 assertThat(file.getPath()).endsWith("/external-files/common/shared/path"); in shouldGenerateFileFromExternalLocationUri() 60 File file = adapter.toFile(Uri.parse("android://package/managed/common/shared/path")); in managedLocation_withSharedAccount_doesNotRequireAccountManager() 61 assertThat(file.getPath()).endsWith("/files/managed/common/shared/path"); in managedLocation_withSharedAccount_doesNotRequireAccountManager() 68 () -> in managedLocation_withAccount_requiresAccountManager() [all …]
|
| /external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/resolution/ |
| D | AnalyseNewJavaParserTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 31 import java.nio.file.Path; 41 private static final Path root = adaptPath("src/test/test_sourcecode/javaparser_new_src"); 42 …private static final Path src = adaptPath("src/test/test_sourcecode/javaparser_new_src/javaparser-… 48 …new JavaParserTypeSolver(root.resolve("javaparser-generated-sources"), new LeanParserConfiguration… in getSourceFileInfoExtractor() 57 static String readFile(Path file) in readFile() 65 private void parse(String fileName) throws IOException { in parse() method in AnalyseNewJavaParserTest 66 Path sourceFile = src.resolve(fileName + ".java"); in parse() 75 Path expectedOutput = root.resolve("expected_output"); in parse() 76 Path path = expectedOutput.resolve(fileName.replaceAll("/", "_") + ".txt"); in parse() local [all …]
|
| D | AnalyseJavaParserTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 32 import java.nio.file.Path; 39 private static final Path root = adaptPath("src/test/test_sourcecode/javaparser_src"); 40 private static final Path properSrc = root.resolve("proper_source"); 52 private static String readFile(Path file) in readFile() 60 private void parse(String fileName) throws IOException { in parse() method in AnalyseJavaParserTest 61 Path sourceFile = properSrc.resolve( fileName + ".java"); in parse() 71 String path = "expected_output/" + fileName.replaceAll("/", "_") + ".txt"; in parse() local 72 Path dstFile = adaptPath(root.resolve(path)); in parse() 78 …ertEquals(0, sourceFileInfoExtractor.getFailures(), "No failures expected when analyzing " + path); in parse() [all …]
|
| D | AnalyseJavaSymbolSolver060Test.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 31 import java.nio.file.Path; 43 private static final Path root = adaptPath("src/test/test_sourcecode/javasymbolsolver_0_6_0"); 44 private static final Path src = root.resolve("src"); 45 private static final Path lib = root.resolve("lib"); 46 private static final Path expectedOutput = root.resolve("expected_output"); 52 new JavaParserTypeSolver(new File(src + "/java-symbol-solver-core")), in getSourceFileInfoExtractor() 53 new JavaParserTypeSolver(new File(src + "/java-symbol-solver-logic")), in getSourceFileInfoExtractor() 54 new JavaParserTypeSolver(new File(src + "/java-symbol-solver-model")), in getSourceFileInfoExtractor() 55 new JarTypeSolver(lib + "/guava-21.0.jar"), in getSourceFileInfoExtractor() [all …]
|
| /external/crosvm/cros_fdt/src/ |
| D | path.rs | 2 // Use of this source code is governed by a BSD-style license that can be 5 //! This module implements DT path handling. 19 /// Device tree path. 21 pub struct Path(String); struct 23 impl Path { implementation 24 // Verify path and strip unneeded characters. 25 fn sanitize(path: &str) -> Result<String> { in sanitize() 26 if path.is_empty() || !path.starts_with(PATH_SEP) { in sanitize() 27 return Err(Error::InvalidPath(format!("{path} is not absolute"))); in sanitize() 28 } else if path == PATH_SEP { in sanitize() [all …]
|
| /external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ |
| D | JavaParser.java | 2 * Copyright (C) 2007-2010 Júlio Vilmar Gesser. 3 * Copyright (C) 2011, 2013-2016 The JavaParser Team. 43 import java.nio.file.Path; 51 * Parse Java source code and creates Abstract Syntax Trees. 103 * @return the parse result, a collection of encountered problems, and some extra data. 105 public <N extends Node> ParseResult<N> parse(ParseStart<N> start, Provider provider) { in parse() method in JavaParser 115 N resultNode = start.parse(parser); in parse() 118 configuration.getPostProcessors().forEach(postProcessor -> in parse() 146 public ParseResult<CompilationUnit> parse(final InputStream in, Charset encoding) { in parse() method in JavaParser 147 return parse(COMPILATION_UNIT, provider(in, encoding)); in parse() [all …]
|
| /external/python/cpython3/Lib/test/ |
| D | test_urlparse.py | 4 import urllib.parse 11 # Each parse_qsl testcase is a two-tuple that contains 41 # Each parse_qs testcase is a two-tuple that contains 74 result = urllib.parse.urlparse(url) 76 t = (result.scheme, result.netloc, result.path, 80 result2 = urllib.parse.urlunparse(result) 84 # the result of geturl() is a fixpoint; we can always parse it 86 result3 = urllib.parse.urlparse(result.geturl()) 91 self.assertEqual(result3.path, result.path) 101 result = urllib.parse.urlsplit(url) [all …]
|
| /external/crosvm/src/crosvm/plugin/ |
| D | config.rs | 2 // Use of this source code is governed by a BSD-style license that can be 7 use std::path::PathBuf; 26 fn from_str(value: &str) -> Result<Self, Self::Err> { in from_str() 31 "`plugin-mount` should be in a form of: <src>[:[<dst>][:<writable>]]", in from_str() 39 "the source path for `plugin-mount` must be absolute", in from_str() 45 "the source path for `plugin-mount` does not exist", in from_str() 51 Some(path) => path, in from_str() 56 "the destination path for `plugin-mount` must be absolute", in from_str() 62 Some(s) => s.parse().map_err(|_| { in from_str() 65 "the <writable> component for `plugin-mount` is not valid bool", in from_str() [all …]
|
| /external/rust/crates/toml/src/ |
| D | macros.rs | 15 /// travis-ci = { repository = "alexcrichton/toml-rs" } 20 /// [dev-dependencies] 40 // TT-muncher to parse TOML syntax into a toml::Value. 42 // @toplevel -- Parse tokens outside of an inline table or inline array. In 46 // @topleveldatetime -- Helper to parse a Datetime from string and insert it 49 // @path -- Turn a path segment into a string. Segments that look like idents 53 // @value -- Parse the value part of a `key = value` pair, which may be a 56 // @table -- Parse the contents of an inline table, returning them as a 59 // @tabledatetime -- Helper to parse a Datetime from string and insert it 62 // @array -- Parse the contents of an inline array, returning them as a [all …]
|
| /external/rust/crates/strum_macros/src/helpers/ |
| D | metadata.rs | 4 parse::{Parse, ParseStream}, 7 Attribute, DeriveInput, Expr, ExprLit, Ident, Lit, LitBool, LitStr, Meta, MetaNameValue, Path, 45 crate_module_path: Path, 50 impl Parse for EnumMeta { 51 fn parse(input: ParseStream) -> syn::Result<Self> { in parse() method 54 let kw = input.parse::<kw::serialize_all>()?; in parse() 55 input.parse::<Token![=]>()?; in parse() 56 let case_style = input.parse()?; in parse() 59 let kw = input.parse::<kw::Crate>()?; in parse() 60 input.parse::<Token![=]>()?; in parse() [all …]
|
| /external/rust/crates/linkme-impl/src/ |
| D | element.rs | 5 use syn::parse::{Error, Parse, ParseStream, Result}; 9 Generics, Ident, Path, ReturnType, Token, Type, TypeBareFn, Visibility, WhereClause, 23 impl Parse for Element { 24 fn parse(input: ParseStream) -> Result<Self> { in parse() method 27 let vis: Visibility = input.parse()?; in parse() 28 let static_token: Option<Token![static]> = input.parse()?; in parse() 30 let mut_token: Option<Token![mut]> = input.parse()?; in parse() 37 let ident: Ident = input.parse()?; in parse() 38 input.parse::<Token![:]>()?; in parse() 40 let ty: Type = input.parse()?; in parse() [all …]
|
| D | args.rs | 1 use syn::parse::{Error, Parse, ParseStream, Result}; 2 use syn::{LitInt, Path, Token}; 6 Path(Path), enumerator 7 PathPos(Path, usize), 10 impl Parse for Args { 11 fn parse(input: ParseStream) -> Result<Self> { in parse() method 15 let path: Path = input.parse()?; in parse() localVariable 17 return Ok(Args::Path(path)); in parse() 19 input.parse::<Token![,]>()?; in parse() 20 let lit: LitInt = input.parse()?; in parse() [all …]
|
| /external/python/cpython3/Lib/ |
| D | nturl2path.py | 3 This module only exists to provide OS-specific code 9 """OS-specific conversion from a relative URL of the 'file' scheme 10 to a file system path; not recommended for general use.""" 17 import string, urllib.parse 23 # path is something like ////host/path/on/remote/host 24 # convert this to \\host\path\on\remote\host 25 # (notice halving of slashes at the start of the path) 28 # make sure not to convert quoted slashes :-) 29 return urllib.parse.unquote('\\'.join(components)) 31 if len(comp) != 2 or comp[0][-1] not in string.ascii_letters: [all …]
|
| /external/mobile-data-download/javatests/com/google/android/libraries/mobiledatadownload/file/common/internal/ |
| D | LiteTransformFragmentsTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 32 Uri uri = Uri.parse("scheme:path"); in parseAbsentTransformFragment_yieldsEmpty() 38 Uri uri = Uri.parse("scheme:path#"); in parseEmptyTransformFragment_yieldsEmpty() 44 Uri uri = Uri.parse("scheme:path#nontransform"); in parseNonTransformFragment_yieldsEmpty() 50 Uri uri = Uri.parse("scheme:path#transform=simple"); in parseSimpleTransformFragment_yieldsSpec() 56 Uri uri = Uri.parse("scheme:path#transform=M1X_d"); in parseMixedTransformFragment_yieldsSpec() 63 Uri uri = Uri.parse("scheme:path#transform=INVALID%3D"); in parseEncodedTransformFragment_yieldsInvalidSpec() 69 Uri uri = Uri.parse("scheme:path#transform=beforeother&other"); in parseTransformBeforeOtherFragment_yieldsSpec() 75 Uri uri = Uri.parse("scheme:path#nontransform&transform=afterother"); in parseTransformAfterOtherFragment_yieldsEmpty() 81 Uri uri = Uri.parse("scheme:path#transform=first+second+third"); in parseMultipleTransformFragments_yieldsAllSpecs() [all …]
|
| /external/google-cloud-java/java-vision/ |
| D | owlbot.py | 7 # https://www.apache.org/licenses/LICENSE-2.0 39 * Formats a string containing the fully-qualified path to represent a location resource. 51 * Formats a string containing the fully-qualified path to represent a product resource. 64 * Formats a string containing the fully-qualified path to represent a product_set resource. 78 * Formats a string containing the fully-qualified path to represent a reference_image resource. 93 * Parses the project from the given fully-qualified path which represents a location resource. 99 return LOCATION_PATH_TEMPLATE.parse(locationName).get("project"); 103 * Parses the location from the given fully-qualified path which represents a location resource. 109 return LOCATION_PATH_TEMPLATE.parse(locationName).get("location"); 113 * Parses the project from the given fully-qualified path which represents a product resource. [all …]
|
| /external/rust/cxx/gen/src/ |
| D | file.rs | 3 use syn::parse::discouraged::Speculative; 4 use syn::parse::{Error, Parse, ParseStream, Result}; 11 impl Parse for File { 12 fn parse(input: ParseStream) -> Result<Self> { in parse() method 15 parse(input, &mut modules)?; in parse() 20 fn parse(input: ParseStream, modules: &mut Vec<Module>) -> Result<()> { in parse() function 26 let path = &attr.path().segments; in parse() localVariable 27 if path.len() == 2 && path[0].ident == "cxx" && path[1].ident == "bridge" { in parse() 35 ahead.parse::<Visibility>()?; in parse() 36 ahead.parse::<Option<Token![unsafe]>>()?; in parse() [all …]
|
| /external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/ast/ |
| D | CompilationUnitTest.java | 2 * Copyright (C) 2007-2010 Júlio Vilmar Gesser. 3 * Copyright (C) 2011, 2013-2016 The JavaParser Team. 27 import java.nio.file.Path; 30 import static com.github.javaparser.StaticJavaParser.parse; 37 CompilationUnit compilationUnit = parse("// This is my class, with my comment\n" + in issue578TheFirstCommentIsWithinTheCompilationUnit() 47 …Path sourceRoot = mavenModuleRoot(CompilationUnitTest.class).resolve(Paths.get("src", "test", "res… in testGetSourceRoot() 48 … Path testFile = sourceRoot.resolve(Paths.get("com", "github", "javaparser", "storage", "Z.java")); in testGetSourceRoot() 50 CompilationUnit cu = parse(testFile); in testGetSourceRoot() 51 Path sourceRoot1 = cu.getStorage().get().getSourceRoot(); in testGetSourceRoot() 57 assertThrows(RuntimeException.class, () -> { in testGetSourceRootWithBadPackageDeclaration() [all …]
|
| /external/linux-kselftest/tools/testing/selftests/bpf/ |
| D | test_bpftool_synctypes.py | 2 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 10 LINUX_ROOT = os.path.abspath(os.path.join(__file__, 13 os.path.join(LINUX_ROOT, 'tools/bpf/bpftool')) 15 os.path.join(BPFTOOL_DIR, 'bash-completion')) 17 os.path.join(BPFTOOL_DIR, 'Documentation')) 19 os.path.join(LINUX_ROOT, 'tools/include')) 26 @reader: a pointer to the open file to parse 34 @start_marker: regex marking the beginning of a structure to parse 42 def parse(self, pattern, end_marker): member in BlockParser 44 Parse a block and return a set of values. Values to extract must be [all …]
|