public ExpressionPropertyExpression(Expression expression, Identifier identifier)
        {
            Expression = expression;
            Property = identifier.Value;

            Expression.Parent = this;
        }
Example #2
0
        public LetStatement(Identifier identifier, Type type, Expression expression)
        {
            Variable = identifier.Value;
            Type = type;
            Expression = expression;

            Type.Parent = this;
            Expression.Parent = this;
        }
        public MethodCallExpression(Identifier identifier, Sequence<Expression> parameters)
        {
            Method = identifier.Value;
            Parameters = parameters;

            foreach (var parameter in Parameters)
            {
                parameter.Parent = this;
            }
        }
        public ParentMethodCallExpression(Identifier parentIdentifier, Identifier methodIdentifier, Sequence<Expression> parameters)
        {
            ParentClass = parentIdentifier.Value;
            Method = methodIdentifier.Value;
            Parameters = parameters;

            foreach (var parameter in Parameters)
            {
                parameter.Parent = this;
            }
        }
Example #5
0
        public Module(Identifier identifier, Sequence<Import> imports, Sequence<Class> classes)
        {
            Name = identifier.Value;
            Imports = imports;
            Classes = classes;

            foreach (var import in imports)
            {
                import.Parent = this;
            }

            foreach (var @class in classes)
            {
                @class.Parent = this;
            }
        }
Example #6
0
        public Method(Identifier identifier, Sequence<Argument> arguments, Type type, Block block)
        {
            Name = identifier.Value;
            Arguments = arguments;
            Type = type;
            Block = block;

            foreach (var argument in arguments)
            {
                argument.Parent = this;
            }

            Type.Parent = this;
            Block.Parent = this;

            FullName = string.Format("{0}:{1}", Name, String.Join(":", Arguments.Select(a => a.Type)));
        }
Example #7
0
        public Class(Identifier identifier, Identifier parentIdentifier, Sequence<Property> properties, Sequence<Method> methods)
        {
            Name = identifier.Value;
            Properties = properties;
            Methods = methods;
            ParentName = parentIdentifier.Value;

            foreach (var property in Properties)
            {
                property.Parent = this;
            }

            foreach (var method in Methods)
            {
                method.Parent = this;
            }
        }
Example #8
0
 public Type(Identifier identifier, Type type)
 {
     Name = identifier.Value;
     GenericType = type;
     GenericType.Parent = this;
 }
Example #9
0
 public Type(Identifier identifier)
 {
     Name = identifier.Value;
     GenericType = null;
 }
 public VariableExpression(Identifier identifier)
 {
     Variable = identifier.Value;
 }
 public PropertyAssignable(Identifier identifier)
 {
     Property = identifier.Value;
 }
Example #12
0
 public Import(Identifier identifier)
 {
     Name = identifier.Value;
 }
 public PropertyExpression(Identifier identifier)
 {
     Property = identifier.Value;
 }
Example #14
0
 public Argument(Identifier identifier, Type type)
 {
     Name = identifier.Value;
     Type = type;
     Type.Parent = this;
 }
Example #15
0
 public Class(Identifier identifier, Sequence<Property> properties, Sequence<Method> methods)
     : this(identifier, new Identifier("Any"), properties, methods)
 {
 }