Function __global->parser_expect
Definitions
sources/webstandards_js_parse.php
- Expect a token during parsing. Give error if not found. Else give token parameters.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $token | string | No | No | required parameter | N/A | N/A | The token we want |
Returns
- The token parameters (null: error)
- Type: ?mixed
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Expect a token during parsing. Give error if not found. Else give token parameters.
*
* @param string $token The token we want
* @return ?mixed The token parameters (null: error)
*/
function parser_expect(string $token)
* Expect a token during parsing. Give error if not found. Else give token parameters.
*
* @param string $token The token we want
* @return ?mixed The token parameters (null: error)
*/
function parser_expect(string $token)

