feat: add managed types, source classes and scoped native calls

This commit is contained in:
2026-10-21 01:47:08 +08:00
parent 7c842789c0
commit a970fd7707
48 changed files with 2069 additions and 134 deletions
+4
View File
@@ -12,17 +12,21 @@ module Endor {
Program = (Decl* declarations, span span)
Decl = (DeclKind kind, span span)
DeclKind = Function(Function definition)
| Class(Class definition)
Class = (Name name, Name? base, Parameter* fields, Function* methods, span span)
Function = (Name name, Parameter* parameters, Name return_type, Block body, span span)
Parameter = (Name name, Name type_name, span span)
Block = (Stmt* statements, span span)
Stmt = (StmtKind kind, span span)
StmtKind = Binding(Binding binding)
| Assignment(Assignment assignment)
| MemberAssignment(MemberAssignment assignment)
| Return(ReturnStatement statement)
| Expression(Expr expression)
| Declaration(Decl declaration)
Binding = (Name name, Expr value, span span)
Assignment = (Name name, Expr value, span span)
MemberAssignment = (Expr object, Name name, Expr value, span span)
ReturnStatement = (Expr? value, span span)
InteractiveInput = (Stmt* statements, span span)