diff options
author | Adrian Thurston <thurston@complang.org> | 2012-05-16 14:21:02 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2012-05-16 14:21:02 -0400 |
commit | ce6681a363c19b4c4b1daf318a484cd75ad56f05 (patch) | |
tree | 4e15a0b6c52168427e94bbe3a12109dd5d433173 | |
parent | b6f4f9431a9a907ca9d022b9d12b69524d1401ee (diff) | |
download | colm-ce6681a363c19b4c4b1daf318a484cd75ad56f05.tar.gz |
Couple fixes for the token.line operation.
-rw-r--r-- | colm/compile.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/colm/compile.cc b/colm/compile.cc index 11ae091e..61e520e4 100644 --- a/colm/compile.cc +++ b/colm/compile.cc @@ -2497,7 +2497,7 @@ void ParseData::initTokenObjects( ) tokenObj->insertField( posEl->name, posEl ); ObjField *lineEl = makeLineEl(); - tokenObj->insertField( posEl->name, lineEl ); + tokenObj->insertField( lineEl->name, lineEl ); /* Give all user terminals the token object type. */ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) { @@ -2512,6 +2512,10 @@ void ParseData::initTokenObjects( ) /* Create the "pos" field. */ ObjField *posEl = makePosEl(); lel->objectDef->insertField( posEl->name, posEl ); + + /* Create the "line" field. */ + ObjField *lineEl = makeLineEl(); + lel->objectDef->insertField( lineEl->name, lineEl ); } } } |