summaryrefslogtreecommitdiff
path: root/src/map/magic-stmt.py
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-04-19 09:41:31 -0400
committermekolat <mekolat@users.noreply.github.com>2016-04-19 09:41:31 -0400
commit1ba24673e7064e39406e6faf11d790c2dcc2ac00 (patch)
tree7e2645f6fdec1dcc63ae56366371246f62865dcd /src/map/magic-stmt.py
parentc3e06ffe6437d27a2a7c6ddb2dc487ff2f007adf (diff)
parentc786a93e91adaf68780a5fd7585f51d0528f92ed (diff)
downloadtmwa-1ba24673e7064e39406e6faf11d790c2dcc2ac00.tar.gz
tmwa-1ba24673e7064e39406e6faf11d790c2dcc2ac00.tar.bz2
tmwa-1ba24673e7064e39406e6faf11d790c2dcc2ac00.tar.xz
tmwa-1ba24673e7064e39406e6faf11d790c2dcc2ac00.zip
Merge self-fork from mekolat/magic-v3
Magic v3
Diffstat (limited to 'src/map/magic-stmt.py')
-rw-r--r--src/map/magic-stmt.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/map/magic-stmt.py b/src/map/magic-stmt.py
deleted file mode 100644
index 7cc43d0..0000000
--- a/src/map/magic-stmt.py
+++ /dev/null
@@ -1,37 +0,0 @@
-class op_t(object):
- __slots__ = ('_value')
-
- name = 'tmwa::map::magic::op_t'
- depth = 1
- enabled = True
-
- def __init__(self, value):
- if not value:
- value = None
- self._value = value
-
- def to_string(self):
- value = self._value
- if value is None:
- return '(op_t *) nullptr'
- return '(op_t *)'
-
- def children(self):
- value = self._value
- if value is None:
- return
- value = value.dereference()
- yield '->name', value['name']
- yield '->signature', value['signature']
- yield '->op', value['op']
-
- test_extra = '''
- using tmwa::operator "" _s;
- '''
-
- tests = [
- ('static_cast<tmwa::map::magic::op_t *>(nullptr)',
- '(op_t *) nullptr'),
- ('new tmwa::map::magic::op_t{"name"_s, "sig"_s, nullptr}',
- '(op_t *) = {->name = "name", ->signature = "sig", ->op = nullptr}'),
- ]