-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support new attribute shorthand #173
Merged
tgross35
merged 12 commits into
IndianBoy42:main
from
mkatychev:feat/attribute-shorthand
Nov 19, 2024
Merged
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
49ef9bc
added attribute shorthand
mkatychev 0d5dedc
typos
mkatychev c806471
ran partial just
mkatychev b0cade6
Merge branch 'main' into feat/attribute-shorthand
mkatychev 2d1907d
update gen
mkatychev 760f0f7
reverr gitignore
mkatychev 63c99de
rever cargo.toml changes
mkatychev 63f611c
reformat
mkatychev cfe53da
Merge branch 'main' into feat/attribute-shorthand
mkatychev eb85e8c
Merge branch 'main' into feat/attribute-shorthand
mkatychev bc7a9b1
updated npx tree-sitter-cli version to `0.24.4`
mkatychev 8a73365
split k/v attribute check into separate test
mkatychev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/// <reference types="node" /> | ||
|
||
const assert = require("node:assert"); | ||
const { test } = require("node:test"); | ||
|
||
test("can load grammar", () => { | ||
const parser = new (require("tree-sitter"))(); | ||
assert.doesNotThrow(() => parser.setLanguage(require("."))); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from unittest import TestCase | ||
|
||
import tree_sitter, tree_sitter_just | ||
|
||
|
||
class TestLanguage(TestCase): | ||
def test_can_load_grammar(self): | ||
try: | ||
tree_sitter.Language(tree_sitter_just.language()) | ||
except Exception: | ||
self.fail("Error loading Just grammar") |
12 changes: 12 additions & 0 deletions
12
bindings/swift/TreeSitterJustTests/TreeSitterJustTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import XCTest | ||
import SwiftTreeSitter | ||
import TreeSitterJust | ||
|
||
final class TreeSitterJustTests: XCTestCase { | ||
func testCanLoadGrammar() throws { | ||
let parser = Parser() | ||
let language = Language(language: tree_sitter_just()) | ||
XCTAssertNoThrow(try parser.setLanguage(language), | ||
"Error loading Just grammar") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do these new tests in
bindings
work? They don't seem to be getting run in CI.I would rather put these new tests in a separate PR if possible, along with a check in CI via the root justfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something created by
tree-sitter
cli with the latest version, I will try to see where this is createdThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, interesting. No worries then, it can stick around if it's the same version used in CI (which should probably be bumped)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually unable to produce the
bindings_test.js
, I've deleted the file :\