Pop the front token off the Scanner.
()
| 149 | |
| 150 | // Pop the front token off the Scanner. |
| 151 | func (s *Scanner) Pop() Token { |
| 152 | if len(s.args) == 0 { |
| 153 | return Token{Type: EOLToken} |
| 154 | } |
| 155 | arg := s.args[0] |
| 156 | s.args = s.args[1:] |
| 157 | return arg |
| 158 | } |
| 159 | |
| 160 | type expectedError struct { |
| 161 | context string |
no outgoing calls