From 0681483ac661682fc09e61709ea00ab27ab4f68a Mon Sep 17 00:00:00 2001 From: Robert Krimen Date: Sun, 7 Oct 2012 18:43:56 -0700 Subject: [PATCH] Fix => --- node_statement.go | 2 +- parser_test.go | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/node_statement.go b/node_statement.go index c904885..66f7897 100644 --- a/node_statement.go +++ b/node_statement.go @@ -283,7 +283,7 @@ func newThrowNode(argument _node) *_throwNode { } func (self _throwNode) String() string { - return fmt.Sprintf("{ %s }", self.Argument) + return fmt.Sprintf("{ %s }", self.Argument) } type _tryCatchNode struct { diff --git a/parser_test.go b/parser_test.go index ea32df6..672bc59 100644 --- a/parser_test.go +++ b/parser_test.go @@ -629,6 +629,15 @@ func TestParseSuccess(t *testing.T) { --- { @ { = abc { { 1 { _ } } _ } } } `) + + test(` + xyzzy + + throw new TypeError("Nothing happens.") + --- + { @ xyzzy { { TypeError "Nothing happens." } } } + `) + } func TestParseFailure(t *testing.T) {