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

Method lexKey

cli/pkg/ssh_config/lexer.go:72–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70}
71
72func (s *sshLexer) lexKey() sshLexStateFn {
73 growingString := ""
74
75 for r := s.peek(); isKeyChar(r); r = s.peek() {
76 // simplified a lot here
77 if isSpace(r) || r == '=' {
78 s.emitWithValue(tokenKey, growingString)
79 s.skip()
80 return s.lexEquals
81 }
82 growingString += string(r)
83 s.next()
84 }
85 s.emitWithValue(tokenKey, growingString)
86 return s.lexEquals
87}
88
89func (s *sshLexer) lexRvalue() sshLexStateFn {
90 growingString := ""

Callers

nothing calls this directly

Calls 6

peekMethod · 0.95
emitWithValueMethod · 0.95
skipMethod · 0.95
nextMethod · 0.95
isKeyCharFunction · 0.85
isSpaceFunction · 0.85

Tested by

no test coverage detected