Skip to content

v0.24.0

Latest

Choose a tag to compare

@github-actions github-actions released this 18 Nov 15:25
· 12 commits to master since this release

NOTE: Download tree-sitter-c-sharp.tar.gz for the complete source code.

C# 14

  • Add C# 14 language support, including extension declarations (#429)
  • Parse file-based app directives such as #:package and #:sdk (#462)

Parsing fixes

  • Parse (IDENT) && EXPR as a logical AND rather than a cast (#430)
  • Parse *(T*)p and *(p + 1) as dereferences (#464)
  • Allow ref before partial in struct modifiers (#464)
  • Accept checked and unchecked expressions as constant patterns (#464)
  • Parse lambdas whose first parameter is typed with in or out (#464)
  • Parse else, method bodies and returns that span #if branches (#464)
  • Let an #if block hold whole elements of an initializer or collection (#464)
  • Open an interpolation hole straight after an escaped {{ (#448)
  • End a verbatim interpolated string at one quote, not at a run of them (#466)
  • Preserve slice-only list patterns before logical operators (#444)
  • Stop reading when after a list pattern as its designation (#467)

Other changes

  • Highlight unsafe block statements (#422)
  • Build with tree-sitter CLI 0.27 (#465)
  • Add a schema link to tree-sitter.json (#408)

Upgrade notes

  • Queries: some code now parses to a different tree, so queries that matched the old shape may need updating.
  • New node types: directive_kind, directive_name, directive_separator, directive_value, extension_body, extension_declaration, ignored_directive, receiver_parameter and slice_pattern.
  • New fields: body on preproc_if, preproc_elif and preproc_else; kind, name, separator and value on ignored_directive; name and type on receiver_parameter.
  • Python: the package now requires tree-sitter 0.25 or later (#465).