Class SourceStatement

  • All Implemented Interfaces:
    Statement

    public final class SourceStatement
    extends java.lang.Object
    implements Statement
    The SourceStatement class is used to store information about the entire source code during compilation.
    Since:
    1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      SourceStatement​(Statement statement, Token endToken)
      Constructs a SourceStatement object, initialised with a single Statement object and the EOF Token.
      SourceStatement​(java.util.List<Statement> statements, Token endToken)
      Constructs a SourceStatement object, initialised with a List of every Statement object within the source code and the EOF Token.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SourceStatement

        public SourceStatement​(java.util.List<Statement> statements,
                               Token endToken)
        Constructs a SourceStatement object, initialised with a List of every Statement object within the source code and the EOF Token.

        A SourceSpan containing the range of the source code is automatically generated, as well as a LinkedList of its children.

        Parameters:
        statements - The List of Statements within the source code
        endToken - The end of file Token
      • SourceStatement

        public SourceStatement​(Statement statement,
                               Token endToken)
        Constructs a SourceStatement object, initialised with a single Statement object and the EOF Token.

        A SourceSpan containing the range of the statement is automatically generated, as well as a LinkedList of its children.

        Parameters:
        statement - The Statement object
        endToken - The end of file Token