Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
mwojnars committed Jul 19, 2021
1 parent 21ec1ab commit 3cc586b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/hypertag/core/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ def _append_attrs(self, body, attrs, kwattrs, state, caller):
# append `body` to `state`
if self.attr_body:
self.attr_body.assign(state, body)
# state[self.attr_body] = body
elif body:
raise VoidTagEx("non-empty body passed to a void hypertag '%s'" % self.name, caller)

Expand Down
1 change: 0 additions & 1 deletion src/hypertag/core/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ def __init__(self, symbol, ctx):

def set(self, state, value):
state[self.primary or self] = value
# state[self] = value

def get(self, state):
"""Raises KeyError if this slot is uninitialized in `state`."""
Expand Down
7 changes: 7 additions & 0 deletions tests/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@
%t x | {10+x}
| { %t(x=5) }
"""
text = """
%f x
| this is x: $x
if x > 0:
f (x-1)
f 5
"""

root = RootModule(runtime = HyperHTML(), filename = __file__, package = __package__)
tree = HypertagAST(text, root, verbose = True)
Expand Down

0 comments on commit 3cc586b

Please sign in to comment.