18 using System.Collections.Generic;
23 using ErrorManagement;
47 : base(id, mods, bases, decls, location) {
48 bool constructorFound =
false;
53 for (
int i = 0; i < decls.Count; i++) {
55 if ((((MethodDeclaration)decls[i]).
Identifier.Equals(
id.Identifier)) && (((MethodDeclaration)decls[i]).ModifiersInfo.Contains(Modifier.Static))) {
56 constructorFound =
true;
64 for (
int i = 0; i < decls.Count; i++) {
66 if (((MethodDeclaration)decls[i]).
Identifier.Equals(
id.Identifier))
68 constructorFound =
true;
75 if (!constructorFound) {
76 List<Modifier> m =
new List<Modifier>();
80 m.Add(Modifier.Public);
96 return v.Visit(
this, o);
Encapsulates a block of statements.
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
Encapsulates a identifier expression of our programming language.
Encapsulates a declaration of a concrete method.
ClassDefinition(SingleIdentifierExpression id, List< Modifier > mods, List< string > bases, List< Declaration > decls, Location location)
Constructor of ClassDefinition.
Encapsulates a definition of a concrete constructor.
Location location
Location: Encapsulates in one object the line, column and filename
Modifier
Indicates differents modifiers to use in class (only public, internal or static), fields or methods...
Encapsulates a definition of a concrete class or interface.
override Object Accept(Visitor v, Object o)
Accept method of a concrete visitor.
string Identifier
Gets the name associated to the declaration
Encapsulates a definition of a concrete class.