Add cli go.sum
This commit is contained in:
parent
62656c6dff
commit
61686b8b43
3 changed files with 24 additions and 0 deletions
|
|
@ -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