Skip to content

Commit

Permalink
refactor representation of resolved pointer and optional types (#1552)
Browse files Browse the repository at this point in the history
* refactor representation of resolved pointer and optional types

Adds a separate representation for optional types instead of
falling back to ast nodes in `Analyser.Type`.
Unifies pointer types into a single union field in `Analyser.Type`
which avoids duplicating some code.

* simplify `getFieldAccessType` signature

There was no need to take a Tokenizer because it can be constructed
from a source location.
There was no need to return the original and unwrapped type
because `resolveDerefType` can be used to get the unwrapped type.

* merge `resolveVarDeclAliasInternal` and `resolveVarDeclAliasUncached`
  • Loading branch information
Techatrix authored Oct 27, 2023
1 parent c8dd10b commit 4607ec8
Show file tree
Hide file tree
Showing 6 changed files with 279 additions and 379 deletions.
Loading

0 comments on commit 4607ec8

Please sign in to comment.