public CheckedClassDeclStatement(Token identifier, List <IDataType>?typeArguments, SymbolEnvironment environment, ModuleEnvironment module, StructType?ancestor = null, bool shouldBeEmitted = true) { Identifier = identifier; TypeArguments = typeArguments; Environment = environment; InheritedType = ancestor; Module = module; DataType = new StructType(TypeKeyword.Identifier, typeArguments, this); ShouldBeEmitted = shouldBeEmitted; CheckedClassDeclStatement?inheritedClass = this; while (inheritedClass.Inherited != null) { inheritedClass = inheritedClass.Inherited; } Id = inheritedClass == this ? 0 : ++inheritedClass._highestClassId; }
public CheckedBlockExpression(List <CheckedStatement> statements, SymbolEnvironment environment, IDataType dataType, bool returnsLastExpression) : base(dataType) { Statements = statements; Environment = environment; ReturnsLastExpression = returnsLastExpression; }
private void PrintSymbols(SymbolEnvironment environment) { foreach (var classSymbol in environment.Classes) { PrintStructSymbol(classSymbol); } foreach (var functionSymbol in environment.Functions) { PrintFunctionSymbol(functionSymbol); } }
public ClassDeclStatement(Token identifier, List <Token>?typeParameters, BlockExpression body, TextSpan span, ModuleEnvironment moduleEnvironment, SymbolEnvironment symbolEnvironment, TypeExpression?ancestor = null, FunctionDeclStatement?initFunction = null) : base(span) { Identifier = identifier; TypeParameters = typeParameters; Body = body; InheritedType = ancestor; Module = moduleEnvironment; SymbolEnvironment = symbolEnvironment; InitFunction = initFunction; }
public BlockExpression(List <Statement> statements, SymbolEnvironment environment, TextSpan span) : base(span) { Statements = statements; Environment = environment; }