MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / parseStart

Method parseStart

cli/pkg/ssh_config/parser.go:74–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72}
73
74func (p *sshParser) parseStart() sshParserStateFn {
75 tok := p.peek()
76
77 // end of stream, parsing is finished
78 if tok == nil {
79 return nil
80 }
81
82 switch tok.typ {
83 case tokenComment, tokenEmptyLine:
84 return p.parseComment
85 case tokenKey:
86 return p.parseKV
87 case tokenEOF:
88 return nil
89 default:
90 p.raiseErrorf(tok, fmt.Sprintf("unexpected token %q\n", tok))
91 }
92 return nil
93}
94
95func (p *sshParser) parseKV() sshParserStateFn {
96 key := p.getToken()

Callers

nothing calls this directly

Calls 2

peekMethod · 0.95
raiseErrorfMethod · 0.95

Tested by

no test coverage detected