aboutsummaryrefslogtreecommitdiff
path: root/Sources/WmapParser/Constants.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2025-12-13 01:17:52 +0100
committerRuben Beltran del Rio <jj@r.bdr.sh>2025-12-14 09:15:07 +0100
commit03f1a7389afeadf9aa2b1d62a38e5cb0a2a7e60d (patch)
tree2efefc34a61c62d55d8436180acfc3590287f5fd /Sources/WmapParser/Constants.swift
Initial implementation
Diffstat (limited to 'Sources/WmapParser/Constants.swift')
-rw-r--r--Sources/WmapParser/Constants.swift35
1 files changed, 35 insertions, 0 deletions
diff --git a/Sources/WmapParser/Constants.swift b/Sources/WmapParser/Constants.swift
new file mode 100644
index 0000000..73340b6
--- /dev/null
+++ b/Sources/WmapParser/Constants.swift
@@ -0,0 +1,35 @@
+// Whitespace
+let kNewline = 10
+let kCarriageReturn = 13
+let kTab = 9
+let kSpace = 32
+
+// Punctuation
+let kOpenParenthesis = 40
+let kCloseParenthesis = 41
+let kPlus = 43
+let kComma = 44
+let kDash = 45
+let kPeriod = 46
+let kGreaterThan = 62
+let kOpenSquareBracket = 91
+let kCloseSquareBracket = 93
+
+// Letters
+let kCapitalA = 65
+let kCapitalZ = 90
+let kCapsToLowercaseDistance: UInt8 = 32
+
+// Numbers
+let kZero = 48
+let kNine = 57
+
+// Keywords. ASCII representations of the keywords.
+let kInertiaKeyword: [UInt8] = [105, 110, 101, 114, 116, 105, 97]
+let kEvolutionKeyword: [UInt8] = [101, 118, 111, 108, 117, 116, 105, 111, 110]
+let kNoteKeyword: [UInt8] = [110, 111, 116, 101]
+let kGroupKeyword: [UInt8] = [103, 114, 111, 117, 112]
+let kIKeyword: [UInt8] = [105]
+let kIIKeyword: [UInt8] = [105, 105]
+let kIIIKeyword: [UInt8] = [105, 105, 105]
+let kIVKeyword: [UInt8] = [105, 118]