xtravar / cppnet Goto Github PK
View Code? Open in Web Editor NEWQuick and dirty port of jcpp to .NET, with features to support Clang preprocessing
License: Apache License 2.0
Quick and dirty port of jcpp to .NET, with features to support Clang preprocessing
License: Apache License 2.0
If you pass a file with any unknown directive like:
#notgood
You get a crash processing a token:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at CppNet.Preprocessor._token()
at CppNet.Preprocessor.token()
This probably shouldn't crash... it should probably return some unknown directive type. At worst it should output a reasonable error message and fail to parse.
At the moment, CppNet does not add a newline at the end of an included file, if there is not already one present. This creates a problem, because the #line
directive when you come back to the original file ends up on the same line as the last line of the include:
// this is the original file
#line 1 "Include.hlsl"
// this is the include file
int a; #line 43 "OriginalFile.hlsl"
// carry on with the original file
According to this SO answer, all preprocessors these days detect this case, and add a newline for you.
I've had a look, but I'm not entirely sure where this should be added in CppNet. Any ideas?
(By the way, @xoofx, have you hit this issue in Paradox?)
It seems like if the input file contains existing #line
directives they are stripped out. It would be better for CppNet to just ignore them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.