Skip to content

Add support for negative const values#125

Open
OleRoss wants to merge 3 commits into
Cysharp:mainfrom
OleRoss:feat/include-negative-const-values
Open

Add support for negative const values#125
OleRoss wants to merge 3 commits into
Cysharp:mainfrom
OleRoss:feat/include-negative-const-values

Conversation

@OleRoss

@OleRoss OleRoss commented Feb 15, 2026

Copy link
Copy Markdown

I was not able to get negative constants to generate for csharp:

pub const CONST_I32: i32 = -1;

I believe this is related to #52, which added support for unary enum expressions.

This PR adds the necessary logic by handling unary expr as well. Additionally looks for the bottom expression to handle parenthesized expressions

@TechInterMezzo

Copy link
Copy Markdown

@neuecc @guitarrapc Could you please have a look at this PR? That would also solve my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants