@@ -18,26 +18,54 @@ To use development versions of Kipper download the
1818
1919### Added
2020
21- - Added semantic checking and code generation for object literals and object properties.
21+ - Support for dot notation for accessing properties of objects. ([ #67 ] ( https://github.com/Kipper-Lang/Kipper/issues/67 ) )
22+ - Support for classes, class methods, class properties and class constructors.
23+ ([ #665 ] ( https://github.com/Kipper-Lang/Kipper/issues/665 ) )
24+ - Support for object literals and object properties.
2225 ([ #526 ] ( https://github.com/Kipper-Lang/Kipper/issues/526 ) )
26+ - Support for calling lambdas and functions stored in variables or expressions.
27+ ([ #674 ] ( https://github.com/Kipper-Lang/Kipper/issues/674 ) )
2328- Implemented internal representation for custom types such as objects, interfaces and classes. This change means that
2429 the entire core type system has been reworked and adjusted to also support custom types as well as complex types
25- (objects, arrays etc.). This does not inheritely add functionality but serves as the stepping stone for the
30+ (objects, arrays etc.). This does not inherently add functionality but serves as the stepping stone for the
2631 implementation of all custom types in the future. ([ #524 ] ( https://github.com/Kipper-Lang/Kipper/issues/524 ) )
2732- Implemented the generic ` Array<T> ` type and single-type array initializers.
2833 ([ #499 ] ( https://github.com/Kipper-Lang/Kipper/issues/499 ) )
34+ - Support for index-based array assignments. ([ #669 ] ( https://github.com/Kipper-Lang/Kipper/issues/669 ) )
35+ - Implemented the generic ` Func<T..., R> ` type and function type initializers.
36+ ([ #584 ] ( https://github.com/Kipper-Lang/Kipper/issues/584 ) )
37+ - Implemented internal generic spread argument ` T... ` , which allows multiple arguments to be passed to a single
38+ parameter inside a generic type specifier.
39+ - Implemented constant ` NaN ` , which represents the ` NaN ` value in JavaScript (Not a Number).
40+ ([ #671 ] ( https://github.com/Kipper-Lang/Kipper/issues/671 ) )
41+ - Support for internal type unions in built-in and internal functions.
42+ ([ #496 ] ( https://github.com/Kipper-Lang/Kipper/issues/496 ) )
2943- New module:
3044 - ` semantics/runtime-built-ins ` , which contains runtime built-in functions, variables and types.
3145 - ` semantics/runtime-internals ` , which contains the runtime internal functions.
3246 - ` semantics/types ` , which contains the runtime types.
3347- New classes:
48+ - ` UniverseScope ` , which represents the universe scope, where all built-in types, functions and variables are
49+ declared. This serves as the parent of the global scope.
3450 - ` InterfaceDeclaration ` , which represents an AST interface declaration.
51+ - ` ClassMethodDeclaration ` , which represents an AST class method declaration.
52+ - ` ClassPropertyDeclaration ` , which represents an AST class property declaration.
53+ - ` ClassConstructorDeclaration ` , which represents an AST class constructor.
3554 - ` ClassDeclaration ` , which represents an AST class declaration.
3655 - ` BuiltInType ` , which represents a built-in type.
3756 - ` CustomType ` , which represents a user defined type.
57+ - ` UnionType ` , which represents a union type.
58+ - ` BuiltInTypeAny ` , which represents the ` any ` type.
59+ - ` BuiltInTypeVoid ` , which represents the ` void ` type.
60+ - ` BuiltInTypeNull ` , which represents the ` null ` type.
61+ - ` BuiltInTypeUndefined ` , which represents the ` undefined ` type.
62+ - ` BuiltInTypeBool ` , which represents the ` bool ` type.
63+ - ` BuiltInTypeNum ` , which represents the ` num ` type.
64+ - ` BuiltInTypeStr ` , which represents the ` str ` type.
65+ - ` BuiltInTypeArray ` , which represents the ` Array<T> ` type.
66+ - ` BuiltInTypeFunc ` , which represents the ` Func<T..., R> ` type.
67+ - ` BuiltInTypeObj ` , which represents the ` obj ` type.
3868 - ` ScopeTypeDeclaration ` , which represents a scope type declaration.
39- - ` UniverseTypeDeclaration ` , which represents the universe, where all built-in types, functions and variables are
40- declared. This serves as the parent of the global scope.
4169 - ` CustomType ` , which is a class extending from ` ProcessedType ` and implementing the functionality for a custom type such as a interface or class.
4270- New errors:
4371 - ` TypeCanNotBeUsedForTypeCheckingError ` , which is thrown when a type is used for type checking, but is not a valid
@@ -48,37 +76,73 @@ To use development versions of Kipper download the
4876 an error indicating an invalid logic that should be fixed.
4977 - ` CanNotUseNonGenericAsGenericTypeError ` , which is thrown when a non-generic type is used as a generic type. This is
5078 an error indicating an invalid logic that should be fixed.
51- - New interfaces:
79+ - ` MismatchingArgCountBetweenFuncTypesError ` , which is thrown when the amount of arguments in a function type does not
80+ match the number of arguments in the function type it is compared to.
81+ - ` GenericCanOnlyHaveOneSpreadError ` , which is thrown when a generic type has more than one spread argument. This is
82+ for now an internal-only error that should not be thrown in normal circumstances.
83+ - ` TypeNotAssignableToUnionError ` , which is thrown when a type is not assignable to a union type.
84+ - ` ValueTypeNotIndexableWithGivenAccessor ` , which is thrown when a value type is not indexable with the given
85+ accessor.
86+ - ` PropertyDoesNotExistError ` , which is thrown when a property does not exist on a type.
87+ - New interfaces and types:
5288 - ` InterfaceDeclarationSemantics ` , which represents the semantics of an interface declaration.
5389 - ` InterfaceDeclarationTypeSemantics ` , which represents the type semantics of an interface declaration.
90+ - ` ClassMethodDeclarationSemantics ` , which represents the semantics of a class method declaration.
91+ - ` ClassMethodDeclarationTypeSemantics ` , which represents the type semantics of a class method declaration.
92+ - ` ClassPropertyDeclarationSemantics ` , which represents the semantics of a class property declaration.
93+ - ` ClassPropertyDeclarationTypeSemantics ` , which represents the type semantics of a class property declaration.
94+ - ` ClassConstructorDeclarationSemantics ` , which represents the semantics of a class constructor declaration.
95+ - ` ClassConstructorDeclarationTypeSemantics ` , which represents the type semantics of a class constructor declaration.
5496 - ` ClassDeclarationSemantics ` , which represents the semantics of a class declaration.
5597 - ` ClassDeclarationTypeSemantics ` , which represents the type semantics of a class declaration.
5698 - ` TypeDeclaration ` , which represents a type declaration. This is an abstract base class for all type declarations.
5799 - ` TypeDeclarationSemantics ` , which represents the semantics of a type declaration.
58100 - ` TypeDeclarationTyp ` KipperTypeChecker.validArrayExpression` eSemantics ` , which represents the type semantics of a type declaration.
59101 - ` CompilableType ` , which represents a type that can be compiled.
102+ - ` BuiltInReference ` , which replaces the now removed type ` Reference ` in the ` KipperProgramContext ` for reference
103+ tracking of built-in types.
60104- New functions:
61105 - ` KipperTypeChecker.validArrayExpression ` , which ensures that an array expression is valid.
106+ - New properties:
107+ - ` BuiltInFunction.funcType ` , which returns a function type for the built-in function.
108+ - ` FunctionDeclarationTypeSemantics.type ` , which returns the type of the function declaration i.e. the function type.
109+ - ` LambdaPrimaryExpressionTypeSemantics.type ` , which returns the type of the lambda primary expression i.e. the
110+ function type.
111+ - ` FunctionCallExpressionTypeSemantics.funcOrExp ` , which returns the function or expression that is called. This
112+ always stores some sort of value that extends ` BuiltInTypeFunc ` .
113+ - New runtime error ` KipperError ` , which serves as the base for ` TypeError ` and ` IndexError ` .
62114
63115### Changed
64116
65- - Changed type from interface to class:
117+ - Argument type of built-in function ` print ` from ` str ` to ` any ` .
118+ - Argument type of built-in function ` len ` from ` str ` to ` str | Array<any> ` .
119+ ([ #667 ] ( https://github.com/Kipper-Lang/Kipper/issues/667 ) )
120+ - Type from interface to class:
66121 - ` InternalFunction ` , which represents an internal function.
67122 - ` BuiltInFunction ` , which represents a built-in function.
68123 - ` InternalFunctionArgument ` , which represents an internal function argument.
69124 - ` BuiltInVariable ` , which represents a built-in variable.
70125- Renamed:
71126 - Module ` analysis ` to ` semantics ` .
127+ - Module ` compiler/.../expressions/arithmetic ` to ` arithmetic-expression ` .
72128 - Class ` UncheckedType ` to ` RawType ` .
73129 - Class ` CheckedType ` to ` ProcessedType ` .
74130 - Class ` UndefinedCustomType ` to ` UndefinedType ` .
75131
76132### Fixed
77133
134+ - All functions and lambdas simply resolving to ` Func ` instead of the appropriate filled-up ` Func<T..., R> ` type. This
135+ now enables proper type checking for function references.
136+ - CLI command ` run ` not properly reporting internal or unexpected errors, as they were already prettified in the
137+ internally called up command ` compile ` .
138+
78139### Deprecated
79140
80141### Removed
81142
143+ - Type ` Reference ` as it is no longer needed and has been replaced by ` KipperReferenceable ` .
144+ - ` FunctionCallExpressionTypeSemantics.func ` , which is now has been replaced by ` funcOrExp ` .
145+
82146</details >
83147
84148## [ 0.11.0] - 2024-07-10
0 commit comments