[Laszlo-dev] For Review: Change 20080518-dda-6 Summary: Script compiler line number rework
Donald Anderson
dda at ddanderson.com
Mon May 19 12:11:42 PDT 2008
I'm backing off on my change to shouldShowSourceLocation(). I tried it,
and there were some useful source locations that would otherwise get
lost,
like here:
lzc$class_simplelayout = Class.make("$lzc$class_simplelayout",
LzLayout, ["axis", void 0, "$lzc$set_axis",
/* -*- file: utils/layouts/simplelayout.lzx#7.2 -*- */
function $lzc$set_axis ($1_axis) {
The only time the originally reviewed code will split lines is when a
srcloc
is 'forced', and this is only done for a 'function' keyword, where it
would be safe
to do so.
I'm just making the comment clearer, and since it's approved, I'll
commit now.
On May 19, 2008, at 2:42 PM, Donald Anderson wrote:
> In response to your first comment about why lines cannot be split, I
> think it
> is important to be explicit about never splitting. So I've changed
> shouldShowSourceLocation() to this. It's also clearer, I think.
>
> public boolean shouldShowSourceLocation(LineNumberState os,
> LineNumberState ns,
> char op,
> boolean atBol) {
> boolean fileSame = os.filename.equals(ns.filename);
> boolean lineSame = (os.linediff == ns.linediff);
--
Don Anderson
Java/C/C++, Berkeley DB, systems consultant
voice: 617-547-7881
email: dda at ddanderson.com
www: http://www.ddanderson.com
More information about the Laszlo-dev
mailing list