]> sourceware.org Git - systemtap.git/commit
session.cxx: improve parse error token colorization
authorFrank Ch. Eigler <fche@redhat.com>
Fri, 24 Apr 2015 01:33:18 +0000 (21:33 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Fri, 24 Apr 2015 01:33:18 +0000 (21:33 -0400)
commitd8ef032e421c7485c8b2216ead65e5e23cab6b12
tree143db2fd2710add09981f0e75834ff4743441799
parente7211a70f0f1cbab9428229964bf9ef3b46063ad
session.cxx: improve parse error token colorization

Previous code had imperfect heuristics about cutting apart parts of
erroneous source lines, with a colorized token in the middle.  It
could occur that the token was synthetic, or cmd-line $/@ based,
in which case the srcline-cutting arithmetic could go off-end and
cause a basic_string::substr: exception.  New code dabbles less in
heuristics and confirms that the token content actually matches
the srcline content.  In case of a mismatch, the original srcline
around the token's location is transcribed verbatim (with ellipses).
session.cxx
This page took 0.028131 seconds and 5 git commands to generate.