![]() | Fun 0.41.5 The programming language that makes You have fun |
VM opcode snippet for OP_REGEX_MATCH (POSIX full-match). More...
Go to the source code of this file.
Functions | |
| if (str.type !=VAL_STRING||pattern.type !=VAL_STRING) | |
| free_value (pattern) | |
| free_value (str) | |
| push_value (vm, make_int(truth)) | |
Variables | |
| case | OP_REGEX_MATCH |
| Value | str = pop_value(vm) |
| int | truth = 0 |
| break | |
VM opcode snippet for OP_REGEX_MATCH (POSIX full-match).
This opcode checks whether a regular expression pattern matches the entire input string. It uses POSIX regex APIs on UNIX platforms and provides a graceful fallback elsewhere.
Behavior (stack effects):
Platform notes:
Errors:
Example:
Definition in file regex_match.c.
| free_value | ( | pattern | ) |
| free_value | ( | str | ) |
| if | ( | str.type ! | = VAL_STRING || pattern.type != VAL_STRING | ) |
Definition at line 42 of file regex_match.c.
| break |
Definition at line 52 of file regex_match.c.
| case OP_REGEX_MATCH |
Definition at line 39 of file regex_match.c.
| Value str = pop_value(vm) |
Definition at line 41 of file regex_match.c.
| int truth = 0 |
Definition at line 49 of file regex_match.c.