Skip to content

Implement enum abstract + fully qualified path functionality.#15

Merged
Jamextreme140 merged 3 commits intoCodenameCrew:codename-devfrom
HEIHUAa:enum
Mar 17, 2026
Merged

Implement enum abstract + fully qualified path functionality.#15
Jamextreme140 merged 3 commits intoCodenameCrew:codename-devfrom
HEIHUAa:enum

Conversation

@HEIHUAa
Copy link

@HEIHUAa HEIHUAa commented Mar 12, 2026

No description provided.

@HEIHUAa HEIHUAa changed the title Implemented enum abstract related features. Implement enum abstract + fully qualified path functionality. Mar 12, 2026
@Jamextreme140
Copy link
Collaborator

path functionality?

@HEIHUAa
Copy link
Author

HEIHUAa commented Mar 12, 2026

path functionality?

I'm still testing this and it's not ready to add yet. I should convert it to a draft for now.

@HEIHUAa HEIHUAa marked this pull request as draft March 12, 2026 05:54
@Jamextreme140
Copy link
Collaborator

oh ok

@HEIHUAa HEIHUAa marked this pull request as ready for review March 12, 2026 21:22
@HEIHUAa
Copy link
Author

HEIHUAa commented Mar 12, 2026

Extended functionality implemented. Newly added:

enum abstract Color(Int) {
    Red = 1;
    Green = 2;
}
trace(Color.Red); // 1

The (Int) in enum abstract Color(Int) can now be omitted.

Added EnumValueTools and EnumTools related functionality.

path.class.function(); can now be used directly without the previous requirement of:

import path.class;
class.function();

@Jamextreme140
Copy link
Collaborator

Alright.

Thanks for bringing the enum abstract support and the full class path access

:3

@Jamextreme140 Jamextreme140 merged commit 65fe06f into CodenameCrew:codename-dev Mar 17, 2026
@Jamextreme140
Copy link
Collaborator

Just fixed a small typo in the implementation.

enum abstract fields should be declared with var:

enum abstract Color(Int) {
    var Red = 1;
    var Green = 2;
}
trace(Color.Red); // 1

also, I did the implicit value for String.

@HEIHUAa
Copy link
Author

HEIHUAa commented Mar 18, 2026

Just fixed a small typo in the implementation.

enum abstract fields should be declared with var:

enum abstract Color(Int) {
    var Red = 1;
    var Green = 2;
}
trace(Color.Red); // 1

also, I did the implicit value for String.

Thank you for helping me fix it.

@HEIHUAa HEIHUAa deleted the enum branch March 18, 2026 11:47
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