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

Method lexComment

cli/pkg/ssh_config/lexer.go:27–41  ·  view source on GitHub ↗
(previousState sshLexStateFn)

Source from the content-addressed store, hash-verified

25}
26
27func (s *sshLexer) lexComment(previousState sshLexStateFn) sshLexStateFn {
28 return func() sshLexStateFn {
29 growingString := ""
30 for next := s.peek(); next != '\n' && next != eof; next = s.peek() {
31 if next == '\r' && s.follow("\r\n") {
32 break
33 }
34 growingString += string(next)
35 s.next()
36 }
37 s.emitWithValue(tokenComment, growingString)
38 s.skip()
39 return previousState
40 }
41}
42
43// lex the space after an equals sign in a function
44func (s *sshLexer) lexRspace() sshLexStateFn {

Callers 2

lexRvalueMethod · 0.95
lexVoidMethod · 0.95

Calls 5

peekMethod · 0.95
followMethod · 0.95
nextMethod · 0.95
emitWithValueMethod · 0.95
skipMethod · 0.95

Tested by

no test coverage detected