Class TrySymbol

All Implemented Interfaces:
Serializable, IScope, IScopedSymbol, ISymbol, ITokenReference

public class TrySymbol extends ControlSymbol
EK9 try statement - this can effectively return a value if it is configured with returning part. When generating out put we need this to create its own block so variables inside are hidden from later scopes. So as we have a returning part (optional) we need a scope to put it in (i.e. this scope) this then means that when we use the catch and finally parts of the try we can find that returning variable.
See Also:
  • Constructor Details

    • TrySymbol

      public TrySymbol(IScope enclosingScope)
  • Method Details

    • clone

      public TrySymbol clone(IScope withParentAsAppropriate)
      Description copied from interface: ISymbol
      Clone the symbol and re-parent if this symbol like a method should have a parent. Other symbols like VariableSymbols are un-parented
      Specified by:
      clone in interface IScope
      Specified by:
      clone in interface IScopedSymbol
      Specified by:
      clone in interface ISymbol
      Overrides:
      clone in class ControlSymbol
    • cloneIntoTrySymbol

      protected TrySymbol cloneIntoTrySymbol(TrySymbol newCopy)