about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-11-08 18:33:30 -0800
committerKartik Agaram <vc@akkartik.com>2021-11-08 18:33:30 -0800
commit11a191c2906fbaa2d80192da833b727984cf8f94 (patch)
tree29393446e1423b18115fcc488292dad0bddfe49d
parentd7389e15a86b2c9d6a35c578c325ee2c0dfa3926 (diff)
downloadmu-11a191c2906fbaa2d80192da833b727984cf8f94.tar.gz
syntax highlighting bundle for TextMate
-rw-r--r--editor/Mu.tmbundle/Syntaxes/Mu.tmLanguage96
-rw-r--r--editor/Mu.tmbundle/info.plist16
2 files changed, 112 insertions, 0 deletions
diff --git a/editor/Mu.tmbundle/Syntaxes/Mu.tmLanguage b/editor/Mu.tmbundle/Syntaxes/Mu.tmLanguage
new file mode 100644
index 00000000..64f71320
--- /dev/null
+++ b/editor/Mu.tmbundle/Syntaxes/Mu.tmLanguage
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>fileTypes</key>
+	<array>
+		<string>mu</string>
+	</array>
+	<key>name</key>
+	<string>Mu</string>
+	<key>patterns</key>
+	<array>
+		<dict>
+			<key>match</key>
+			<string>#.*</string>
+			<key>name</key>
+			<string>comment.line.mu</string>
+		</dict>
+		<dict>
+			<key>match</key>
+			<string> &lt;- </string>
+			<key>name</key>
+			<string>meta.operator.mu</string>
+		</dict>
+		<dict>
+			<key>match</key>
+			<string>\b(return|break[^ ]*|loop[^ ]*)</string>
+			<key>name</key>
+			<string>keyword.control.mu</string>
+		</dict>
+		<dict>
+			<key>match</key>
+			<string>\b[^ ]*:\b</string>
+			<key>name</key>
+			<string>constant.other.label.mu</string>
+		</dict>
+		<dict>
+			<key>match</key>
+			<string>^fn|-&gt;\b</string>
+			<key>name</key>
+			<string>meta.function.mu</string>
+		</dict>
+		<dict>
+			<key>match</key>
+			<string>\bvar\b</string>
+			<key>name</key>
+			<string>storage.type.var.mu</string>
+		</dict>
+		<dict>
+			<key>match</key>
+			<string>\b(addr|array|boolean|byte|code-point|grapheme|handle|int|float|stream|type)\b</string>
+			<key>name</key>
+			<string>storage.type.mu</string>
+		</dict>
+		<dict>
+			<key>begin</key>
+			<string>"</string>
+			<key>end</key>
+			<string>"</string>
+			<key>name</key>
+			<string>string.quoted.double.mu</string>
+			<key>patterns</key>
+			<array>
+				<dict>
+					<key>match</key>
+					<string>\.</string>
+					<key>name</key>
+					<string>constant.character.escape</string>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>match</key>
+			<string>\b(0x\h+|[0-9])\b</string>
+			<key>name</key>
+			<string>constant.numeric.integer.mu</string>
+		</dict>
+		<dict>
+			<key>match</key>
+			<string>\b([0-9][0-9a-f]+)\b</string>
+			<key>name</key>
+			<string>invalid.illegal.constant.numeric</string>
+		</dict>
+		<dict>
+			<key>match</key>
+			<string>\b([0-9a-zA-Z][0-9a-zA-Z])\b</string>
+			<key>name</key>
+			<string>invalid.illegal.constant.numeric</string>
+		</dict>
+	</array>
+	<key>scopeName</key>
+	<string>source.mu</string>
+	<key>uuid</key>
+	<string>766C3FEA-ED70-4B61-B17B-79E6ECE54036</string>
+</dict>
+</plist>
diff --git a/editor/Mu.tmbundle/info.plist b/editor/Mu.tmbundle/info.plist
new file mode 100644
index 00000000..8f3292b8
--- /dev/null
+++ b/editor/Mu.tmbundle/info.plist
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>contactEmailRot13</key>
+	<string>zh.grkgzngr@nxxnegvx.pbz</string>
+	<key>contactName</key>
+	<string>Kartik Agaram</string>
+	<key>description</key>
+	<string>Bundle for Mu: https://github.com/akkartik/mu</string>
+	<key>name</key>
+	<string>Mu</string>
+	<key>uuid</key>
+	<string>24559A54-666E-40D4-A561-C9A49DD9B675</string>
+</dict>
+</plist>