summaryrefslogtreecommitdiffstats
path: root/parse.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2010-02-19 17:44:44 -0800
committerJosh Stone <jistone@redhat.com>2010-02-23 16:20:35 -0800
commitf946b10fbd72dd760f04ad9475f2ba3ccb56666f (patch)
treefccc6a4d31e04f741cf0a8ebe6f44c36943b9dae /parse.cxx
parentd945a07eecee9851173365459d196bcd22c3e636 (diff)
downloadsystemtap-steved-f946b10fbd72dd760f04ad9475f2ba3ccb56666f.tar.gz
systemtap-steved-f946b10fbd72dd760f04ad9475f2ba3ccb56666f.tar.xz
systemtap-steved-f946b10fbd72dd760f04ad9475f2ba3ccb56666f.zip
Simplify null_statement construction
It only needs a token*, so build that into the constructor.
Diffstat (limited to 'parse.cxx')
-rw-r--r--parse.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/parse.cxx b/parse.cxx
index f99a440b..79784490 100644
--- a/parse.cxx
+++ b/parse.cxx
@@ -1289,11 +1289,7 @@ parser::parse_statement ()
statement *ret;
const token* t = peek ();
if (t && t->type == tok_operator && t->content == ";")
- {
- null_statement* n = new null_statement ();
- n->tok = next ();
- return n;
- }
+ return new null_statement (next ());
else if (t && t->type == tok_operator && t->content == "{")
return parse_stmt_block (); // Don't squash semicolons.
else if (t && t->type == tok_keyword && t->content == "if")