Esempio n. 1
0
 private static bool AreEqual(string pattern, PathLexerContext context)
 {
     return(pattern.Length == context.GetSymbolsCount() &&
            Enumerable.SequenceEqual(pattern, context.InputString.Skip(context.StartPosition).Take(context.GetSymbolsCount())));
 }
Esempio n. 2
0
 private static bool IsValidSubdirectory(PathLexerContext context)
 {
     return(SimpleFileSystemEnvironment.IsValidSubdirectory(context.InputString.Skip(context.StartPosition).Take(context.GetSymbolsCount())));
 }
Esempio n. 3
0
 public static bool IsPathDelimiterMattching(PathLexerContext context)
 {
     return(!IsRootDirectoryMattching(context) &&
            context.GetSymbolsCount() == 1 &&
            context.InputString[context.StartPosition] == SimpleFileSystemEnvironment.PathDelimiter);
 }