Skip to content

Commit 5d424b8

Browse files
author
hartsantler
committed
release 0.8.6
1 parent ae825c1 commit 5d424b8

5 files changed

Lines changed: 964 additions & 17 deletions

File tree

bindings/ast.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ def __init__(self, ctx, node):
550550
}
551551

552552
def to_ast_node( ctx, node=None ):
553-
#print 'to-ast-node', ctx
553+
print 'to-ast-node', ctx
554554

555555
if ctx.type == 'node':
556556
print 'NODE::', ctx.node
@@ -598,6 +598,7 @@ def to_ast_node( ctx, node=None ):
598598

599599
elif ctx.type == 'single_kw':
600600
if ctx.token == 'else' or ctx.token == 'elif':
601+
#if ctx.token == 'else': ## TODO fix: "if/elif: if"
601602
orelse = IfExp._previous.orelse
602603
for child in node.children:
603604
walk_nodes( child, orelse )
@@ -610,21 +611,21 @@ def to_ast_node( ctx, node=None ):
610611
elif ctx.type == 'node_js':
611612
print(ctx.tree[0])
612613
## special brython inline javascript ##
613-
if len(ctx.tree) == 1 and '__iadd__' in ctx.tree[0]:
614-
AugAssign._previous.op = '+'
615-
elif len(ctx.tree) == 1 and '__isub__' in ctx.tree[0]:
616-
AugAssign._previous.op = '-'
617-
elif len(ctx.tree) == 1 and ctx.tree[0].startswith("if($temp.$fast_augm"):
618-
print(ctx.tree[0])
619-
c = ctx.tree[0].split('"')
620-
if len(c) == 3:
621-
AugAssign._previous.target = Name( name=c[1] )
622-
else:
623-
print(c)
624-
raise TypeError
625-
626-
elif len(ctx.tree) == 1 and ctx.tree[0] == 'else':
627-
pass
614+
#if len(ctx.tree) == 1 and '__iadd__' in ctx.tree[0]:
615+
# AugAssign._previous.op = '+'
616+
#elif len(ctx.tree) == 1 and '__isub__' in ctx.tree[0]:
617+
# AugAssign._previous.op = '-'
618+
#elif len(ctx.tree) == 1 and ctx.tree[0].startswith("if($temp.$fast_augm"):
619+
# print(ctx.tree[0])
620+
# c = ctx.tree[0].split('"')
621+
# if len(c) == 3:
622+
# AugAssign._previous.target = Name( name=c[1] )
623+
# else:
624+
# print(c)
625+
# raise TypeError
626+
627+
if len(ctx.tree) == 1 and ctx.tree[0] == 'else': ## DEPRECATED
628+
raise TypeError
628629
else:
629630
print '--------special node_js error-------'
630631
print(ctx)

tests/server.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,13 @@ def regenerate_runtime():
221221
if os.path.isdir( os.path.expanduser('~/blockly-read-only') ):
222222
ResourcePaths.append( os.path.expanduser('~/blockly-read-only') )
223223

224+
if os.path.isdir( os.path.expanduser('~/three.js/examples') ):
225+
ResourcePaths.append( os.path.expanduser('~/three.js/examples') )
226+
227+
if os.path.isdir( os.path.expanduser('~/textures') ):
228+
ResourcePaths.append( os.path.expanduser('~/textures') )
229+
230+
224231
class MainHandler( tornado.web.RequestHandler ):
225232
def get(self, path=None):
226233
print('path', path)

0 commit comments

Comments
 (0)