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