about summary refs log tree commit diff stats
path: root/editor/VSCode/syntaxes
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-11-08 18:49:15 -0800
committerKartik Agaram <vc@akkartik.com>2021-11-08 18:49:15 -0800
commit2bac01fb7b4e43a2f7e707b7848d1b925d598cda (patch)
treeee776cf03a887b5e341d12f250175e55dc148250 /editor/VSCode/syntaxes
parent11a191c2906fbaa2d80192da833b727984cf8f94 (diff)
downloadmu-2bac01fb7b4e43a2f7e707b7848d1b925d598cda.tar.gz
syntax highlighting for Visual Studio Code
Diffstat (limited to 'editor/VSCode/syntaxes')
-rw-r--r--editor/VSCode/syntaxes/Mu.tmLanguage96
1 files changed, 96 insertions, 0 deletions
diff --git a/editor/VSCode/syntaxes/Mu.tmLanguage b/editor/VSCode/syntaxes/Mu.tmLanguage
new file mode 100644
index 00000000..64f71320
--- /dev/null
+++ b/editor/VSCode/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>