Beispiel #1
0
 public override void CaseAABlock(AABlock node)
 {
     if (node == null)
     {
         return;
     }
     //If this is the first block, it marks the end
     if (node.Parent() is AMethodDecl || node.Parent() is AInitializerDecl || node.Parent() is ATriggerDecl ||
         node.Parent() is APropertyDecl || node.Parent() is AConstructorDecl || node.Parent() is ADeconstructorDecl)
     {
         End = TextPoint.FromCompilerCoords(node.GetToken().Line, node.GetToken().Pos);
     }
     base.CaseAABlock(node);
 }
Beispiel #2
0
        public MethodDescription(TextPoint start, PType returnType, AABlock block, PType propertyType)
        {
            Parser parser = new Parser(block);

            Start      = start;
            End        = parser.End;
            ReturnType = Util.TypeToString(returnType);
            Name       = "";
            Formals    = parser.Formals;
            Locals     = parser.Locals;
            if (block.Parent() != null)
            {
                block.Parent().RemoveChild(block);
            }
            //Decl = initializer;
            IsStatic = false;
            realType = (PType)returnType.Clone();
            if (propertyType != null)
            {
                this.propertyType = (PType)propertyType.Clone();
            }
            Position = start;
        }