-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project import generated by Copybara.
GitOrigin-RevId: 27bf28e3d21a7b969b280acb713a692b6a2e2d2d
- Loading branch information
1 parent
17bb4a1
commit 965a79d
Showing
12 changed files
with
382 additions
and
68 deletions.
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
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
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
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,55 @@ | ||
Name: kotlinx.coroutines | ||
Named imports: | ||
kotlinx.coroutines | ||
|
||
Name: kotlinx.coroutines.sync | ||
Named imports: | ||
kotlinx.coroutines.sync | ||
|
||
Name: Foo | ||
Definition (definition.class): | ||
class Foo(param1: Int, param2: Int) { | ||
/** | ||
* Constructor docstring | ||
* | ||
* @param param1 | ||
* @param param2 | ||
*/ | ||
constructor(param1: Int, param2: Int) {} | ||
|
||
/** Method docstring */ | ||
fun methodWithDocstring(): void {} | ||
} | ||
|
||
Name: constructor | ||
Parameters: (param1: Int, param2: Int) | ||
Doc: | ||
/** | ||
* Constructor docstring | ||
* | ||
* @param param1 | ||
* @param param2 | ||
*/ | ||
Declaration (definition.constructor): | ||
constructor(param1: Int, param2: Int) {} | ||
Lineage: [Foo] | ||
Lineage types: [class] | ||
|
||
Name: methodWithDocstring | ||
Parameters: () | ||
Doc: | ||
/** Method docstring */ | ||
Definition (definition.function): | ||
fun methodWithDocstring(): void {} | ||
Lineage: [Foo] | ||
Lineage types: [class] | ||
|
||
Name: fib | ||
Parameters: (n: Int) | ||
Definition (definition.function): | ||
fun fib(n: Int): Int { | ||
if (n == 0 || n == 1) { | ||
return n | ||
} | ||
return fib(n - 1) + fib(n - 2) | ||
} |
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,62 @@ | ||
Name: strict | ||
Definition (definition.import): | ||
use strict 1.0; | ||
|
||
Name: feature | ||
Definition (definition.import): | ||
use feature 'class'; | ||
|
||
Name: FooClass | ||
Definition (definition.class): | ||
class FooClass { | ||
field $someField = 42; | ||
|
||
method bar { | ||
say "The answer is $someField"; | ||
} | ||
} | ||
|
||
Name: bar | ||
Definition (definition.function): | ||
method bar { | ||
say "The answer is $someField"; | ||
} | ||
Lineage: [FooClass] | ||
Lineage types: [class] | ||
|
||
Name: foo2 | ||
Parameters: () | ||
Doc: | ||
# foo2 comment | ||
Definition (definition.function): | ||
sub foo2 () { | ||
my $foo = Foo.new; | ||
$foo.bar | ||
} | ||
|
||
Name: new | ||
Parameters: ($class, $firstName, $lastName) | ||
Definition (definition.function): | ||
sub new ($class, $firstName, $lastName) { | ||
bless { firstName => $firstName, lastName => $lastName }, $class | ||
} | ||
|
||
Name: getFirstName | ||
Parameters: ($self) | ||
Definition (definition.function): | ||
sub getFirstName($self) { | ||
$self->{firstName} | ||
} | ||
|
||
Name: Average | ||
Definition (definition.function): | ||
sub Average { | ||
# get total number of arguments passed. | ||
$n = scalar(@_); | ||
$sum = 0; | ||
foreach $item (@_) { | ||
$sum += $item; | ||
} | ||
$average = $sum / $n; | ||
return $average; | ||
} |
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
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
Oops, something went wrong.