Skip to content
Closed
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
22 changes: 0 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,3 @@ jobs:
uses: tree-sitter/parser-test-action@v2
with:
test-rust: ${{runner.os == 'Linux'}}
fuzz:
name: Fuzz scanner
runs-on: ubuntu-latest
if: >-
!github.event.repository.is_template &&
github.event.head_commit.message != 'Initial commit'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check for scanner changes
id: scanner-check
shell: sh
run: |-
{
test -f src/scanner.c && ! git diff --quiet HEAD^ -- "$_" &&
printf 'changed=true\n' || printf 'changed=false\n'
} >> "$GITHUB_OUTPUT"
- uses: actions/setup-node@v4
- run: npm install
- name: Run fuzzer
uses: tree-sitter/fuzz-action@v4
if: steps.scanner-check.outputs.changed == 'true'
19 changes: 19 additions & 0 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Fuzz Parser

on:
push:
branches: [master]
paths:
- src/scanner.c
- src/tree-sitter-typescript/scanner.h
pull_request:
paths:
- src/scanner.c
- src/tree-sitter-typescript/scanner.h

jobs:
fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: tree-sitter/fuzz-action@v4
7 changes: 7 additions & 0 deletions bindings/rust/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
fn main() {
let root_dir = std::path::Path::new(".");
let src_dir = std::path::Path::new("src");
let typescript_dir = root_dir.join("tree-sitter-typescript").join("src");

let mut c_config = cc::Build::new();
c_config.include(&src_dir);
Expand All @@ -18,6 +20,11 @@ fn main() {

let scanner_path = src_dir.join("scanner.c");
c_config.file(&scanner_path);

println!(
"cargo:rerun-if-changed={}",
typescript_dir.join("scanner.h").to_str().unwrap()
);
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());

c_config.compile("parser");
Expand Down
1 change: 1 addition & 0 deletions queries/glimmer_typescript/indents.scm
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
(glimmer_opening_tag) @indent.begin

(glimmer_closing_tag) @indent.end