Move LSP semantics into typed analysis
This commit is contained in:
parent
f4cd4f4458
commit
bac1183593
26 changed files with 1232 additions and 637 deletions
|
|
@ -10,7 +10,10 @@ type Program struct {
|
|||
Embeds []EmbedDecl
|
||||
}
|
||||
|
||||
type EmbedDecl struct{ Path, Name, Type string }
|
||||
type EmbedDecl struct {
|
||||
Path, Name, Type string
|
||||
TypeRef TypeRef
|
||||
}
|
||||
|
||||
type EnumDecl struct {
|
||||
Name string
|
||||
|
|
@ -20,6 +23,7 @@ type EnumDecl struct {
|
|||
type EnumVariant struct {
|
||||
Name string
|
||||
PayloadTypes []string
|
||||
PayloadRefs []TypeRef
|
||||
StringValue string
|
||||
}
|
||||
|
||||
|
|
@ -35,6 +39,7 @@ type InterfaceDecl struct {
|
|||
|
||||
type ClassDecl struct {
|
||||
Name string
|
||||
TypeParams []string
|
||||
Data bool
|
||||
JSONNaming string
|
||||
Table string
|
||||
|
|
@ -48,6 +53,7 @@ type FieldDecl struct {
|
|||
Private bool
|
||||
Name string
|
||||
Type string
|
||||
TypeRef TypeRef
|
||||
Column string
|
||||
ID bool
|
||||
Generated bool
|
||||
|
|
@ -55,22 +61,27 @@ type FieldDecl struct {
|
|||
|
||||
type FunctionSignature struct {
|
||||
Name string
|
||||
TypeParams []string
|
||||
Params []Param
|
||||
ReturnType string
|
||||
ReturnRef TypeRef
|
||||
Suspend bool
|
||||
}
|
||||
|
||||
type FunctionDecl struct {
|
||||
Name string
|
||||
TypeParams []string
|
||||
Params []Param
|
||||
ReturnType string
|
||||
ReturnRef TypeRef
|
||||
Body []Stmt
|
||||
Suspend bool
|
||||
}
|
||||
|
||||
type Param struct {
|
||||
Name string
|
||||
Type string
|
||||
Name string
|
||||
Type string
|
||||
TypeRef TypeRef
|
||||
}
|
||||
|
||||
type Stmt interface {
|
||||
|
|
@ -84,7 +95,9 @@ type Expr interface {
|
|||
type VarDecl struct {
|
||||
Mutable bool
|
||||
Name string
|
||||
Pos int
|
||||
Type string
|
||||
TypeRef TypeRef
|
||||
Value Expr
|
||||
}
|
||||
|
||||
|
|
@ -173,6 +186,7 @@ type TryCatchStmt struct {
|
|||
TryBody []Stmt
|
||||
CatchName string
|
||||
CatchType string
|
||||
CatchRef TypeRef
|
||||
CatchBody []Stmt
|
||||
}
|
||||
|
||||
|
|
@ -208,6 +222,7 @@ type MatchExprCase struct {
|
|||
type IdentExpr struct {
|
||||
Meta ExprMeta
|
||||
Name string
|
||||
Pos int
|
||||
}
|
||||
|
||||
func (IdentExpr) exprNode() {}
|
||||
|
|
@ -280,6 +295,7 @@ type SelectorExpr struct {
|
|||
Meta ExprMeta
|
||||
Receiver Expr
|
||||
Name string
|
||||
NamePos int
|
||||
}
|
||||
|
||||
func (SelectorExpr) exprNode() {}
|
||||
|
|
@ -288,6 +304,7 @@ type SafeSelectorExpr struct {
|
|||
Meta ExprMeta
|
||||
Receiver Expr
|
||||
Name string
|
||||
NamePos int
|
||||
}
|
||||
|
||||
func (SafeSelectorExpr) exprNode() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue