elua: can only specify a keyword once
authorDaniel Kolesa <d.kolesa@samsung.com>
Mon, 2 Jun 2014 14:26:45 +0000 (15:26 +0100)
committerDaniel Kolesa <d.kolesa@samsung.com>
Tue, 10 Jun 2014 14:48:52 +0000 (15:48 +0100)
src/bin/elua/apps/xgettext.lua

index f02b887d0d747244258297845dadd7074a8fba8e..b08a8b8fdb75e58d85910ca67cfac8d7d585a7f1 100644 (file)
@@ -279,6 +279,10 @@ for i = 1, #keywords do
         error("invalid keyword specifier")
     end
 
+    if keywords[kwb] then
+        error("cannot specify the same keyword more than twice")
+    end
+
     -- all sanitized, store :)
     keywords[kwb] = { context = context, argnum = tonumber(argnum),
         xcomment = xcmt, tonumber(n1), tonumber(n2) }