aboutsummaryrefslogtreecommitdiff
path: root/Sources/WmapParser/Constants.swift
blob: e659c0337a5acbf2859b6cb0b5fb4d44aeac1d3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
extension WmapParser {
    // Whitespace
    static let kNewline = 10
    static let kCarriageReturn = 13
    static let kTab = 9
    static let kSpace = 32

    // Punctuation
    static let kOpenParenthesis = 40
    static let kCloseParenthesis = 41
    static let kPlus = 43
    static let kComma = 44
    static let kDash = 45
    static let kPeriod = 46
    static let kGreaterThan = 62
    static let kOpenSquareBracket = 91
    static let kCloseSquareBracket = 93

    // Letters
    static let kCapitalA = 65
    static let kCapitalZ = 90
    static let kCapsToLowercaseDistance: UInt8 = 32

    // Numbers
    static let kZero = 48
    static let kNine = 57

    // Keywords. ASCII representations of the keywords.
    static let kInertiaKeyword: [UInt8] = [105, 110, 101, 114, 116, 105, 97]
    static let kEvolutionKeyword: [UInt8] = [101, 118, 111, 108, 117, 116, 105, 111, 110]
    static let kNoteKeyword: [UInt8] = [110, 111, 116, 101]
    static let kGroupKeyword: [UInt8] = [103, 114, 111, 117, 112]
    static let kIKeyword: [UInt8] = [105]
    static let kIIKeyword: [UInt8] = [105, 105]
    static let kIIIKeyword: [UInt8] = [105, 105, 105]
    static let kIVKeyword: [UInt8] = [105, 118]
}