Standardized internal path handling on Posix separators.

There were several possible bugs involving paths not being
recognized as being the same on Windows. Rather than trying
to ensure all code deals with / and \ correctly, paths now
get transformed to / on input, fixing all current and
future such bugs.

Tested: on OS X.
This commit is contained in:
Wouter van Oortmerssen
2017-05-18 17:18:43 -07:00
parent 3d2cf554d7
commit aaf5598a03
4 changed files with 46 additions and 20 deletions

View File

@@ -510,6 +510,8 @@ class Parser : public ParserState {
// directory.
// If the source was loaded from a file and isn't an include file,
// supply its name in source_filename.
// All paths specified in this call must be in posix format, if you accept
// paths from user input, please call PosixPath on them first.
bool Parse(const char *_source, const char **include_paths = nullptr,
const char *source_filename = nullptr);