Giter Site home page Giter Site logo

cppnet's People

Contributors

xoofx avatar xtravar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cppnet's Issues

Stripping #line directives

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 newline should be added at end of included files, if not present

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?)

Crash On Unknown Directive

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.