public IForm ParseForm()
{
Token token = this.NextToken();
if (token == null)
return null;
if (token.Type == TokenType.Operator && token.Value == "-")
{
if (this.TryParseAtom("module"))
return this.ParseModuleForm();
if (this.TryParseAtom("export"))
return this.ParseExportForm();
throw new ParserException("Unknown form");
}
this.PushToken(token);
var fform = this.ParseFunctionForm();
var fforms = new List<FunctionForm>();
fforms.Add(fform);
while (this.TryParseToken(TokenType.Separator, ";"))
fforms.Add(this.ParseFunctionForm());
this.ParsePoint();
if (fforms.Count == 1)
return fform;
return new MultiFunctionForm(fforms);
}