Skip to content

feat(parser): allow syntax sugar with const #127

Description

@kshku

Currently

const fn FunctionName() {}

const type TypeName {}

const type TypeName TypeInstName {}

is not possible, which should be equivalent to

const FunctionName = fn() {}
const TypeName = type {}
const TypeInstName = type TypeName {}

TODO: What to do with const before the value? (like const fn () {}, const type {}, etc?) Should they throw error similar to how const 5 is not allowed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestparserRelated to parser

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions