conlang: Self is not a type, it's a path to a type

This commit is contained in:
2024-07-17 15:05:52 -05:00
parent ded100bf71
commit b3d62c09aa
11 changed files with 25 additions and 20 deletions

View File

@@ -62,7 +62,7 @@ TyFn = "fn" TyTuple ('->' Ty)? ;
(* path *)
Path = PathPart ('::' PathPart)*
| '::' (PathPart ('::' PathPart)*)? ;
PathPart = "super" | "self" | Identifier ;
PathPart = "super" | "self" | "Self" | Identifier ;
Identifier = IDENTIFIER ;