Lines Matching refs:token

191 			// We can't reuse the token, since the parsing mode changed.
508 const Token& token = fTokenizer.NextToken();
509 if (token.type != TOKEN_END_OF_LINE)
510 parse_exception("parse error", token.position);
524 const Token& token = fTokenizer.NextToken();
528 int32 startPosition = token.position;
530 if (token.type == TOKEN_IDENTIFIER) {
533 if (token.type & TOKEN_ASSIGN_FLAG) {
544 } else if (token.type == TOKEN_STAR) {
550 parse_exception("expected command or assignment", token.position);
560 if (token.type != TOKEN_END_OF_LINE)
561 parse_exception("parse error", token.position);
586 const Token& token = fTokenizer.NextToken();
587 if (token.type == TOKEN_END_OF_LINE)
590 *expressionString += token.position;
599 const Token& token = fTokenizer.NextToken();
600 int32 position = token.position;
601 if (token.type == TOKEN_IDENTIFIER) {
603 strlcpy(variable, token.string, sizeof(variable));
658 parse_exception("internal error: unknown assignment token",
666 } else if (token.type == TOKEN_STAR) {
704 parse_exception("internal error: unknown assignment token",
783 const Token& token = _EatToken(TOKEN_IDENTIFIER);
787 debugger_command* command = find_debugger_command(token.string, true,
794 "\"help %s\" get a list of matching commands.\n", token.string,
795 token.string);
799 "all supported commands.\n", token.string);
838 const Token& token = fTokenizer.NextToken();
839 switch (token.type) {
867 _AddArgument(argc, argv, token.string);
880 snprintf(sTempBuffer, sizeof(sTempBuffer), "unexpected token "
881 "\"%s\"", token.string);
882 parse_exception(sTempBuffer, token.position);
900 const Token& token = fTokenizer.NextToken();
901 switch (token.type) {
970 const Token& token = fTokenizer.NextToken();
971 switch (token.type) {
993 Token token = fTokenizer.NextToken();
994 switch (token.type) {
1001 parse_exception("division by zero", token.position);
1008 parse_exception("modulo by zero", token.position);
1100 const Token& token = fTokenizer.NextToken();
1101 if (token.type == TOKEN_END_OF_LINE)
1102 parse_exception("unexpected end of expression", token.position);
1104 if (token.type == TOKEN_CONSTANT)
1105 return token.value;
1107 if (token.type == TOKEN_IDENTIFIER) {
1108 if (!is_debug_variable_defined(token.string)) {
1110 "variable '%s' undefined", token.string);
1111 parse_exception(sTempBuffer, token.position);
1114 return get_debug_variable(token.string, 0);
1117 if (token.type == TOKEN_OPENING_PARENTHESIS) {
1144 const Token& token = fTokenizer.NextToken();
1145 if (token.type != type) {
1146 snprintf(sTempBuffer, sizeof(sTempBuffer), "expected token type '%c', "
1147 "got token '%s'", char(type & ~TOKEN_FLAGS), token.string);
1148 parse_exception(sTempBuffer, token.position);
1151 return token;