Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

Procedural macros #9

Description

@Gipson62

There's a need for procedural macros, honestly. Like, the user could just put:

#[derive(atlas_core::Lexer)]
pub struct MyLexer;

#[derive(atlas_core::TokenKind)]
pub enum TokenKind {
  #[symbol('(')]
  LParen
  #[symbol(')')]
  RParen
  #[keyword("import"]
  KwImport
}

#[derive(atlas_core::Literal)
pub enum Literal {
  #[number(i64)]
  #[trailing("_i64", "_int")]
  I64(i64)
}

And it would generate the lexer based on the user needs

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions