IsOp returns true if the given token is an operator
()
| 199 | |
| 200 | // IsOp returns true if the given token is an operator |
| 201 | func (tk *Token) IsOp() bool { |
| 202 | if tk.Tok >= token.ADD && tk.Tok <= token.DEFINE { |
| 203 | return true |
| 204 | } |
| 205 | return false |
| 206 | } |
| 207 | |
| 208 | // Contains returns true if the token string contains any of the given token(s) |
| 209 | func (tk Tokens) Contains(toks ...token.Token) bool { |