| 105 | |
| 106 | |
| 107 | def _build_suggest_context( |
| 108 | token: str | Token | None, |
| 109 | text_before_cursor: str, |
| 110 | word_before_cursor: str | None, |
| 111 | full_text: str, |
| 112 | identifier: Identifier, |
| 113 | ) -> SuggestContext: |
| 114 | return SuggestContext( |
| 115 | token=token, |
| 116 | token_value=_normalize_token_value(token), |
| 117 | text_before_cursor=text_before_cursor, |
| 118 | word_before_cursor=word_before_cursor, |
| 119 | full_text=full_text, |
| 120 | identifier=identifier, |
| 121 | parsed_cb=functools.partial(_parse_suggestion_statement, text_before_cursor), |
| 122 | tokens_wo_space_cb=functools.partial(_tokens_wo_space, text_before_cursor), |
| 123 | ) |
| 124 | |
| 125 | |
| 126 | def _is_single_or_double_quoted(ctx: SuggestContext) -> bool: |