summaryrefslogtreecommitdiffstats
path: root/aconf/path/address
diff options
context:
space:
mode:
Diffstat (limited to 'aconf/path/address')
-rw-r--r--aconf/path/address/init.lua33
-rw-r--r--aconf/path/address/special.lua35
2 files changed, 0 insertions, 68 deletions
diff --git a/aconf/path/address/init.lua b/aconf/path/address/init.lua
deleted file mode 100644
index c62487f..0000000
--- a/aconf/path/address/init.lua
+++ /dev/null
@@ -1,33 +0,0 @@
---[[
-Copyright (c) 2012-2015 Kaarle Ritvanen
-See LICENSE file for license details
---]]
-
-local object = require('aconf.object')
-local class = object.class
-
-local special = require('aconf.path.address.special')
-local base = require('aconf.path.base')
-
-
-local M = {
- special={
- enum_keys=special.EnumKeys(),
- value=special.Value(),
- value_equals=special.ValueEquals
- }
-}
-
-local _special = {['#']=M.special.enum_keys, ['&']=M.special.value}
-
-
-local AddressSyntax = class(base.Syntax)
-
-function AddressSyntax:get_special(comp)
- if comp:sub(1, 1) == '@' then
- return special.ValueEquals(#comp > 1 and comp:sub(2, -1) or nil)
- end
- return _special[comp] or object.super(self, AddressSyntax):get_special(comp)
-end
-
-return AddressSyntax():export(M)
diff --git a/aconf/path/address/special.lua b/aconf/path/address/special.lua
deleted file mode 100644
index ab94fce..0000000
--- a/aconf/path/address/special.lua
+++ /dev/null
@@ -1,35 +0,0 @@
---[[
-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