Skip to content

WIP: Add C style cast support - #234

Open
matter123 wants to merge 8 commits into
masterfrom
Add/C-style-casts
Open

WIP: Add C style cast support#234
matter123 wants to merge 8 commits into
masterfrom
Add/C-style-casts

Conversation

@matter123

@matter123 matter123 commented Jun 9, 2019

Copy link
Copy Markdown
Collaborator

This PR marks a possible type between parentheses as a type cast, when inside a function definition.

More testing is needed before merging.

Possible issues (untested):

  • return (some_var) some_var would be marked as a type
  • new (some_type) some_type would be marked as a type cast when its not

@matter123

matter123 commented Jun 11, 2019

Copy link
Copy Markdown
Collaborator Author

The latest commit make return (some_var); and new (some_type); not type caste by preventing the type cast from being followed by a semicolon.

@jeff-hykin

jeff-hykin commented Jun 20, 2019

Copy link
Copy Markdown
Owner

I updated this with master, feel free to revert it if I missed changes somewhere, I just didn't want to leave this branch behind.

Once we have patterns for the control flow statements, I think this will be ready to merge into master.

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