Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Merge branch 'fwcd:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
itsaky authored Oct 17, 2023
2 parents cf989bb + 5baa0fe commit 900327f
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 24 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
EMSCRIPTEN_VERSION: '2.0.17'
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Emscripten
uses: mymindstorm/setup-emsdk@v12
with:
version: ${{ env.EMSCRIPTEN_VERSION }}
- name: Install dependencies
run: npm install
- name: Generate parser
Expand All @@ -27,6 +33,13 @@ jobs:
test -z "$diff"
- name: Run tests
run: npm test
- name: Build WASM binary
run: npm run build-wasm
- name: Upload WASM binary
uses: actions/upload-artifact@v3
with:
name: tree-sitter-kotlin.wasm
path: ./tree-sitter-kotlin.wasm
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/deploy-to-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
env:
EMSCRIPTEN_VERSION: '2.0.17'
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Emscripten
uses: mymindstorm/setup-emsdk@v12
with:
version: ${{ env.EMSCRIPTEN_VERSION }}
- name: Install dependencies
run: npm install
- name: Compile grammar
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

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-kotlin"
description = "Kotlin grammar for the tree-sitter parsing library"
version = "0.2.11"
version = "0.3.2"
keywords = ["incremental", "parsing", "kotlin"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/fwcd/tree-sitter-kotlin"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION := 0.2.11
VERSION := 0.3.2

# Repository
SRC_DIR := src
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Kotlin Grammar for Tree-Sitter

[![Build](https://github.com/fwcd/tree-sitter-kotlin/actions/workflows/build.yml/badge.svg)](https://github.com/fwcd/tree-sitter-kotlin/actions/workflows/build.yml)
[![NPM](https://img.shields.io/npm/v/tree-sitter-kotlin)](https://www.npmjs.com/package/tree-sitter-kotlin)
[![crates.io](https://img.shields.io/crates/v/tree-sitter-kotlin)](https://crates.io/crates/tree-sitter-kotlin)

[Kotlin](https://kotlinlang.org) language grammar for [Tree-Sitter](http://tree-sitter.github.io/tree-sitter/). You can try it out directly [on the web](https://fwcd.github.io/tree-sitter-kotlin).

Expand Down
2 changes: 1 addition & 1 deletion bindings/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This crate provides a Kotlin grammar for the [tree-sitter](https://tree-sitter.g

```toml
tree-sitter = "0.20"
tree-sitter-kotlin = "0.2.11"
tree-sitter-kotlin = "0.3.2"
```

Typically, you will use the `language` function to add this grammar to a tree-sitter [`Parser`](https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html), and then use the parser to parse some code:
Expand Down
9 changes: 0 additions & 9 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ module.exports = grammar({
// Ambiguous when used in an explicit delegation expression,
// since the '{' could either be interpreted as the class body
// or as the anonymous function body. Consider the following sequence:
//
// 'class' simple_identifier ':' user_type 'by' 'fun' '(' ')' • '{' …
//
// Possible interpretations:
//
// 'class' simple_identifier ':' user_type 'by' (anonymous_function 'fun' '(' ')' • function_body)
// 'class' simple_identifier ':' user_type 'by' (anonymous_function 'fun' '(' ')') • '{' …
[$.anonymous_function],

// Member access operator '::' conflicts with callable reference
[$._primary_expression, $.callable_reference],
Expand All @@ -84,7 +76,6 @@ module.exports = grammar({
[$._postfix_unary_expression, $._expression],

// ambiguity between generics and comparison operations (foo < b > c)
[$.call_expression, $.prefix_expression, $.comparison_expression],
[$.call_expression, $.range_expression, $.comparison_expression],
[$.call_expression, $.elvis_expression, $.comparison_expression],
[$.call_expression, $.check_expression, $.comparison_expression],
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tree-sitter-kotlin",
"version": "0.2.11",
"version": "0.3.2",
"description": "Tree-Sitter grammar for Kotlin",
"main": "bindings/node",
"scripts": {
Expand Down
8 changes: 0 additions & 8 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -6089,9 +6089,6 @@
}
],
"conflicts": [
[
"anonymous_function"
],
[
"_primary_expression",
"callable_reference"
Expand All @@ -6112,11 +6109,6 @@
"_postfix_unary_expression",
"_expression"
],
[
"call_expression",
"prefix_expression",
"comparison_expression"
],
[
"call_expression",
"range_expression",
Expand Down

0 comments on commit 900327f

Please sign in to comment.