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

parse expr is typepath outside parenthesis #9672

Merged
merged 1 commit into from
Jul 2, 2020
Merged

parse expr is typepath outside parenthesis #9672

merged 1 commit into from
Jul 2, 2020

Conversation

nadako
Copy link
Member

@nadako nadako commented Jun 30, 2020

I checked the usages of expr_next and looks like we're good to lose parenthesis around expr is Type.

The error message is quite cryptic in these cases currently:

{x;} is Bad;
function f() {} is Bad;

because it parses is as a normal identifier and then becomes confused about Bad going right after it.

TODO:

  • Parse ComplexType instead of just TypePath, error on non-typepaths later on typing?
  • AST representation (EIs, EBinop with ECheckType?)
  • Precedence (e.g. @meta a is B should be like @meta a + b?)
  • Also parse a !is B to avoid awkward parens for negation?
  • Anything else?

@skial skial mentioned this pull request Jul 1, 2020
1 task
@RealyUniqueName RealyUniqueName added this to the Backlog milestone Jul 1, 2020
@Simn Simn marked this pull request as ready for review July 2, 2020 18:19
@Simn Simn merged commit 981e624 into development Jul 2, 2020
@nadako nadako deleted the is branch July 2, 2020 18:20
Gama11 added a commit to vshaxe/haxe-TmLanguage that referenced this pull request Jul 2, 2020
@RealyUniqueName RealyUniqueName mentioned this pull request Jul 3, 2020
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