[Laszlo-dev] For Review: Change 20081021-dda-m Summary: Fix line numbers in embedded script
P T Withington
ptw at laszlosystems.com
Wed Oct 22 10:27:22 PDT 2008
Approved.
On 2008-10-21, at 15:21EDT, Donald Anderson wrote:
> Change 20081021-dda-m by dda at lester.local on 2008-10-21 14:56:49 EDT
> in /Users/dda/laszlo/src/svn/openlaszlo/trunk-f
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Fix line numbers in embedded script
>
> New Features:
>
> Bugs Fixed: LPP-7129 (No line numbers in script tag errors)
>
> Technical Reviewer: ptw (pending)
> QA Reviewer: (pending)
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
> Script coming from <script> tags goes into the application's
> constructor.
> This is collected into its own TranslationUnit, and folded into the
> application class's TranslationUnit later. At the time it is
> folded in,
> the line number information collected on its translation unit is
> lost.
> This change merges the line number information.
>
> The mechanism for embedding additional streams in TranslationUnits
> currently being used is sort of a primitive bookmark. When
> a translation unit is cooked, such bookmarks are
> replaced by text. The difference now is that the contents of a
> bookmark
> doesn't have to be a String, it can be a TranslationUnit, so when
> the translation
> takes place, we have access to the line numbers to merge.
>
> Merging B into A involves sliding all lines in A past the
> insertion point
> 'down', that is, all line numbers past that point are increased
> by the size of B.
> And the line numbers from B are increased by the number of lines
> in A before
> the insertion point.
>
> Tests:
> tests: (smokecheck) * (swf8+dhtml)
> apps: (weather+lzpix) * (swf8+swf9+dhtml), hello(swf9)
>
> The test case in the JIRA now correctly gives:
> org.openlaszlo.sc.CompilerError: linenumscript.lzx: 4: Error:
> Access of undefined property a, in line: if (a == 5) {
>
> Files:
> M WEB-INF/lps/server/src/org/openlaszlo/sc/
> SWF9ParseTreePrinter.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/TranslationUnit.java
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20081021-dda-m.tar
>
>
>
> --
>
> 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