(s string)
| 8 | } |
| 9 | |
| 10 | func IsReserved(s string) bool { |
| 11 | switch s { |
| 12 | case "break": |
| 13 | return true |
| 14 | case "default": |
| 15 | return true |
| 16 | case "func": |
| 17 | return true |
| 18 | case "interface": |
| 19 | return true |
| 20 | case "select": |
| 21 | return true |
| 22 | case "case": |
| 23 | return true |
| 24 | case "defer": |
| 25 | return true |
| 26 | case "go": |
| 27 | return true |
| 28 | case "map": |
| 29 | return true |
| 30 | case "struct": |
| 31 | return true |
| 32 | case "chan": |
| 33 | return true |
| 34 | case "else": |
| 35 | return true |
| 36 | case "goto": |
| 37 | return true |
| 38 | case "package": |
| 39 | return true |
| 40 | case "switch": |
| 41 | return true |
| 42 | case "const": |
| 43 | return true |
| 44 | case "fallthrough": |
| 45 | return true |
| 46 | case "if": |
| 47 | return true |
| 48 | case "range": |
| 49 | return true |
| 50 | case "type": |
| 51 | return true |
| 52 | case "continue": |
| 53 | return true |
| 54 | case "for": |
| 55 | return true |
| 56 | case "import": |
| 57 | return true |
| 58 | case "return": |
| 59 | return true |
| 60 | case "var": |
| 61 | return true |
| 62 | case "q": |
| 63 | return true |
| 64 | default: |
| 65 | return false |
| 66 | } |
| 67 | } |