Began implementing fully isomorphic macros

Like Rust's Proc macros. Now we have preprocessor recursion to worry about. I also made a cool macro for enums
This commit is contained in:
2024-10-14 00:13:09 +02:00
parent 84cbcdd4fe
commit 3a3ae98aff
66 changed files with 2302 additions and 1164 deletions

View File

@@ -2,13 +2,17 @@ use std::ops::Range;
use orchid_api_derive::Coding;
use crate::interner::TStrv;
use crate::{TStr, TStrv};
#[derive(Clone, Debug, Coding)]
pub enum Location {
/// Location inaccessible. Locations are always debugging aids and never
/// mandatory.
None,
/// Associated with a slot when wrapped in an expression.
SlotTarget,
/// Used in functions to denote the generated code that carries on the
/// location of the call. Not allowed in the const tree.
/// location of the call.
Inherit,
Gen(CodeGenInfo),
/// Range and file
@@ -26,5 +30,5 @@ pub struct SourceRange {
#[derive(Clone, Debug, Coding)]
pub struct CodeGenInfo {
pub generator: TStrv,
pub details: String,
pub details: TStr,
}