()
| 87 | } |
| 88 | |
| 89 | func (s *sshLexer) lexRvalue() sshLexStateFn { |
| 90 | growingString := "" |
| 91 | for { |
| 92 | next := s.peek() |
| 93 | switch next { |
| 94 | case '\r': |
| 95 | if s.follow("\r\n") { |
| 96 | s.emitWithValue(tokenString, growingString) |
| 97 | s.skip() |
| 98 | return s.lexVoid |
| 99 | } |
| 100 | case '\n': |
| 101 | s.emitWithValue(tokenString, growingString) |
| 102 | s.skip() |
| 103 | return s.lexVoid |
| 104 | case '#': |
| 105 | s.emitWithValue(tokenString, growingString) |
| 106 | s.skip() |
| 107 | return s.lexComment(s.lexVoid) |
| 108 | case eof: |
| 109 | s.next() |
| 110 | } |
| 111 | if next == eof { |
| 112 | break |
| 113 | } |
| 114 | growingString += string(next) |
| 115 | s.next() |
| 116 | } |
| 117 | s.emit(tokenEOF) |
| 118 | return nil |
| 119 | } |
| 120 | |
| 121 | func (s *sshLexer) read() rune { |
| 122 | r := s.peek() |
nothing calls this directly
no test coverage detected