summaryrefslogtreecommitdiff
path: root/src/parser.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-01-05 11:57:48 -0500
committerAdrian Thurston <thurston@complang.org>2015-01-05 11:57:48 -0500
commitdedc10d8fa47f41afb0e700786b374fda944090c (patch)
tree0a18bd50da2a0fe254758a6564f34ab16e95a30f /src/parser.cc
parent2b1372cc483637f6bedc511c145ce1682ffad987 (diff)
downloadcolm-dedc10d8fa47f41afb0e700786b374fda944090c.tar.gz
Context renamed to StructDef
Diffstat (limited to 'src/parser.cc')
-rw-r--r--src/parser.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/parser.cc b/src/parser.cc
index 2e65e545..896e26d1 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -77,7 +77,7 @@ void BaseParser::init()
pd->globalObjectDef = ObjectDef::cons( ObjectDef::UserType,
global, pd->nextObjectId++ );
- pd->global = new Context( internal, global, pd->globalObjectDef );
+ pd->global = new StructDef( internal, global, pd->globalObjectDef );
pd->globalSel = declareStruct( pd, 0, global, pd->global );
/* Setup the stream object. */
@@ -85,8 +85,7 @@ void BaseParser::init()
ObjectDef *objectDef = ObjectDef::cons( ObjectDef::BuiltinType,
global, pd->nextObjectId++ );
- pd->stream = new Context( internal, global, objectDef );
-
+ pd->stream = new StructDef( internal, global, objectDef );
pd->streamSel = declareStruct( pd, pd->rootNamespace,
pd->stream->name, pd->stream );
@@ -415,7 +414,7 @@ LangStmt *BaseParser::globalDef( ObjectField *objField, LangExpr *expr,
{
LangStmt *stmt = 0;
- Context *context = 0;
+ StructDef *context = 0;
ObjectDef *object = 0;
if ( curStruct() == 0 )
object = pd->globalObjectDef;
@@ -922,7 +921,7 @@ void BaseParser::structVarDef( const InputLoc &loc, ObjectField *objField )
if ( curStruct() == 0 )
error(loc) << "internal error: no context stack items found" << endp;
- Context *context = curStruct();
+ StructDef *context = curStruct();
objField->context = context;
object = context->objectDef;
@@ -940,7 +939,7 @@ void BaseParser::structHead( const InputLoc &loc,
ObjectDef *objectDef = ObjectDef::cons( objectType,
data, pd->nextObjectId++ );
- Context *context = new Context( loc, data, objectDef );
+ StructDef *context = new StructDef( loc, data, objectDef );
structStack.push( context );
inNspace->structDefList.append( context );