xtravar/CppNet — pull request #1 by xoofx (2014-12-06 01:07:28+00:00)
Title: Add support for StringLexerSource.getName() and null filename with Feature.LINEMARKERS

Hi there!

First of all, many thanks for porting this!

I have been always looking for a C preprocessor library for .NET but too lazy to port or develop this kind of code, so I was always using native code (like D3DPreprocess from Direct3D) to preprocess C files from C#. So this project is going to help a lot! (plus D3DPreprocess was messing the output by introducing spaces colums in output lines, anyway...)

This pull request just add support for using a `StringLexerSource` with a filename (in case of loading a file that is not on the disk but we still want to provide a meaningful line marker).

It also fixes a `NullReferenceException` occuring in `MacroTokenSource` when the filename was not set and the `Feature.LINEMARKERS` enabled.