IsGo returns true if the given token is a Go Keyword or Comment
()
| 99 | |
| 100 | // IsGo returns true if the given token is a Go Keyword or Comment |
| 101 | func (tk *Token) IsGo() bool { |
| 102 | if tk.Tok >= token.BREAK && tk.Tok <= token.VAR { |
| 103 | return true |
| 104 | } |
| 105 | if tk.Tok == token.COMMENT { |
| 106 | return true |
| 107 | } |
| 108 | return false |
| 109 | } |
| 110 | |
| 111 | // IsValidExecIdent returns true if the given token is a valid component |
| 112 | // of an Exec mode identifier |
no outgoing calls
no test coverage detected