Exemple #1
0
 public FunctionArgumentNode(SourceLocation location, TypeExpressionNode argument, bool isLet, bool isUnstable, RefKind @ref) : base(location)
 {
     Argument   = argument;
     IsLet      = isLet;
     IsUnstable = isUnstable;
     Ref        = @ref;
 }
Exemple #2
0
 public InstanceDeclarationNode(SourceLocation location, DeclarationAccessibility accessibility, IEnumerable <DeclarationAnnotationNode> annotations, string name, IEnumerable <DeclarationTypeArgumentNode> typeArguments, TypeExpressionNode @class, DeclarationBodyNode body) : base(location, accessibility, annotations)
 {
     Name          = name;
     TypeArguments = typeArguments?.ToList().AsReadOnly();
     Class         = @class;
     Body          = body;
 }
Exemple #3
0
 public LambdaResultNode(SourceLocation location, bool isLet, bool isUnstable, RefKind @ref, TypeExpressionNode type) : base(location)
 {
     IsLet      = isLet;
     IsUnstable = isUnstable;
     Ref        = @ref;
     Type       = type;
 }
Exemple #4
0
 public LambdaArgumentNode(SourceLocation location, string name, bool isLet, bool isUnstable, RefKind @ref, TypeExpressionNode type) : base(location)
 {
     Name       = name;
     IsLet      = isLet;
     IsUnstable = isUnstable;
     Ref        = @ref;
     Type       = type;
 }
Exemple #5
0
 public SimplePatternNode(SourceLocation location, bool isLet, bool isUnstable, RefKind @ref, string name, TypeExpressionNode typeAnnotation) : base(location)
 {
     IsLet          = isLet;
     IsUnstable     = isUnstable;
     Ref            = @ref;
     Name           = name;
     TypeAnnotation = typeAnnotation;
 }
Exemple #6
0
 public FunctionDeclarationArgumentNode(SourceLocation location, string name, TypeExpressionNode type, bool isLet, bool isUnstable, RefKind @ref, ExpressionNode defaultValue) : base(location)
 {
     Name         = name;
     Type         = type;
     IsLet        = isLet;
     IsUnstable   = isUnstable;
     this.Ref     = @ref;
     DefaultValue = defaultValue;
 }
Exemple #7
0
 public NewExpressionNode(SourceLocation location, NewBehavior behavior, bool isConstNew, bool isVolatileNew, TypeExpressionNode type, IEnumerable <ExpressionNode> initArguments, ExpressionNode arraySizeArgument) : base(location)
 {
     Behavior          = behavior;
     IsConstNew        = isConstNew;
     IsVolatileNew     = isVolatileNew;
     Type              = type;
     InitArguments     = initArguments?.ToList().AsReadOnly();
     ArraySizeArgument = arraySizeArgument;
 }
Exemple #8
0
 public StructPatternNode(SourceLocation location, IEnumerable <StructPatternElementNode> innerPatterns, string name, bool isLet, bool isUnstable, RefKind @ref, TypeExpressionNode typeAnnotation, TailPosition?tailPosition) : base(location)
 {
     InnerPatterns  = innerPatterns?.ToList().AsReadOnly();
     Name           = name;
     IsLet          = isLet;
     IsUnstable     = isUnstable;
     Ref            = @ref;
     TypeAnnotation = typeAnnotation;
     TailPosition   = tailPosition;
 }
Exemple #9
0
 public NamedConstructorArgumentNode(Basic.SourceLocation location, TypeExpressionNode type, string name, bool isLet, bool isUnstable, RefKind @ref, IEnumerable <ExpressionNode> indexes, ExpressionNode defaultValue) : base(location)
 {
     Type         = type;
     Name         = name;
     IsLet        = isLet;
     IsUnstable   = isUnstable;
     this.Ref     = @ref;
     Indexes      = indexes?.ToList().AsReadOnly();
     DefaultValue = defaultValue;
 }
Exemple #10
0
 public StructFieldDeclarationNode(Basic.SourceLocation location, string name, TypeExpressionNode type, bool isLet, bool isUnstable, RefKind @ref, IEnumerable <ExpressionNode> indexes, ExpressionNode defaultValue, DeclarationAccessibility accessibility, IEnumerable <DeclarationAnnotationNode> annotations) : base(location)
 {
     Name          = name;
     Type          = type;
     IsLet         = isLet;
     IsUnstable    = isUnstable;
     this.Ref      = @ref;
     Indexes       = indexes?.ToList().AsReadOnly();
     DefaultValue  = defaultValue;
     Accessibility = accessibility;
     Annotations   = annotations?.ToList().AsReadOnly();
 }
