aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_brainfuck.lua
diff options
context:
space:
mode:
authorRohan Vashisht <81112205+RohanVashisht1234@users.noreply.github.com>2024-04-08 15:41:29 +0530
committerGitHub <noreply@github.com>2024-04-08 12:11:29 +0200
commit196b2fb7d0a7ce8100f635ec26d168351896cc81 (patch)
treead2bf04e33fc7fa9779956f83c06a8c6f063da63 /plugins/language_brainfuck.lua
parentfc4daec1d31ce0679f91f49e31b013054528e4da (diff)
downloadlite-xl-plugins-196b2fb7d0a7ce8100f635ec26d168351896cc81.tar.gz
lite-xl-plugins-196b2fb7d0a7ce8100f635ec26d168351896cc81.zip
Add `language_brainfuck` (#418)
* Create language_brainfuck.lua * Update manifest.json
Diffstat (limited to 'plugins/language_brainfuck.lua')
-rw-r--r--plugins/language_brainfuck.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/language_brainfuck.lua b/plugins/language_brainfuck.lua
new file mode 100644
index 0000000..31f2427
--- /dev/null
+++ b/plugins/language_brainfuck.lua
@@ -0,0 +1,23 @@
+-- Author: Rohan Vashisht: https://github.com/RohanVashisht1234/
+
+-- mod-version:3
+local syntax = require "core.syntax"
+
+syntax.add {
+ name = "Brainfuck", -- tested ok
+ files = {
+ "%.bf$", -- tested ok
+ },
+ patterns = {
+ { pattern = '%[', type = 'operator' }, -- tested ok
+ { pattern = '%]', type = 'operator' }, -- tested ok
+ { pattern = '%-', type = 'keyword' }, -- tested ok
+ { pattern = '<', type = 'keyword2' }, -- tested ok
+ { pattern = '>', type = 'keyword2' }, -- tested ok
+ { pattern = '+', type = 'string' }, -- tested ok
+ { pattern = ',', type = 'literal' }, -- tested ok
+ { pattern = '%.', type = 'string' }, -- tested ok
+ { pattern = '[^%-%.<>%+,%[%]]+', type = 'comment' }, -- tested ok
+ },
+ symbols = {},
+}