Skip to content

A newline should be added at end of included files, if not present #3

@tgjones

Description

@tgjones

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions