-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for more declarations and access modifiers in Carbon lexer (
- Loading branch information
1 parent
12a4d51
commit 2a0503b
Showing
3 changed files
with
282 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
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 { } | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.