Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tree-sitter-wing"
description = "Wing grammar for tree-sitter"
version = "0.83.11"
version = "0.85.49"
license = "MIT"
readme = "README.md"
keywords = ["incremental", "parsing", "tree-sitter", "wing"]
Expand Down
2 changes: 1 addition & 1 deletion Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 14 additions & 4 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ module.exports = grammar({

// These modifier conflicts should be solved through GLR parsing
[$.field_modifiers, $.method_modifiers],
[$.class_modifiers, $.closure_modifiers, $.interface_modifiers],
],

supertypes: ($) => [$.expression, $._literal],
Expand Down Expand Up @@ -378,7 +377,8 @@ module.exports = grammar({
$.json_literal,
$.struct_literal,
$.optional_unwrap,
$.intrinsic
$.intrinsic,
$.type_intrinsic,
),

intrinsic: ($) =>
Expand All @@ -390,6 +390,15 @@ module.exports = grammar({
),
intrinsic_identifier: ($) => /@[A-Za-z_$0-9]*/,

// TODO: is there some way to generalize this
// so we can define other intrinsics or functions that accept types?
type_intrinsic: ($) => seq(
"@type",
"(",
field("type", $._type),
")"
),

// Primitives
_literal: ($) =>
choice(
Expand Down Expand Up @@ -539,7 +548,8 @@ module.exports = grammar({
"void",
"duration",
"datetime",
"regex"
"regex",
"bytes"
),

initializer: ($) =>
Expand Down Expand Up @@ -671,7 +681,7 @@ module.exports = grammar({
);
},

closure_modifiers: ($) => repeat1(choice($.phase_specifier)),
closure_modifiers: ($) => choice($.phase_specifier),

closure: ($) =>
seq(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglang/tree-sitter-wing",
"version": "0.83.11",
"version": "0.85.49",
"description": "winglang grammar for tree-sitter",
"main": "bindings/node",
"types": "bindings/node",
Expand Down
38 changes: 19 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "tree-sitter-wing"
description = "Wing grammar for tree-sitter"
version = "0.83.11"
version = "0.85.49"
keywords = ["incremental", "parsing", "tree-sitter", "wing"]
classifiers = [
"Intended Audience :: Developers",
Expand Down
55 changes: 40 additions & 15 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 61 additions & 1 deletion src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading