Add cli go.sum
This commit is contained in:
parent
62656c6dff
commit
61686b8b43
3 changed files with 24 additions and 0 deletions
8
cli/go.sum
Normal file
8
cli/go.sum
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
|
||||
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
|
||||
github.com/alecthomas/kong v1.5.1 h1:9quB93P2aNGXf5C1kWNei85vjBgITNJQA4dSwJQGCOY=
|
||||
github.com/alecthomas/kong v1.5.1/go.mod h1:p2vqieVMeTAnaC83txKtXe8FLke2X07aruPWXyMPQrU=
|
||||
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
|
||||
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
|
||||
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
|
||||
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
|
||||
|
|
@ -27,6 +27,7 @@ const (
|
|||
CallNodeType
|
||||
FunctionNodeType
|
||||
ReturnNodeType
|
||||
BreakpointNodeType
|
||||
)
|
||||
|
||||
func (n NodeType) String() string {
|
||||
|
|
@ -292,3 +293,13 @@ func (n ReturnNode) Type() NodeType {
|
|||
func (n ReturnNode) String() string {
|
||||
return fmt.Sprintf("return %s", n.value)
|
||||
}
|
||||
|
||||
type BreakpointNode struct{}
|
||||
|
||||
func (n BreakpointNode) Type() NodeType {
|
||||
return BreakpointNodeType
|
||||
}
|
||||
|
||||
func (n BreakpointNode) String() string {
|
||||
return "breakpoint"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -391,6 +391,11 @@ func (p *Parser) statement() Node {
|
|||
p.condition(),
|
||||
}
|
||||
|
||||
case TokenBreakpoint:
|
||||
p.advance()
|
||||
|
||||
return &BreakpointNode{}
|
||||
|
||||
default:
|
||||
p.error("invalid statement", p.curr)
|
||||
p.advance()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue