Example #1
0
 public void VisitTemporary(TemporaryPathSegment temporaryPathSegment)
 {
     if (!RootNode.HasRootNode)
     {
         RootNode.CollectTemporary(this, temporaryPathSegment);
     }
     else
     {
         throw new Exception("Malformed MemoryPath - duplicit root segment");
     }
 }
Example #2
0
        /// <summary>
        /// Collects the temporary variables.
        /// </summary>
        /// <param name="treeIndexCollector">The tree index collector.</param>
        /// <param name="temporaryPathSegment">The temporary path segment.</param>
        /// <exception cref="System.NotImplementedException">Temporary memory index is visited more than once</exception>
        public void CollectTemporary(TreeIndexCollector treeIndexCollector, TemporaryPathSegment temporaryPathSegment)
        {
            if (TemporaryNodes.ContainsKey(temporaryPathSegment.TemporaryIndex))
            {
                throw new NotImplementedException("Temporary memory index is visited more than once");
            }

            MemoryIndexCollectorNode node = new MemoryIndexCollectorNode(temporaryPathSegment.TemporaryIndex);

            node.IsMust = true;
            TemporaryNodes.Add(temporaryPathSegment.TemporaryIndex, node);
            treeIndexCollector.AddNode(node);
            HasRootNode = true;
        }
Example #3
0
 /// <summary>
 /// Visits the temporary variable to traverse memory tree from temporary variable root.
 /// </summary>
 /// <param name="temporaryPathSegment">The temporary path segment.</param>
 public void VisitTemporary(TemporaryPathSegment temporaryPathSegment)
 {
     mustIndexesProcess.Add(temporaryPathSegment.TemporaryIndex);
 }
Example #4
0
 /// <summary>
 /// Visits the temporary.
 /// </summary>
 /// <param name="temporaryPathSegment">The temporary path segment.</param>
 /// <exception cref="System.Exception">Acces to undefined temporary variable.</exception>
 public void VisitTemporary(TemporaryPathSegment temporaryPathSegment)
 {
     throw new Exception("Acces to undefined temporary variable.");
 }
Example #5
0
 /// <summary>
 /// Visits the temporary variable to traverse memory tree from temporary variable root.
 /// </summary>
 /// <param name="temporaryPathSegment">The temporary path segment.</param>
 public void VisitTemporary(TemporaryPathSegment temporaryPathSegment)
 {
     addToMust(temporaryPathSegment.TemporaryIndex);
 }