Skip to content

Commit

Permalink
Project import generated by Copybara. (#18)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 8fdd334f5d601e719c09ac4240202a5326c0d9cb

Co-authored-by: Copybara Bot <[email protected]>
  • Loading branch information
pqn and Copybara Bot authored Apr 27, 2023
1 parent f30eafb commit dba2dc9
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 3 deletions.
2 changes: 1 addition & 1 deletion download_parse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -euo pipefail

cd "$(dirname "${BASH_SOURCE[0]}")"
VERSION="v0.0.9"
VERSION="v0.0.10"
rm -f parse.gz parse
curl -Lo parse.gz "https://github.com/Exafunction/codeium-parse/releases/download/$VERSION/parse.gz"
gzip -d parse.gz
Expand Down
16 changes: 15 additions & 1 deletion goldens/test.cpp.golden
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
Name: bar
Definition (definition.namespace):
namespace bar {
// Declaration.
bool baz(const std::string& bing);

struct Foo2;

}

Name: baz
Parameters: (const std::string& bing)
Doc:
// Declaration.
Declaration (definition.function):
bool baz(const std::string& bing);
Lineage: [bar]
Lineage types: [namespace]

Name: bar::bar2
Name: bar2
Definition (definition.namespace):
namespace bar::bar2 {
struct Foo3;
}
Lineage: [bar]
Lineage types: [namespace]

Name: Foo
Definition (definition.class):
Expand Down
17 changes: 17 additions & 0 deletions goldens/test.html.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Name: fib
Parameters: (n)
Definition (definition.function):
function fib(n) {
if (n <= 1) {
return n;
}
return fib(n - 1) + fib(n - 2);
}

Name: fib
Reference (reference.call):
fib(n - 1)

Name: fib
Reference (reference.call):
fib(n - 2)
4 changes: 3 additions & 1 deletion queries/cpp_tags.scm
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@
)

(namespace_definition
name: (namespace_definition_name) @name) @definition.namespace
name: (_) @name
(#lineage-from-name! "::")
) @definition.namespace
15 changes: 15 additions & 0 deletions queries/html_injections.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(script_element
(start_tag) @_
(raw_text) @injection.content
(#not-match? @_ " src=")
(#match? @_ " type=\"text/javascript\"")
(#set! injection.language javascript)
)

(script_element
(start_tag) @_
(raw_text) @injection.content
(#not-match? @_ " src=")
(#not-match? @_ " type=")
(#set! injection.language javascript)
)
File renamed without changes.
17 changes: 17 additions & 0 deletions test_files/test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>

<script type="text/javascript">
function fib(n) {
if (n <= 1) {
return n;
}
return fib(n - 1) + fib(n - 2);
}
</script>
</head>
<body>
</body>
</html>

0 comments on commit dba2dc9

Please sign in to comment.