diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-09-10 16:36:51 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-09-10 16:37:16 -0700 |
| commit | 9e10c8bf006f42e90a011b8f9284e3ffa52a5859 (patch) | |
| tree | 64af99533def69dbfc4f844e7927418c516ff7cd /containers.moon | |
| parent | 989e133a5798850a9778bc6db8d07c2e5a274893 (diff) | |
Removing dead code and string.as_lua_id() (now just set on string
metametatable)
Diffstat (limited to 'containers.moon')
| -rw-r--r-- | containers.moon | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/containers.moon b/containers.moon index a9f6857..243e129 100644 --- a/containers.moon +++ b/containers.moon @@ -174,30 +174,5 @@ do 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] - - assert(("abc")\matches_1("ab")) - - [==[ - 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) - ]==] return {:List, :Dict, :Text} |
