Introduced startOffset(), endOffset(), getPosition(), getStartPosition(), and getEndPosition().

This commit is contained in:
Roberto Raggi
2009-03-31 13:56:28 +02:00
parent 3b04247689
commit 8f84f81e6d
5 changed files with 49 additions and 0 deletions

View File

@@ -99,6 +99,8 @@ bool CheckStatement::visit(CaseStatementAST *ast)
bool CheckStatement::visit(CompoundStatementAST *ast)
{
Block *block = control()->newBlock(ast->lbrace_token);
block->setStartOffset(tokenAt(ast->firstToken()).offset);
block->setEndOffset(tokenAt(ast->lastToken()).offset);
ast->symbol = block;
_scope->enterSymbol(block);
Scope *previousScope = switchScope(block->members());