diff options
Diffstat (limited to 'containers.lua')
| -rw-r--r-- | containers.lua | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/containers.lua b/containers.lua index ed0825e..865098d 100644 --- a/containers.lua +++ b/containers.lua @@ -379,28 +379,6 @@ do return text_methods[i] end end - assert(("abc"):matches_1("ab")) - local _ = [==[ text_metatable = - __mul: (other)=> - assert(type(other) == 'number', "Invalid type for multiplication") - return rep(@, other) - __index: (i)=> - -- Use [] for accessing text characters, or s[{3,4}] for s:sub(3,4) - if type(i) == 'number' then return sub(@, i, i) - elseif type(i) == 'table' then return sub(@, i[1], i[2]) - else return text_methods[i] - __tostring: => @_coalesce![1] - __len: => #tostring(@) - __concat: (other)=> tostring(@), tostring(other) - __len: => #tostring(@) - __eq: (other)=> - type(@) == type(other) and getmetatable(@) == getmetatable(other) and tostring(@) == tostring(other) - __lt: (other)=> tostring(@) < tostring(other) - __le: (other)=> tostring(@) <= tostring(other) - __newindex: => error("Cannot modify Text") - - Text = (s)-> setmetatable(s, text_metatable) - ]==] end return { List = List, |
