Skip to main content

blue_lang_syntax/
spelling.rs

1use crate::lex::Span;
2
3#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
4pub enum Spelling {
5    LogicalSymbol,
6    Unless,
7    ElseIf,
8    CallForm,
9    KeywordRocket,
10    ParameterList,
11    OperatorSpelling,
12    TrailingComma,
13    NegatedComparison,
14    ElseNil,
15    TryCatch,
16    Apply,
17}
18
19impl Spelling {
20    pub const ALL: &'static [Spelling] = &[
21        Spelling::LogicalSymbol,
22        Spelling::Unless,
23        Spelling::ElseIf,
24        Spelling::CallForm,
25        Spelling::KeywordRocket,
26        Spelling::ParameterList,
27        Spelling::OperatorSpelling,
28        Spelling::TrailingComma,
29        Spelling::NegatedComparison,
30        Spelling::ElseNil,
31        Spelling::TryCatch,
32        Spelling::Apply,
33    ];
34}
35
36#[derive(Clone, Debug, PartialEq, Eq)]
37pub struct Note {
38    pub spelling: Spelling,
39    pub span: Span,
40    pub written: String,
41    pub canonical: String,
42}