]> sourceware.org Git - systemtap.git/commitdiff
parse: let autocast peeks detect deeper pretty-prints
authorJosh Stone <jistone@redhat.com>
Wed, 14 May 2014 01:24:01 +0000 (18:24 -0700)
committerJosh Stone <jistone@redhat.com>
Wed, 14 May 2014 01:24:01 +0000 (18:24 -0700)
It already noticed "(expr)$" but "(expr)$$" should be valid too.

parse.cxx

index 78f6eae3ea5f9f39d721aa5e1b99d53322a8f2de..3d876b66c560c1e03846556cdd746d8c3e1ce262 100644 (file)
--- a/parse.cxx
+++ b/parse.cxx
@@ -3805,8 +3805,11 @@ expression* parser::parse_perf_op (const token* t)
 bool
 parser::peek_target_symbol_components ()
 {
-  return peek_op ("->") || peek_op ("[")
-    || tok_is (peek (), tok_identifier, "$");
+  const token * t = peek ();
+  return t &&
+    ((t->type == tok_operator && (t->content == "->" || t->content == "["))
+     || (t->type == tok_identifier &&
+         t->content.find_first_not_of('$') == string::npos));
 }
 
 void
This page took 0.0336 seconds and 5 git commands to generate.