diff options
author | Adrian Thurston <thurston@complang.org> | 2014-01-05 17:42:15 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2014-01-05 17:42:33 -0500 |
commit | 17d3db2dfb3d3834628497bf8eece62cf909b5c0 (patch) | |
tree | b08a22d7bc489feaf3fb7f3bca3145827e48e52a | |
parent | 02f9b941571b375e8cfef1d481d02562e4fbe090 (diff) | |
download | colm-17d3db2dfb3d3834628497bf8eece62cf909b5c0.tar.gz |
transfer objectDef to LangEl when creating literal token defs
-rw-r--r-- | src/declare.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/declare.cc b/src/declare.cc index 93e250b2..bafcfc3a 100644 --- a/src/declare.cc +++ b/src/declare.cc @@ -399,18 +399,19 @@ void Namespace::declare( Compiler *pd ) } else { /* Original. Create a token for the literal. */ - LangEl *newLangEl = declareLangEl( pd, this, tokenDef->name, LangEl::Term ); + LangEl *litEl = declareLangEl( pd, this, tokenDef->name, LangEl::Term ); - newLangEl->lit = tokenDef->literal; - newLangEl->isLiteral = true; - newLangEl->tokenDef = tokenDef; + litEl->lit = tokenDef->literal; + litEl->isLiteral = true; + litEl->tokenDef = tokenDef; + litEl->objectDef = tokenDef->objectDef; - tokenDef->tdLangEl = newLangEl; + tokenDef->tdLangEl = litEl; if ( tokenDef->noPreIgnore ) - newLangEl->noPreIgnore = true; + litEl->noPreIgnore = true; if ( tokenDef->noPostIgnore ) - newLangEl->noPostIgnore = true; + litEl->noPostIgnore = true; } } } |