소스 검색

Simplified constructor for identifier expressions

tags/mesa-7.9-rc1
Ian Romanick 15 년 전
부모
커밋
d10fe19495
2개의 변경된 파일11개의 추가작업 그리고 10개의 파일을 삭제
  1. 9
    0
      ast.h
  2. 2
    10
      glsl_parser.ypp

+ 9
- 0
ast.h 파일 보기

@@ -150,6 +150,15 @@ public:
ast_expression(int oper, ast_expression *,
ast_expression *, ast_expression *);

ast_expression(const char *identifier) :
oper(ast_identifier)
{
subexpressions[0] = NULL;
subexpressions[1] = NULL;
subexpressions[2] = NULL;
primary_expression.identifier = (char *) identifier;
}

static const char *operator_string(enum ast_operators op);

virtual ir_instruction *hir(exec_list *instructions,

+ 2
- 10
glsl_parser.ypp 파일 보기

@@ -351,19 +351,11 @@ function_identifier:
}
| IDENTIFIER
{
ast_expression *expr =
new ast_expression(ast_identifier, NULL, NULL, NULL);
expr->primary_expression.identifier = $1;

$$ = (struct ast_node *) expr;
$$ = new ast_expression($1);
}
| FIELD_SELECTION
{
ast_expression *expr =
new ast_expression(ast_identifier, NULL, NULL, NULL);
expr->primary_expression.identifier = $1;

$$ = (struct ast_node *) expr;
$$ = new ast_expression($1);
}
;


Loading…
취소
저장