-
-
Notifications
You must be signed in to change notification settings - Fork 137
Fix ambiguity between function signature and function declaration #126
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
Merged
maxbrunsfeld
merged 6 commits into
tree-sitter:master
from
resolritter:function_signature
Feb 5, 2021
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0440dd5
fix ambiguity between function signature and function declaration
resolritter 8a3c915
tweak parse-examples script
resolritter cfdfa84
add redux to the ignored repositories
resolritter 789a0d0
regenerate parser for function_signature
resolritter 2343397
Simplify function_signature rule
maxbrunsfeld a6f1e71
Move known failures from parse-examples script into known_failures.txt
maxbrunsfeld 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 hidden or 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 |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ build | |
| package-lock.json | ||
| /test.ts | ||
| examples/desktop | ||
| examples/redux | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,3 @@ | ||
| examples/redux/src/types/middleware.ts | ||
| examples/redux/src/types/reducers.ts | ||
| examples/redux/src/types/store.ts |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -3,28 +3,50 @@ | |
| set -e | ||
|
|
||
| cd "$(dirname "$0")/.." | ||
| root="$PWD" | ||
|
|
||
| function clone_repo { | ||
| owner=$1 | ||
| name=$2 | ||
| sha=$3 | ||
| clone_repo() { | ||
| local owner=$1 | ||
| local name=$2 | ||
| local sha=$3 | ||
| local folder="$4" | ||
| local path="$root/examples/$name" | ||
|
|
||
| path=examples/$name | ||
| if [ ! -d "$path" ]; then | ||
| if [ -d "$path" ]; then | ||
| pushd "$path" > /dev/null | ||
| if [ "$(git rev-parse HEAD 2>/dev/null)" == "$sha" ]; then | ||
| popd > /dev/null | ||
| return | ||
| else | ||
| popd > /dev/null | ||
| rm -rf "$path" | ||
| echo "Updating $owner/$name to $sha" | ||
| fi | ||
| else | ||
| echo "Cloning $owner/$name" | ||
| git clone "https://github.com/$owner/$name" "$path" | ||
| fi | ||
|
|
||
| mkdir -p "$path" | ||
| pushd "$path" > /dev/null | ||
| if [ "$(git rev-parse head)" != "$sha" ]; then | ||
| echo "Updating $owner/$name to $sha" | ||
| git fetch | ||
| git reset --hard $sha | ||
| git init | ||
| git remote add origin "https://github.com/$owner/$name" | ||
| git pull --ff-only --depth 1 origin "$sha" | ||
| if [ "${folder:-}" ]; then | ||
| while IFS= read -r file; do | ||
| echo "${folder}" "$file" | ||
| if [ "$file" != "$folder" ]; then | ||
| rm -r "$file" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be > rm -r .git
rm: remove write-protected regular file '.git/objects/58/7ff082e0b98914788500eae5dd6a33f04883c9'? The intention is to remove anything unrelated to the |
||
| fi | ||
| done < <(ls -A "$path") | ||
| fi | ||
| popd > /dev/null | ||
| } | ||
|
|
||
| clone_repo desktop desktop d1324f56d02dd9afca5d2e9da545905a7d41d671 | ||
| clone_repo reduxjs redux 45111a63d39a0c0fbd8b5417b2ad623718d42d66 | ||
| # commented out due to too many errors | ||
| #clone_repo microsoft vscode bead496a613e475819f89f08e9e882b841bc1fe8 | ||
| #clone_repo microsoft TypeScript 05e2f74fbef4a935f1e7daea9c9eb152e3956085 src | ||
|
|
||
| known_failures="$(cat script/known_failures.txt)" | ||
|
|
||
|
|
||
This file contains hidden or 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
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.
This is a print debugging leftover. Not sure if you mind.
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.
Oh yeah, I missed that. What is this while loop for?
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.
It's for cleaning unrelated folders before the
**/*.tsglob. In the TypeScript repository there's the tests folder which has some broken files on purpose, so I thought I only wanted thesrcfolder which is more certain to have only valid syntax.This loop goes over the files in the directory and removes everything that's not
$folder- in this case I was passingsrcas$foldersince that's the only one I'm interested in.