Exemplo n.º 1
0
        //<S> ::= <Declarations> startup '(' <DeclaringParameters> ')' <Commands> end startup <Declarations> GameLoop '(' <DeclaringParameters> ')' <Commands> end GameLoop <Declarations>
        public StartupStucture(ParserContext parserContext, Declarations declarations, DeclaringParameters declaringParameters,
                               Commands commands, Declarations declarations2, DeclaringParameters declaringParameters2, Commands commands2,
                               Declarations declarations3) : base(parserContext)
        {
            this.parserContext        = parserContext;
            this.Declarations         = declarations;
            this.DeclaringParameters  = declaringParameters;
            this.Commands             = commands;
            this.Declarations2        = declarations2;
            this.DeclaringParameters2 = declaringParameters2;
            this.Commands2            = commands2;
            this.Declarations3        = declarations3;

            VisitList.Remove(VisitList.Last());


            AddChild(declarations);
            AddChild(declaringParameters);
            AddChild(commands);
            AddChild(declarations2);
            AddChild(declaringParameters2);
            AddChild(commands2);
            AddChild(declarations3);
        }
Exemplo n.º 2
0
 //<MethodDeclaration> ::= method <Methodtype> Identifier '(' <DeclaringParameters> ')' <Commands> <returnstatement> end method
 public MethodDeclaration(ParserContext context, MethodType methodType, string v, DeclaringParameters declaringParameters, Commands commands, ReturnStatement returnStatement) : base(context)
 {
     this.MethodType          = methodType;
     this.Value               = v;
     this.DeclaringParameters = declaringParameters;
     this.Commands            = commands;
     this.ReturnStatement     = returnStatement;
 }