Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Commit

Permalink
Merge pull request #235 from mstriemer/yield-statements-1036556
Browse files Browse the repository at this point in the history
Traverse yield expressions (bug 1036556)
  • Loading branch information
mstriemer committed Jul 9, 2014
2 parents c334e7c + 9a2f254 commit 7a1be3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions tests/compat/test_gecko31.py
Expand Up @@ -19,6 +19,15 @@ def test_getShortcutOrURIAndPostData_promise(self):
self.assert_silent()
self.assert_compat_error()

def test_getShortcutOrURIAndPostData_promise_yield(self):
self.run_script_for_compat('''
function urlAndPostData() {
yield getShortcutOrURIAndPostData("a string");
}
''')
self.assert_silent()
self.assert_compat_error()

def test_getShortcutOrURIAndPostData_promise_window(self):
self.run_script_for_compat(
'var p = window.getShortcutOrURIAndPostData("something");')
Expand Down
2 changes: 1 addition & 1 deletion validator/testcases/javascript/nodedefinitions.py
Expand Up @@ -75,7 +75,7 @@ def node(branches=None, dynamic=False, action=None, returns=False,
action=actions._call_expression, returns=True),
"MemberExpression": node(branches=("object", "property"),
action=actions.trace_member, returns=True),
"YieldExpression": node(branches=("argument"), returns=True),
"YieldExpression": node(branches=("argument",), returns=True),
"ComprehensionExpression": node(branches=("body", "filter"), returns=True),
"GeneratorExpression": node(branches=("body", "filter"), returns=True),

Expand Down

0 comments on commit 7a1be3b

Please sign in to comment.