Skip to content

Commit

Permalink
Merge pull request #38 from ganezdragon/feature/improve_performance
Browse files Browse the repository at this point in the history
Performances fixes
  • Loading branch information
ganezdragon authored Mar 3, 2024
2 parents 15a6914 + 2e1dcf0 commit a882a92
Show file tree
Hide file tree
Showing 21 changed files with 490,704 additions and 1,669,256 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ node_modules/
9.3.5/
bin/
build/
prebuilds/

# swift bindings
.build/
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
"type_traits": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"utility": "cpp"
"utility": "cpp",
"__memory": "c",
"wctype.h": "c"
}
}
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let package = Package(
],
sources: [
"src/parser.c",
"src/scanner.cc",
"src/scanner.c",
],
publicHeadersPath: "bindings/swift",
cSettings: [.headerSearchPath("src")])
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# tree-sitter-perl
a perl parser for javascript
a perl parser using tree-sitter

## To generate the parser output
# Getting started

## To just generate the parser output
`npm run generate`

## Tests
Expand All @@ -11,3 +13,9 @@ a perl parser for javascript
## Run examples

`npm run example`

## To build the wasm file

1. Run pre-build `npm run pre-build`
2. Run build `npm run build`
3. Generate the wasm file `npm run build-wasm` (make sure you are running docker daemon)
2 changes: 1 addition & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"sources": [
"src/parser.c",
"src/scanner.cc",
"src/scanner.c",
"bindings/node/binding.cc"
],
"cflags_c": [
Expand Down
34 changes: 34 additions & 0 deletions examples/FunctionAttributes.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
use strict;
use warnings;
use base qw/Catalyst::Controller/;

=head1 METHODS
=head2 test1
Test
=cut

sub test1 : Path('/') {
}

=head2 test2
Looks good. But now...
=cut

sub test2 : Path('/') Args(0) {
}

=head3 test3
Hmmm, this is looks odd now
=cut

sub test3 {
}

1;
Loading

0 comments on commit a882a92

Please sign in to comment.