Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: intermediate type computer #600

Merged
merged 34 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e9a6168
feat: compute type of parenthesized expressions
lars-reimann Oct 4, 2023
66d011a
feat: compute type of attributes, classes, enums, enum variants
lars-reimann Oct 4, 2023
1927b79
feat: compute type of arguments
lars-reimann Oct 4, 2023
ca4178c
feat: compute type of results
lars-reimann Oct 4, 2023
98fcc98
feat: compute type of operations (except ?:)
lars-reimann Oct 4, 2023
0d4af2b
feat: finish type model (except literal types)
lars-reimann Oct 4, 2023
3370042
feat: compute type of named types
lars-reimann Oct 4, 2023
ec5d306
feat: compute type of member types
lars-reimann Oct 4, 2023
2c28647
feat: compute type of union types
lars-reimann Oct 4, 2023
0f95e16
feat: compute type of callable types
lars-reimann Oct 4, 2023
bfb4d1b
feat: compute type of functions
lars-reimann Oct 4, 2023
acdbc05
feat: compute type of segments
lars-reimann Oct 4, 2023
da1ff4b
test: callable type/function/segment with missing manifest types
lars-reimann Oct 4, 2023
0371fe6
feat: compute type of references
lars-reimann Oct 4, 2023
35d986c
feat: compute type of member accesses
lars-reimann Oct 4, 2023
87752dd
feat: compute type of annotations and pipelines
lars-reimann Oct 4, 2023
f7d7dd5
feat: compute type of indexed access
lars-reimann Oct 4, 2023
7d1fccb
feat: compute type of parameters with manifest types
lars-reimann Oct 4, 2023
eec01fb
feat: compute types of lambda parameters (except when types are not m…
lars-reimann Oct 4, 2023
d1a51fe
test: types of lambdas
lars-reimann Oct 4, 2023
1b252a1
feat: typing of lambdas
lars-reimann Oct 4, 2023
436d976
test: type computing for assignees
lars-reimann Oct 4, 2023
545a480
test: type computing for calls
lars-reimann Oct 4, 2023
a669a68
chore: remove ported old tests (used for reference only)
lars-reimann Oct 4, 2023
f37fe84
test: fix wrong tests
lars-reimann Oct 4, 2023
fb3b5e4
test: add another test case
lars-reimann Oct 4, 2023
b1517ce
fix: wrong cardinality in grammar
lars-reimann Oct 4, 2023
7ec1f93
feat: add a class to represent named types themselves rather than ins…
lars-reimann Oct 4, 2023
1416657
fix: correctly compute type of references to classes/enums/enum variants
lars-reimann Oct 5, 2023
c80cf9c
feat: compute type of calls
lars-reimann Oct 5, 2023
06a3245
feat: compute type of assignees
lars-reimann Oct 5, 2023
7073a2d
test: skip remaining failing tests
lars-reimann Oct 5, 2023
e02f861
refactor: remove unused declaration
lars-reimann Oct 5, 2023
650c002
test: ignore some lines for coverage
lars-reimann Oct 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/language/formatting/safe-ds-formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export class SafeDsFormatter extends AbstractFormatter {
const formatter = this.getNodeFormatter(node);

if (annotationCallsOrEmpty(node).length > 0) {
if (node.static) {
if (node.isStatic) {
formatter.keyword('static').prepend(newLine());
} else {
formatter.keyword('attr').prepend(newLine());
Expand Down Expand Up @@ -421,7 +421,7 @@ export class SafeDsFormatter extends AbstractFormatter {
const formatter = this.getNodeFormatter(node);

if (annotationCallsOrEmpty(node).length > 0) {
if (node.static) {
if (node.isStatic) {
formatter.keyword('static').prepend(newLine());
} else {
formatter.keyword('fun').prepend(newLine());
Expand Down Expand Up @@ -550,7 +550,7 @@ export class SafeDsFormatter extends AbstractFormatter {
const formatter = this.getNodeFormatter(node);

if (annotationCallsOrEmpty(node).length === 0) {
if (node.variadic) {
if (node.isVariadic) {
formatter.property('name').prepend(oneSpace());
}
} else {
Expand Down
Loading