(parser)
| 50 | } |
| 51 | |
| 52 | parseCommand(parser) { |
| 53 | if (parser.matchOpToken("(")) { |
| 54 | const commandElement = parser.requireElement("command"); |
| 55 | parser.requireOpToken(")"); |
| 56 | return commandElement; |
| 57 | } |
| 58 | var commandDefinition = this.#commands[parser.currentToken().value || ""]; |
| 59 | let commandElement; |
| 60 | if (commandDefinition) { |
| 61 | commandElement = commandDefinition(parser); |
| 62 | } else if (parser.currentToken().type === "IDENTIFIER") { |
| 63 | commandElement = parser.parseElement("pseudoCommand"); |
| 64 | } |
| 65 | if (commandElement) { |
| 66 | return this.parseElement("indirectStatement", parser, commandElement); |
| 67 | } |
| 68 | return commandElement; |
| 69 | } |
| 70 | |
| 71 | parseCommandList(parser) { |
| 72 | if (parser.hasMore()) { |
nothing calls this directly
no test coverage detected