0 Replies Latest reply on Apr 29, 2008 11:40 AM by (Paul_Reilly)

    [svn] 1456: Added error reporting support for AST generation.

    Level 1
      Revision: 1456
      Author: preilly@adobe.com
      Date: 2008-04-29 12:40:13 -0700 (Tue, 29 Apr 2008)

      Log Message:
      -----------
      Added error reporting support for AST generation. The mxmlcunit
      compiler tests now pass as well as with AST generation disabled. In
      at least, two cases, the error reporting is even better.

      checkintests Passed: YES

      Needs QA: Not yet

      Needs DOC: NO

      API Change: NO

      Reviewed by: dloverin, pfarland

      Code-level description of changes:

      lib/asc.jar

      Built with InputBuffer change.

      modules/asc/src/java/macromedia/asc/parser/InputBuffer.java

      Made the class non-final, so it could be subclassed.

      Added no-arg constructor for subclassing.

      modules/compiler/src/java/flex2/compiler/as3/CodeFragmentLogAdapter.java
      modules/compiler/src/java/flex2/compiler/as3/PositionOffsetter.java
      modules/compiler/src/java/flex2/compiler/as3/CodeFragmentsInputBuffer.java
      modules/compiler/src/java/flex2/compiler/mxml/AbstractSyntaxTreeLogAdapter.java
      modules/compiler/src/java/flex2/compiler/util/AbstractLogAdapter.java

      Initial checkin.

      modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java

      Removed generation of empty ReturnStatement's now that Context's
      input will be non-null and the related asserts.

      Modified generateContext() to set the scriptName and path using
      the backing file. Also, set the Context's input to a
      CodeFragmentsInputBuffer instance.

      modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension.java

      Removed generation of empty ReturnStatement's now that Context's
      input will be non-null and the related asserts.

      modules/compiler/src/java/flex2/compiler/mxml/rep/AtResource.java

      Added getValueExpression() implementation.

      modules/compiler/src/java/flex2/compiler/mxml/rep/init/EventInitializer.java

      Modified generateDefinitionBody() to pass the handler's
      xmlLineNumber into parse().

      modules/compiler/src/java/flex2/compiler/mxml/rep/DocumentInfo.java

      Added getPath().

      modules/compiler/src/java/flex2/compiler/mxml/InterfaceGenerator.java

      Modified generateClassDefinition() to move the position of the
      scripts below the instance variables and binding management
      variables. This fixes up some error messages.

      Added getPath().

      modules/compiler/src/java/flex2/compiler/mxml/AbstractGenerator.java

      Modified calls to AbstractSyntaxTreeUtil.parse() to pass in the
      line number.

      modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
      modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java

      Modified each MxmlLogAdapter usage to use a
      AbstractSyntaxTreeLogAdapter instead when AST generation is turned
      on.

      Added setLogAdapter() to consolidate duplicate code.

      modules/compiler/src/java/flex2/compiler/mxml/MxmlLogAdapter.java

      Modified class to extend AbstractLogAdapter and removed code
      duplicated in super class.

      modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java

      Added generateAtResources() and modified constructor to call it.

      Removed generation of empty ReturnStatement's now that Context's
      input will be non-null and the related asserts.

      Modified calls to AbstractSyntaxTreeUtil.parse() to pass in the
      line number.

      Removed no longer called generateScripts(). It's in the super
      class now.

      Added getPath().

      Modified Paths:
      --------------
      flex/sdk/trunk/lib/asc.jar
      flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/InputBuffer.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension. java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/AbstractGenerator.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceGenerator.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlLogAdapter.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/AtResource.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/DocumentInfo.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/EventInitializer.ja va

      Added Paths:
      -----------
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/CodeFragmentLogAdapter.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/CodeFragmentsInputBuffer.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/PositionOffsetter.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/AbstractSyntaxTreeLogAdapter .java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/AbstractLogAdapter.java