summaryrefslogtreecommitdiffstats
path: root/lib/tolua++/src/bin/lua/verbatim.lua
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-11-04 22:32:11 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-11-04 23:25:00 +0100
commit9a7dd0a0770178529c704c08bc446e3533b1f3e5 (patch)
tree2ef6b11f07074c22d44b7f2396e3a96562376974 /lib/tolua++/src/bin/lua/verbatim.lua
parentMerge pull request #2597 from cuberite/faviconChange (diff)
downloadcuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.gz
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.bz2
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.lz
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.xz
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.zst
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.zip
Diffstat (limited to '')
-rw-r--r--lib/tolua++/src/bin/lua/verbatim.lua78
1 files changed, 0 insertions, 78 deletions
diff --git a/lib/tolua++/src/bin/lua/verbatim.lua b/lib/tolua++/src/bin/lua/verbatim.lua
deleted file mode 100644
index fd3b29b35..000000000
--- a/lib/tolua++/src/bin/lua/verbatim.lua
+++ /dev/null
@@ -1,78 +0,0 @@
--- tolua: verbatim class
--- Written by Waldemar Celes
--- TeCGraf/PUC-Rio
--- Jul 1998
--- $Id: verbatim.lua,v 1.3 2000/01/24 20:41:16 celes Exp $
-
--- This code is free software; you can redistribute it and/or modify it.
--- The software provided hereunder is on an "as is" basis, and
--- the author has no obligation to provide maintenance, support, updates,
--- enhancements, or modifications.
-
-
-
--- Verbatim class
--- Represents a line translated directed to the binding file.
--- The following filds are stored:
--- line = line text
-classVerbatim = {
- line = '',
- cond = nil, -- condition: where to generate the code (s=suport, r=register)
-}
-classVerbatim.__index = classVerbatim
-setmetatable(classVerbatim,classFeature)
-
--- preamble verbatim
-function classVerbatim:preamble ()
- if self.cond == '' then
- write(self.line)
- end
-end
-
--- support code
-function classVerbatim:supcode ()
- if strfind(self.cond,'s') then
- write(self.line)
- write('\n')
- end
-end
-
--- register code
-function classVerbatim:register (pre)
- if strfind(self.cond,'r') then
- write(self.line)
- end
-end
-
-
--- Print method
-function classVerbatim:print (ident,close)
- print(ident.."Verbatim{")
- print(ident.." line = '"..self.line.."',")
- print(ident.."}"..close)
-end
-
-
--- Internal constructor
-function _Verbatim (t)
- setmetatable(t,classVerbatim)
- append(t)
- return t
-end
-
--- Constructor
--- Expects a string representing the text line
-function Verbatim (l,cond)
- if strsub(l,1,1) == "'" then
- l = strsub(l,2)
- elseif strsub(l,1,1) == '$' then
- cond = 'sr' -- generates in both suport and register fragments
- l = strsub(l,2)
- end
- return _Verbatim {
- line = l,
- cond = cond or '',
- }
-end
-
-