MCPcopy Create free account
hub / github.com/LissaGreense/GO4SQL / getLastCommand

Method getLastCommand

parser/parser.go:1030–1036  ·  view source on GitHub ↗
(sequence *ast.Sequence, currentToken string)

Source from the content-addressed store, hash-verified

1028}
1029
1030func (parser *Parser) getLastCommand(sequence *ast.Sequence, currentToken string) (ast.Command, error) {
1031 if len(sequence.Commands) == 0 {
1032 return nil, &NoPredecessorParserError{command: currentToken}
1033 }
1034 lastCommand := sequence.Commands[len(sequence.Commands)-1]
1035 return lastCommand, nil
1036}

Callers 1

ParseSequenceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected