improvement
priority: low

-----------------------------------------------------------------------------

Date: Sun, 21 May 2006 11:49:53 -0500 (CDT)
From: Dan Grayson <dan@math.uiuc.edu>
To: dan@math.uiuc.edu
Subject: positions
Reply-to: dan@math.uiuc.edu


Currently every subexpression has just a single line number + column number as
its position.  Strings have no position stored, and the position of a
parenthesized is not affected by the positions of its parentheses.  Hence it is
hard to locate source code exactly.

Maybe everything needs two positions:

         asdfasdf ++ qwerqwerqwe
         ^                     ^
       start                  end

Then "locate" would not have to be a recursive function.

Error messages could have multiple parts to show the extent of the
subexpressions at issue.

More tokens need positions, but only code possibly leading to error messages
need positions.  String codes have no positions, but integer codes do!
