using NubLang.Diagnostics;

namespace NubLang.Syntax;

public enum Symbol
{
    // Control
    If,
    Else,
    While,
    Break,
    Continue,
    Return,
    Let,
    Defer,

    // Declaration
    Func,
    Struct,
    
    // Modifier
    Extern,
    Export,
    
    Colon,
    DoubleColon,
    OpenParen,
    CloseParen,
    OpenBrace,
    CloseBrace,
    OpenBracket,
    CloseBracket,
    Comma,
    Period,
    Assign,
    Bang,
    Equal,
    NotEqual,
    LessThan,
    LessThanOrEqual,
    GreaterThan,
    GreaterThanOrEqual,
    Plus,
    Minus,
    Star,
    ForwardSlash,
    Caret,
    Ampersand,
    Semi,
    Percent,
    LeftShift,
    RightShift,
    Pipe,
    And,
    Or,
    Module,
    Import,
    At,
    QuestionMark
}

public abstract record Token(SourceSpan Span);

public record IdentifierToken(SourceSpan Span, string Value) : Token(Span);

public record IntLiteralToken(SourceSpan Span, string Value, int Base) : Token(Span);

public record StringLiteralToken(SourceSpan Span, string Value) : Token(Span);

public record BoolLiteralToken(SourceSpan Span, bool Value) : Token(Span);

public record FloatLiteralToken(SourceSpan Span, string Value) : Token(Span);

public record SymbolToken(SourceSpan Span, Symbol Symbol) : Token(Span);