pike.git
/
src
/
lexer.h
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/lexer.h:1062:
return '>'; case '!': if(GOBBLE('=')) return TOK_NE; return TOK_NOT; case '(': if(GOBBLE('<')) return TOK_MULTISET_START; return '(';
-
case ']':
+
case '?':
-
+
if(GOBBLE(':'))
+
return TOK_LOR;
+
+
if(GOBBLE('-') ) /* safe index: ?-> or ?[] */
+
{
+
if( GOBBLE( '>' ) ) /* ?-> */
+
return TOK_SAFE_INDEX;
+
SKIPN(-1); /* Undo GOBBLE('-') above */
+
}
+
+
/* Probably wanted:
+
+
?. for safe constant index
+
?[] for safe [] index
+
+
They however conflict with valid ?: syntaxes.
+
*/
+
+
/* if( GOBBLE('[' ) ) */
+
/* return TOK_SAFE_START_INDEX; */
+
+
/* if( GOBBLE('.' ) ) */
+
/* return TOK_SAFE_INDEX; */
+
+
case ']':
case ',': case '~': case '@': case ')': case '[':
-
+
case '{': case ';': case '}': return c; case '`': { char *tmp; int offset=2; if(GOBBLE('`')) { offset--;