aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_brainfuck.lua
blob: 31f2427a97ab67f4a28921d4ef139c498096cd47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 = {},
}