Skip to content

[Syntax] Introduce UnresolvedIsExpr/UnresolvedAsExpr #60731

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

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Aug 23, 2022

SequenceExprSyntax should have odd number elements. Previously 'a as b'
was parsed like:

(sequence_expr
  (identifier_expr "a"),
  (as_expr
    'as'
    (typeidentifier "b")))

So it had even number elements. Now it's parsed

(sequence_expr
  (identifier_expr "a"),
  (unresolved_as_expr 'as')
  (type_expr
    (typeidentifier "b")))

@rintaro
Copy link
Member Author

rintaro commented Aug 23, 2022

swiftlang/swift-syntax#628
@swift-ci Please smoke test

SequenceExprSyntax should have odd number elements. Previously 'a as b'
was parsed like:
```
(sequence_expr
  (identifier_expr "a"),
  (as_expr
    'as'
    (typeidentifier "b")))
```
So it had even number elements. Now it's parsed
```
(sequence_expr
  (identifier_expr "a"),
  (unresolved_as_expr 'as')
  (type_expr
    (typeidentifier "b")))
```
@rintaro rintaro force-pushed the syntax-unresolved-as-is branch from 8ce840f to ed34dfc Compare August 23, 2022 20:03
@rintaro
Copy link
Member Author

rintaro commented Aug 23, 2022

swiftlang/swift-syntax#628
@swift-ci Please smoke test

1 similar comment
@rintaro
Copy link
Member Author

rintaro commented Aug 23, 2022

swiftlang/swift-syntax#628
@swift-ci Please smoke test

@DougGregor DougGregor merged commit cf337a7 into swiftlang:main Aug 24, 2022
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