Skip to content

Adds TypeStatement for declaring new types#1597

Merged
TwitchBronBron merged 12 commits intov1from
type_assignment_statment
Dec 9, 2025
Merged

Adds TypeStatement for declaring new types#1597
TwitchBronBron merged 12 commits intov1from
type_assignment_statment

Conversation

@markwpearce
Copy link
Collaborator

@markwpearce markwpearce commented Nov 25, 2025

Adds type newTypeName = <other type> statement, useful for declaring type shorthands.

eg:

type number = float or integer or double

function sum(x as number, y as number) as number
    return x + y
end function

Hovers:
image

Code Completion:
image

Validation:
image

To do:

  • Add new CustomType WrappedType class so we can create custom toString() methods for these types
  • Update Hovers so it shows the new type name
  • Add Scope Validation tests
  • Deal with name collisions
  • Add documentation

@markwpearce markwpearce added this to the v1.0.0 milestone Nov 25, 2025
@markwpearce markwpearce marked this pull request as ready for review November 30, 2025 01:00
@TwitchBronBron TwitchBronBron merged commit e7159d2 into v1 Dec 9, 2025
8 checks passed
@TwitchBronBron TwitchBronBron deleted the type_assignment_statment branch December 9, 2025 13:09
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