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

No else autocompletion in expression #10410

Closed
matklad opened this issue Oct 1, 2021 · 3 comments
Closed

No else autocompletion in expression #10410

matklad opened this issue Oct 1, 2021 · 3 comments
Labels
A-completion autocompletion A-parser parser issues C-bug Category: bug

Comments

@matklad
Copy link
Member

matklad commented Oct 1, 2021

image

cc @Veykril

@Veykril
Copy link
Member

Veykril commented Oct 1, 2021

Looks like recovery is recovering a bit aggressively here, for func(if true {} el) we get

STMT_LIST@7938..7965
  L_CURLY@7938..7939 "{"
  WHITESPACE@7939..7944 "\n    "
  EXPR_STMT@7944..7959
    CALL_EXPR@7944..7959
      PATH_EXPR@7944..7948
        PATH@7944..7948
          PATH_SEGMENT@7944..7948
            NAME_REF@7944..7948
              IDENT@7944..7948 "func"
      ARG_LIST@7948..7959
        L_PAREN@7948..7949 "("
        IF_EXPR@7949..7959
          IF_KW@7949..7951 "if"
          WHITESPACE@7951..7952 " "
          CONDITION@7952..7956
            LITERAL@7952..7956
              TRUE_KW@7952..7956 "true"
          WHITESPACE@7956..7957 " "
          BLOCK_EXPR@7957..7959
            STMT_LIST@7957..7959
              L_CURLY@7957..7958 "{"
              R_CURLY@7958..7959 "}"
  WHITESPACE@7959..7960 " "
  EXPR_STMT@7960..7962
    PATH_EXPR@7960..7962
      PATH@7960..7962
        PATH_SEGMENT@7960..7962
          NAME_REF@7960..7962
            IDENT@7960..7962 "el"
  ERROR@7962..7963
    R_PAREN@7962..7963 ")"
  WHITESPACE@7963..7964 "\n"
  R_CURLY@7964..7965 "}"

which screws over the sibling search

@Veykril
Copy link
Member

Veykril commented Oct 1, 2021

I guess this is part of #10195

@lnicola lnicola added A-parser parser issues C-bug Category: bug labels Oct 1, 2021
@flodiebold flodiebold changed the title No esle autocompletin in expression No else autocompletion in expression Oct 10, 2021
@Veykril Veykril added the A-completion autocompletion label Feb 11, 2023
bors added a commit that referenced this issue Feb 14, 2023
internal: Improve parser recovery for delimited lists

Closes #11188, #10410, #10173

Should probably be merged after the stable release as this might get the parser stuck if I missed something
@Veykril
Copy link
Member

Veykril commented Dec 20, 2023

Closed by #14128

@Veykril Veykril closed this as completed Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion autocompletion A-parser parser issues C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants