summaryrefslogtreecommitdiffstats
path: root/parse.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'parse.cxx')
-rw-r--r--parse.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/parse.cxx b/parse.cxx
index 228f9a2c..2732194c 100644
--- a/parse.cxx
+++ b/parse.cxx
@@ -1358,6 +1358,24 @@ parser::parse_probe_point ()
// fall through
}
+ if (t && t->type == tok_keyword && t->content == "if")
+ {
+ next ();
+ t = peek ();
+ if (! (t->type == tok_operator && t->content == "("))
+ throw parse_error ("expected '('");
+ next ();
+
+ pl->condition = parse_expression ();
+
+ t = peek ();
+ if (! (t->type == tok_operator && t->content == ")"))
+ throw parse_error ("expected ')'");
+ next ();
+ t = peek ();
+ // fall through
+ }
+
if (t && t->type == tok_operator
&& (t->content == "{" || t->content == "," ||
t->content == "=" || t->content == "+=" ))