Rust-analyzer: Tracking issue: port rustc parsing methods

Created on 27 Sep 2018  路  4Comments  路  Source: rust-analyzer/rust-analyzer

Take a look at the libsyntax parser(link to every method attached) for "what to port" and at the Kotlin parser for "how to port".
if you wanna take care of a method, just check the box and append your username and the PR with -- @username (PR #12345)

  • [ ] [parse_indent](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L817)
  • [ ] [parse_seq_to_end](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L1079)
  • [ ] [parse_seq_to_before_end](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L1094)
  • [ ] [parse_trait_item](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L1352)
  • [ ] [parse_ty](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L1465)
  • [ ] [parse_path](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L1989)
  • [ ] [parse_path_allowing_meta](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L2015)
  • [ ] [parse_all_token_trees](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L2818)
  • [ ] [parse_tokens](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L2826)
  • [ ] [parse_async_block](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L3481)
  • [ ] [parse_expr](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L3619)
  • [ ] [parse_pat](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L4019)
  • [ ] [parse_stmt](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L4357)
  • [ ] [parse_block](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L4769)
  • [ ] [parse_impl_item](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L5614)
  • [ ] [parse_visibility](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L6156)
  • [ ] [parse_item](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L7508)
  • [ ] [parse_crate_mod](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L7589)
  • [ ] [parse_optional_str](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L7598)
  • [ ] [parse_str](https://github.com/rust-lang/rust/blob/441519536c8bd138e8c651743249acd6814747a1/src/libsyntax/parse/parser.rs#L7608)

Most helpful comment

It is not clear to me how to port these methods... The link to the Kotlin parser shows a huge file full of functions and it is difficult to know where to look at.

Could you maybe port one of the methods above and add a link to the PR, so future contributors can see a more concrete example of how to do it?

All 4 comments

@csmoe thank you so much for making this list! BTW, you can now bors r+!

It is not clear to me how to port these methods... The link to the Kotlin parser shows a huge file full of functions and it is difficult to know where to look at.

Could you maybe port one of the methods above and add a link to the PR, so future contributors can see a more concrete example of how to do it?

The parser is fairly complete, so going to close this issue :)

lol, that's an old issue :D

Was this page helpful?
0 / 5 - 0 ratings