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

Improved types support #166

Merged
merged 8 commits into from
May 3, 2018
Merged

Conversation

flbulgarelli
Copy link
Member

@flbulgarelli flbulgarelli commented Apr 30, 2018

Work in progress
Fixes #165
Fixes #164
Related to #163

@ghost ghost assigned flbulgarelli Apr 30, 2018
@ghost ghost added the pending-review label Apr 30, 2018
@flbulgarelli flbulgarelli force-pushed the feature-type-handling-improvements branch from d009369 to 133b409 Compare April 30, 2018 17:15
@flbulgarelli flbulgarelli force-pushed the feature-type-handling-improvements branch from 6f4e3fe to 1c34176 Compare May 1, 2018 16:05
@flbulgarelli flbulgarelli requested a review from julian-berbel May 1, 2018 16:07
@flbulgarelli
Copy link
Member Author

@julian-berbel please review. There are some failing tests but I'd like your feedback before going on.

Copy link
Member

@julian-berbel julian-berbel left a 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)
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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; }
Copy link
Member

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functional*

@ghost ghost assigned julian-berbel May 2, 2018
@flbulgarelli flbulgarelli changed the title Type alias now accepts the aliased type Improved types support May 3, 2018
@flbulgarelli flbulgarelli merged commit 7467095 into master May 3, 2018
@ghost ghost removed the pending-review label May 3, 2018
@flbulgarelli flbulgarelli deleted the feature-type-handling-improvements branch May 3, 2018 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants