blob: abccceaec4c1797a59d7df3a0560f0175562b292 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This is the library
library foo;
using something.or.another as thing;
struct arrays {
array<handle>:1 handle_0;
};
// My oh my
struct DirectoryObject {
int32 y;
};
const uint64 w = 9021;
// Random comment
const uint32 x = 9021;
const uint32 y = 9021;
// My wonderful constant
const uint32 z = 9021;
// Comment requiring space
enum Enum2 : uint32 {
enum_0 = 0; // More comments
};
union MyUnion { // super annoying!
string? s;
};
/// Doc comments
/// of multiple
/// lines
struct Foo {
request<Iface>? nullable_request;
vector<handle<channel>> monoid;
vector<handle<channel>> drahvin;
};
table Table1 {
1: int64 x;
2: int64 y;
};
table Table2 {
3: reserved;
2: int64 x;
1: int64 y;
};
table Table3 {
/// Multiline
/// doc comments should
1: int64 indent_correctly;
};
// This { should } not be indented
// My interface is so wonderful.
// It is the most wonderful interface of them all.
[Discoverable]
interface Iface
{
1: Foo()
-> (int i);
[Awesome]
122: Analyze(handle<process> process, handle<thread> thread)
-> ();
// Figure it out.
2: -> Bar(int32 i, int32 k);
3: Baz(int32 j, string k) -> (int32 y);
104: Nimon(int32 j, string k)
-> (int32 y);
Mandrel(int32 j, string k)
-> (int32 y);
6: Cat(string? s) -> (bool b);
102: Karfel(
int32 x) -> (int y);
10341: Gavrok // ( heh heh ->
( // ( An annoying comment.
int a, int b) -> ();
4: -> Goo(int32 p, string:32 s);
5: Baz(int32 j, string:40 k
) -> (int32 y);
7: SomeMethodWithAResponse() -> ();
// A comment that isn't so annoying
101: MethodResponse(int a, int b, string:40 c,
int d, int e) -> (int f, int g,
int h);
100: MethodResponse2()
-> ();
1024: MethodResponse3(int64 a)
-> ();
JustPlainNoOrdinal() -> ();
// Comment and
NoOrdinal(int64 i) -> (string s);
/// Doc Comment and
[Attribute]
2048: -> End();
/// Multiple
/// Doc Comments and
[Attribute]
2048: -> End();
999: -> End();
1000: -> End();
};
// Comments at EOF