Expressif.Syntax 0.18.1

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Expressif.Syntax --version 0.18.1
                    
NuGet\Install-Package Expressif.Syntax -Version 0.18.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Expressif.Syntax" Version="0.18.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Expressif.Syntax" Version="0.18.1" />
                    
Directory.Packages.props
<PackageReference Include="Expressif.Syntax" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Expressif.Syntax --version 0.18.1
                    
#r "nuget: Expressif.Syntax, 0.18.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Expressif.Syntax@0.18.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Expressif.Syntax&version=0.18.1
                    
Install as a Cake Addin
#tool nuget:?package=Expressif.Syntax&version=0.18.1
                    
Install as a Cake Tool

Expressif.Syntax

Expressif logo

Expressif.Syntax provides the Tree-sitter parser for the Expressif expression language, together with bindings for supported programming languages.

The parser defines the concrete syntax of Expressif independently from its runtime implementations. It is intended to provide a common syntax foundation for the C#, Python and TypeScript implementations of Expressif, as well as editor tooling and language-server support.

About | Repository structure | Development | Releases

About

Project: Expressif Tree-sitter

Releases: GitHub Release GitHub Release Date licence badge

Dev. activity: GitHub last commit Still maintained GitHub commit activity

Continuous integration builds: CI

Status: stars badge Bugs badge Features badge

Purpose

Expressif.Syntax separates the syntax of the Expressif language from its runtime semantics.

The Tree-sitter grammar parses source text into a syntax tree while preserving syntactic constructs such as shorthands. Language-specific bindings can then translate this tree into the semantic representation expected by an Expressif implementation.

For example:

.foo

is represented syntactically as a field-access construct, while:

field(foo)

is represented as a regular function call. Both can later be bound to the same semantic operation:

field(foo)

This separation allows the same parser to support:

  • Expressif for C#
  • Expressif for Python
  • Expressif for TypeScript
  • language servers
  • syntax highlighting and other editor tooling

Structural access

Expressif distinguishes record fields from elements of ordered values:

.name       named field of the current record
.0          positional field of the current record
^.name      named field of the original immutable input record
^.0         positional field of the original immutable input record
$0          first element of the current tuple or array
$1          second element of the current tuple or array
$^0         last element of the current tuple or array
$^1         second-to-last element of the current tuple or array

Record access always uses . for navigation. A leading ^ changes the root from the current pipeline value to the original immutable input; it does not change how fields are selected. Access can be chained for nested records, for example .customer.address or ^.customer.0. The former bracket forms [name] and [0] are replaced by ^.name and ^.0 respectively.

Element positions are zero-based. $n counts from the beginning and $^n counts from the end. The parser represents both tuple and array access with the same positional_element_access node; downstream binders decide whether the runtime value supports positional access and how invalid or out-of-range access is handled.

Repository structure

.
├── grammar.js
├── tree-sitter.json
├── package.json
├── src/
│   ├── parser.c
│   ├── grammar.json
│   └── node-types.json
├── bindings/
│   ├── csharp/
│   ├── python/
│   └── typescript/
├── queries/
│   └── highlights.scm
└── test/

grammar.js is the source definition of the Expressif grammar.

The files under src/ are generated by Tree-sitter and are committed to source control so consumers do not need the Tree-sitter CLI to build the parser.

Language-specific integration is located under bindings/.

Development

Install the dependencies:

npm install

Generate the parser:

npx tree-sitter generate

Run the grammar tests:

npx tree-sitter test

The grammar should remain independent from the Expressif function catalogue. Parsing determines the syntactic structure of an expression; resolution of functions, predicates, accumulators and their accepted arguments belongs to the language-specific semantic binding layer.

Releases

For every push to main, the release workflow independently validates the parser and all bindings, builds the release packages, and calculates the repository version with GitVersion. When validation succeeds and the calculated semantic version has a patch component of 0, it creates the corresponding vX.Y.0 tag and GitHub release. Other versions complete package validation without creating a tag or release.

Each GitHub release contains every validated package produced by scripts/package.ps1:

  • the TypeScript/Node package
  • the Python wheel and source distribution
  • the C# NuGet package
  • the native parser source archive

Only the C# package is currently published to an external registry. NuGet publication uses GitHub OIDC trusted publishing to obtain a short-lived API key, so no long-lived NuGet API key is stored in the repository. Configure the trusted publishing policy on NuGet.org with these values:

  • Repository Owner: Seddryck
  • Repository: Expressif.Syntax
  • Workflow File: release.yml
  • Environment: leave blank

The policy's NuGet user must be Seddryck, matching the NuGet/login step in the workflow. Python and TypeScript/Node packages remain available as GitHub release artifacts until PyPI and npm publishing are implemented.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.22.0 40 8/22/2026
0.21.0 260 8/19/2026
0.20.0 105 8/19/2026
0.19.0 111 8/18/2026
0.18.1 92 8/18/2026
0.17.0 130 8/17/2026
0.16.0 101 8/17/2026
0.15.0 89 8/16/2026
0.14.0 99 8/16/2026
0.10.0 109 8/15/2026
0.9.0 128 8/13/2026
0.8.0 101 8/13/2026
0.7.0 90 8/12/2026
0.6.0 87 8/12/2026
0.5.0 89 8/12/2026