protected void import_directive(
Module container
)
{
Import node = null;
try { // for error handling
{
switch ( LA(1) )
{
case IMPORT:
{
node=import_directive_();
break;
}
case FROM:
{
node=import_directive_from_();
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if (0==inputState.guessing)
{
if (node != null) container.Imports.Add(node);
}
eos();
}
catch (RecognitionException ex)
{
if (0 == inputState.guessing)
{
reportError(ex, "import_directive");
recover(ex,tokenSet_12_);
}
else
{
throw ex;
}
}
}