Skip to content

Fix various bugs and allow api keyword#17

Open
ahsand97 wants to merge 1 commit intowhoami730:cythonV2from
ahsand97:cythonV2
Open

Fix various bugs and allow api keyword#17
ahsand97 wants to merge 1 commit intowhoami730:cythonV2from
ahsand97:cythonV2

Conversation

@ahsand97
Copy link

Cyright module — PR description

Summary

Adds Cython api keyword support in the parser and type system, and wires the Cython extension settings (cython.typeCheckingMode, cython.includePaths) into the language server.


Commit

  • bccdab3cf — Fix various bugs and allow api keyword

Changes

1. Cython api keyword

  • tokenizerTypes.ts — New KeywordType.Api, added to varModifiers and softKeywords so api is accepted where public is (e.g. cdef public api void foo()).
  • tokenizer.ts — Map 'api'KeywordType.Api.
  • parseNodes.ts — Add CTypeNode.isApi(node) (same pattern as isPublic).
  • types.ts — Add isApi?: boolean to CythonDetails; set it in cloneForCType from CTypeNode.isApi(node).
  • typePrinter.ts — When printing types, add 'api' to the modifier list when details.isApi.
  • completionProvider.ts — Add 'api' to the Cython keyword list for completions.

2. Cython configuration

  • configOptions.ts — Support typeCheckingMode === 'cython' and use a Cython-specific diagnostic rule set (e.g. getCythonDiagnosticRuleSet()).
  • server.ts — Read cython.typeCheckingMode and cython.includePaths from the cython config section; default typeCheckingMode to 'cython' when running as the Cython extension.

References

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.

1 participant