Created
December 13, 2012 07:11
-
-
Save nelhage/4274692 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case 'G': | |
if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR)) break; | |
tok->type = TK_ANCHOR; | |
tok->u.subtype = ANCHOR_BEGIN_POSITION; | |
break; | |
// elsewhere | |
case '^': | |
if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break; | |
tok->type = TK_ANCHOR; | |
tok->u.subtype = (IS_SINGLELINE(env->option) | |
? ANCHOR_BEGIN_BUF : ANCHOR_BEGIN_LINE); | |
break; | |
// regexec.c: | |
case OP_BEGIN_POSITION: MOP_IN(OP_BEGIN_POSITION); | |
if (s != msa->start) | |
goto fail; | |
MOP_OUT; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment