URL
https://opencores.org/ocsvn/c16/c16/trunk
[/] [c16/] [trunk/] [compiler/] [Name.cc] - Diff between revs 2 and 7
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 7 |
Line 62... |
Line 62... |
{
|
{
|
if (DEBUG) fprintf(stderr, "Adding \"%s\" to structs\n", na);
|
if (DEBUG) fprintf(stderr, "Adding \"%s\" to structs\n", na);
|
structs = new StructName(na, structs, sdl);
|
structs = new StructName(na, structs, sdl);
|
}
|
}
|
//=============================================================================
|
//=============================================================================
|
|
void Name::PushContext()
|
|
{
|
|
// use "}" as a marker for contexts
|
|
autos = new Name("}", autos, 0, 0);
|
|
}
|
|
//-----------------------------------------------------------------------------
|
|
void Name::PopContext()
|
|
{
|
|
while (autos)
|
|
{
|
|
Name * tl = autos->tail;
|
|
const bool marker = !strcmp("}", autos->name);
|
|
delete autos;
|
|
autos = tl;
|
|
if (marker) return;
|
|
}
|
|
|
|
assert(0 && "No context marker");
|
|
}
|
|
//-----------------------------------------------------------------------------
|
void Name::RemoveAuto()
|
void Name::RemoveAuto()
|
{
|
{
|
while (autos)
|
while (autos)
|
{
|
{
|
Name * tl = autos->tail;
|
Name * tl = autos->tail;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.