-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Improved types support #166
Conversation
d009369
to
133b409
Compare
6f4e3fe
to
1c34176
Compare
@julian-berbel please review. There are some failing tests but I'd like your feedback before going on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OtherPattern should have a string of the parsed ast aswell
README.md
Outdated
#### Haskell Example | ||
|
||
```haskell | ||
type Point = (Point, Int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wouldn't work since type aliases do not allow recursion.
README.md
Outdated
* Equations | ||
* Generators | ||
|
||
All the AST elements fall within any of this 4 categories. | ||
All the AST elements fall within any of this 5 categories. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these*
README.md
Outdated
``` | ||
|
||
#### Java Example | ||
Mulang AST support for type analysis is quite limited, and it is mostly focused on expressions and declarations analysis. However, for sake of completness and in order to provide some limited type-information in Mulang AST, `TypeAlias`, `TypeSignature` and `TypeCast` expressions are provided. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
completeness*
README.md
Outdated
|
||
#### Java Examples | ||
|
||
In Java, as in most typed C-like languages, type signature and variable declartions are bound. This means that, for example, a local variable declaration will produce both a `TypeSignature` and a `Variable` expression. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
declarations*
README.md
Outdated
Method types: | ||
|
||
```java | ||
void String f() { return null; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra voids
README.md
Outdated
|
||
> A `TypeCast` represent explictly giving a type to an expression | ||
> which may have static or dynamic impact on the program. It is aimed to represent | ||
> type-casts in c-like languages and inline type signatures in funcional languages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
functional*
Work in progress
Fixes #165
Fixes #164
Related to #163