use crate::Span;
use bitflags::bitflags;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct SyntaxToken {
pub ty: SyntaxType,
pub modifiers: SyntaxModifiers,
pub span: Span,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum SyntaxType {
Keyword,
Punctuation,
Operator,
Number,
Boolean,
Comment,
Parameter,
LayoutQualifier,
UncheckedIdent,
Ident,
UnresolvedIdent,
Invalid,
ObjectMacro,
FunctionMacro,
Directive,
DirectiveConcat,
DirectiveHash,
DirectiveName,
DirectiveVersion,
DirectiveProfile,
DirectiveExtName,
DirectiveExtBehaviour,
DirectiveLineNumber,
DirectiveError,
DirectivePragma,
}
bitflags! {
pub struct SyntaxModifiers: u32 {
const MACRO_SIGNATURE = 0b00000001;
const MACRO_BODY = 0b00000010;
const UNDEFINE = 0b00000100;
const CONDITIONAL = 0b00001000;
}
}