(parser)
| 967 | this.args = args; |
| 968 | } |
| 969 | static parse(parser) { |
| 970 | var token; |
| 971 | if (token = parser.matchTokenType("STRING")) { |
| 972 | return new _ObjectKey(token.value, null, null); |
| 973 | } else if (parser.matchOpToken("[")) { |
| 974 | var expr = parser.parseElement("expression"); |
| 975 | parser.requireOpToken("]"); |
| 976 | return new _ObjectKey(null, expr, { value: expr }); |
| 977 | } else { |
| 978 | var key = ""; |
| 979 | do { |
| 980 | token = parser.matchTokenType("IDENTIFIER") || parser.matchOpToken("-"); |
| 981 | if (token) key += token.value; |
| 982 | } while (token); |
| 983 | return new _ObjectKey(key, null, null); |
| 984 | } |
| 985 | } |
| 986 | evalStatically() { |
| 987 | if (!this.expr) return this.key; |
| 988 | return super.evalStatically(); |
nothing calls this directly
no test coverage detected