public Class(string name, VariableType parent, VariableType outer, UnrealFlags.EClassFlags flags, List <VariableType> interfaces = null, List <VariableType> types = null, List <VariableDeclaration> vars = null, List <Function> funcs = null, List <State> states = null, DefaultPropertiesBlock defaultProperties = null, SourcePosition start = null, SourcePosition end = null) : base(name, start, end, EPropertyType.Object) { Parent = parent; OuterClass = outer; Flags = flags; Interfaces = interfaces ?? new List <VariableType>(); VariableDeclarations = vars ?? new List <VariableDeclaration>(); TypeDeclarations = types ?? new List <VariableType>(); Functions = funcs ?? new List <Function>(); States = states ?? new List <State>(); DefaultProperties = defaultProperties ?? new DefaultPropertiesBlock(); Type = ASTNodeType.Class; foreach (ASTNode node in ChildNodes) { node.Outer = this; } }
public Struct(string name, VariableType parent, ScriptStructFlags flags, List <VariableDeclaration> variableDeclarations = null, List <VariableType> typeDeclarations = null, DefaultPropertiesBlock defaults = null, SourcePosition start = null, SourcePosition end = null) : base(name, start, end, name switch { "Vector" => EPropertyType.Vector, "Rotator" => EPropertyType.Rotator, _ => EPropertyType.Struct })
public bool VisitNode(DefaultPropertiesBlock node) { throw new NotImplementedException(); }
public bool VisitNode(DefaultPropertiesBlock node) { Write("defaultproperties"); Write("{0}", "{"); NestingLevel++; foreach (Statement s in node.Statements) { s.AcceptVisitor(this); } NestingLevel--; Write("{0}", "}"); return true; }