Exemple #11
0
 public TuplePatternNode(SourceLocation location, TupleKind tupleKind, string name, bool isLet, bool isUnstable, bool isPointer, RefKind @ref, IEnumerable <TupleElementPatternNode> innerPatterns, TypeExpressionNode typeAnnotation, TailPosition?tailPosition) : base(location)
 {
     TupleKind      = tupleKind;
     Name           = name;
     IsLet          = isLet;
     IsUnstable     = isUnstable;
     IsPointer      = isPointer;
     Ref            = @ref;
     InnerPatterns  = innerPatterns?.ToList().AsReadOnly();
     TypeAnnotation = typeAnnotation;
     TailPosition   = tailPosition;
 }
Exemple #12
0
 public ConstructorPatternNode(SourceLocation location, bool isLet, bool isUnstable, RefKind @ref, string moduleName, string constructorName, IEnumerable <string> typePatterns, IEnumerable <PatternNode> valuePatterns, TypeExpressionNode typeAnnotation, string name, TailPosition?tailPosition) : base(location)
 {
     IsLet           = isLet;
     IsUnstable      = isUnstable;
     Ref             = @ref;
     ModuleName      = moduleName;
     ConstructorName = constructorName;
     TypePatterns    = typePatterns?.ToList().AsReadOnly();
     ValuePatterns   = valuePatterns?.ToList().AsReadOnly();
     TypeAnnotation  = typeAnnotation;
     Name            = name;
     TailPosition    = tailPosition;
 }
Exemple #13
0
        public DotTypeExpressionNode Create(TypeExpressionNode left, TypeExpressionNode right)
        {
            if (left == null)
            {
                throw new ArgumentNullException(nameof(left));
            }
            if (right == null)
            {
                throw new ArgumentNullException(nameof(right));
            }

            return(new DotTypeExpressionNode()
            {
                Left = left,
                Right = right
            });
        }
Exemple #14
0
 public DeclarationAnnotationParameterNode(Basic.SourceLocation location, ExpressionNode expression, TypeExpressionNode type) : base(location)
 {
     Expression = expression;
     Type       = type;
 }
Exemple #15
0
 public IsOperatorExpressionNode(SourceLocation location, ExpressionNode left, TypeExpressionNode type) : base(location)
 {
     Left = left;
     Type = type;
 }
Exemple #16
0
 public MapTypeExpressionNode(SourceLocation location, TypeExpressionNode key, TypeExpressionNode value) : base(location)
 {
     Key   = key;
     Value = value;
 }
Exemple #17
0
 public IntrinsicTypeFunctionExpressionNode(SourceLocation location, TypeExpressionNode type, IntrinsicTypeFunction function) : base(location)
 {
     Type     = type;
     Function = function;
 }
Exemple #18
0
 public ClassKindExpressionNode(SourceLocation location, TypeExpressionNode @class) : base(location)
 {
     Class = @class;
 }
Exemple #19
0
 public NewDeclarationBodyNode(Basic.SourceLocation location, IEnumerable <DeclarationTypeArgumentNode> arguments, TypeExpressionNode target) : base(location)
 {
     Arguments = arguments?.ToList().AsReadOnly();
     Target    = target;
 }
Exemple #20
0
 public TypeBodyNode(Basic.SourceLocation location, TypeExpressionNode type) : base(location)
 {
     Type = type;
 }
Exemple #21
0
 public ExtensionDeclarationNode(Basic.SourceLocation location, IEnumerable <DeclarationTypeArgumentNode> typeArguments, TypeExpressionNode target, DeclarationBodyNode body) : base(location)
 {
     TypeArguments = typeArguments?.ToList().AsReadOnly();
     Target        = target;
     Body          = body;
 }
Exemple #22
0
 public ListTypeExpressionNode(SourceLocation location, TypeExpressionNode element) : base(location)
 {
     Element = element;
 }
Exemple #23
0
 public PointerTypeExpressionNode(SourceLocation location, TypeExpressionNode pointee, bool isConst, bool isVolatile) : base(location)
 {
     Pointee    = pointee;
     IsConst    = isConst;
     IsVolatile = isVolatile;
 }
Exemple #24
0
 public PolyTypeExpressionNode(SourceLocation location, TypeExpressionNode constructor, IReadOnlyList <TypeExpressionNode> arguments) : base(location)
 {
     Constructor = constructor;
     Arguments   = arguments;
 }
Exemple #25
0
 public AnnotatedTypeExpressionNode(SourceLocation location, TypeExpressionNode annotated, KindExpressionNode kind) : base(location)
 {
     Annotated = annotated;
     Kind      = kind;
 }
Exemple #26
0
 public BinaryTypeExpressionNode(SourceLocation location, ExpressionNode left, TypeExpressionNode type, TypeExpressionOperator @operator) : base(location)
 {
     Left     = left;
     Type     = type;
     Operator = @operator;
 }
Exemple #27
0
 public TupleTypeAgumentNode(SourceLocation location, TypeExpressionNode type) : base(location)
 {
     Type = type;
 }