blue_lang_syntax/
spelling.rs1use 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 MapPun,
18 NilTest,
19 NewlineEscape,
20}
21
22impl Spelling {
23 pub const ALL: &'static [Spelling] = &[
24 Spelling::LogicalSymbol,
25 Spelling::Unless,
26 Spelling::ElseIf,
27 Spelling::CallForm,
28 Spelling::KeywordRocket,
29 Spelling::ParameterList,
30 Spelling::OperatorSpelling,
31 Spelling::TrailingComma,
32 Spelling::NegatedComparison,
33 Spelling::ElseNil,
34 Spelling::TryCatch,
35 Spelling::Apply,
36 Spelling::MapPun,
37 Spelling::NilTest,
38 Spelling::NewlineEscape,
39 ];
40}
41
42#[derive(Clone, Debug, PartialEq, Eq)]
43pub struct Note {
44 pub spelling: Spelling,
45 pub span: Span,
46 pub written: String,
47 pub canonical: String,
48}