-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_ConvExtensionsToNew.lua
More file actions
60 lines (54 loc) · 1.14 KB
/
Copy path_ConvExtensionsToNew.lua
File metadata and controls
60 lines (54 loc) · 1.14 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
require "_Utils"
local common = require "_ConvCommon"
local types = require "_ConvCommonTypes"
local convert = require "_ConvCommonConvert"
return { test = "extensions",
element =
{ name = "extensions",
map_attribs =
{
comment = "notation",
},
},
children =
{
{ test = "extension",
element =
{ name = "extension",
map_attribs =
{
name = true,
number = true,
author = true,
contact = true,
requires = true,
protect = "define",
comment = "notation",
},
attribs =
{
["match-api"] = function(node)
if(node.attr.supported and node.attr.supported ~= "disabled") then
return node.attr.supported
end
end,
disabled = function(node)
if(node.attr.supported == "disabled") then
return "true"
end
end,
type = function(node)
if(node.attr.supported ~= "disabled" and node.attr.type) then
return node.attr.type
end
end,
},
},
children =
{
convert.ToNewReqRem(false, true),
convert.ToNewReqRem(true, true),
},
},
},
}