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

arrays #55

Closed
philberty opened this issue Dec 1, 2020 · 3 comments · Fixed by #51 or #75
Closed

arrays #55

philberty opened this issue Dec 1, 2020 · 3 comments · Fixed by #51 or #75

Comments

@philberty
Copy link
Member

philberty commented Dec 1, 2020

This ticket is to track the implementation of arrays there is an already open PR #51

@philberty philberty self-assigned this Dec 1, 2020
@philberty philberty linked a pull request Dec 1, 2020 that will close this issue
philberty added a commit that referenced this issue Dec 1, 2020
This adds type inferencing and validation for arrays such as:

  let x: [i32, 5] = [1,2,3,4,5]
  ley y = [1,2,3];

It checks that each element is of a valid type and they line up correctly.
There needs to be some refactoring of the type resolution to handle the
array index expressions so this is a good save point for now.

Addresses: #27 #55
philberty added a commit that referenced this issue Dec 1, 2020
Adds new TypeVisitor to resolve Types from the AST via Visitor Pattern, so
the element type can be extracted.

Addresses: #27 #55
philberty added a commit that referenced this issue Dec 1, 2020
The index expression must be validated to ensure it is an integer.

Addresses: #27 #55
philberty added a commit that referenced this issue Dec 1, 2020
This compiles the ArrayIndexExpressions and Arrays such as:
  let x = [1,2,3];
  let a = x[0];

Addresses: #55
philberty added a commit that referenced this issue Dec 1, 2020
This adds type inferencing and validation for arrays such as:

  let x: [i32, 5] = [1,2,3,4,5]
  ley y = [1,2,3];

It checks that each element is of a valid type and they line up correctly.
There needs to be some refactoring of the type resolution to handle the
array index expressions so this is a good save point for now.

Addresses: #27 #55
philberty added a commit that referenced this issue Dec 1, 2020
Adds new TypeVisitor to resolve Types from the AST via Visitor Pattern, so
the element type can be extracted.

Addresses: #27 #55
philberty added a commit that referenced this issue Dec 1, 2020
The index expression must be validated to ensure it is an integer.

Addresses: #27 #55
philberty added a commit that referenced this issue Dec 1, 2020
This compiles the ArrayIndexExpressions and Arrays such as:
  let x = [1,2,3];
  let a = x[0];

Addresses: #55
@philberty
Copy link
Member Author

the commits linked to this cause the issue to be closed - reopening untill the copied array syntax works

@philberty philberty reopened this Dec 1, 2020
@philberty
Copy link
Member Author

To complete arrays the bugs #52 #53 need to be fixed next

@philberty
Copy link
Member Author

closing as the open bugs need to be fixed in the parser

@philberty philberty added this to the Core Datastructures milestone Dec 18, 2020
@philberty philberty reopened this Dec 21, 2020
@philberty philberty moved this from Done to Review in progress in Data Structures 1 - Core Dec 22, 2020
Data Structures 1 - Core automation moved this from Review in progress to Done Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
1 participant