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