summaryrefslogtreecommitdiffstats
path: root/aconf/path/address/special.lua
blob: ab94fce0d6c39da74b2f448a6c6e0969fe08ea08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--[[
Copyright (c) 2012-2015 Kaarle Ritvanen
See LICENSE file for license details
--]]

local M = {}


local object = require('aconf.object')
local class = object.class


M.SpecialMode = class(require('aconf.path.base').Special)

M.Value = class(M.SpecialMode)
M.Value.symbol = '&'

M.Selector = class(M.SpecialMode)

M.EnumKeys = class(M.Selector)
M.EnumKeys.symbol = '#'


M.ValueEquals = class(M.Selector)

M.ValueEquals.symbol = '@'

function M.ValueEquals:init(key) self.key = key end

function M.ValueEquals:tostring()
   return object.super(self, M.ValueEquals):tostring()..(self.key or '')
end


return M