This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/carbon/declarations.carbon

37 lines
No EOL
557 B
Text

package ExplorerTest api;
choice MyOptionalElement(ZZ:! type, YY:! type) {
None(YY),
Element(ZZ)
}
abstract class C {
var a: i32;
}
base class B {
var value_b: i32;
}
interface Vector {
fn Zero() -> Self;
fn Add[self: Self](b: Self) -> Self;
fn Scale[self: Self](v: i32) -> Self;
}
class Pal {
private var x: i32;
protected var y: i32;
friend Buddy;
}
abstract class MyAbstractClass {
protected fn Create() -> partial Self { }
}
constraint DrawVectorLegoFish {
impl as VectorLegoFish;
impl as Drawable;
}
impl JustX as X {}