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

Support Record type #78

Merged
merged 4 commits into from
Mar 1, 2019
Merged

Support Record type #78

merged 4 commits into from
Mar 1, 2019

Conversation

yoshihiro503
Copy link
Contributor

Support

  • record types
  • record field type

See also #54

Example

-record(state, {name :: string(), param :: term()}).
-type record_as_type(A) :: #state{param :: A}.

@@ -7,3 +7,6 @@

%% test case for opaque decl
-opaque int() :: integer().

-record(state, {name :: string(), param :: term()}).
-type record_as_type(A) :: #state{param :: A}.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add the purpose of this test-case as a comment? e.g., %% test case for record type and record field type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added.

Sf.Integer line;
Sf.Atom "record";
Sf.List (
Sf.Tuple(3, [Sf.Atom "atom"; Sf.Integer line_field_types; Sf.Atom name])
Copy link
Collaborator

@amutake amutake Mar 1, 2019

Choose a reason for hiding this comment

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

line_field_types seems to be line of record name. So could you rename line_field_types to line_name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right, I fixed it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

thx!

Copy link
Collaborator

@amutake amutake left a comment

Choose a reason for hiding this comment

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

LGTM. I'll merge this after CI is passed

@amutake amutake merged commit 9f62e35 into yutopp:master Mar 1, 2019
@yoshihiro503 yoshihiro503 deleted the record_type branch March 1, 2019 06:28
@yutopp yutopp added this to the 0.1.4 milestone Mar 1, 2019
@amutake amutake mentioned this pull request Mar 1, 2019
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.

3 participants