Table of Contents

Class FunctionSymbol

Namespace
MuLang.Core.Symbols
Assembly
MuLang.Core.dll

Represents a function exposed by a MuLang environment.

public sealed class FunctionSymbol
Inheritance
FunctionSymbol
Inherited Members

Constructors

FunctionSymbol(string, string, IEnumerable<ParameterSymbol>, TypeSymbol)

Initializes a new instance of the FunctionSymbol class.

public FunctionSymbol(string id, string name, IEnumerable<ParameterSymbol> parameters, TypeSymbol returnType)

Parameters

id string

The provider identifier.

name string

The language name.

parameters IEnumerable<ParameterSymbol>

The function parameters.

returnType TypeSymbol

The function return type.

Exceptions

ArgumentNullException

Thrown when parameters or returnType is null.

ArgumentException

Thrown when a symbol value is invalid or a parameter name is duplicated.

Properties

Id

Gets the provider identifier.

public string Id { get; }

Property Value

string

Name

Gets the language name.

public string Name { get; }

Property Value

string

Parameters

Gets the ordered function parameters.

public IReadOnlyList<ParameterSymbol> Parameters { get; }

Property Value

IReadOnlyList<ParameterSymbol>

ReturnType

Gets the return type.

public TypeSymbol ReturnType { get; }

Property Value

TypeSymbol