private void CompileArguments()
{
Token token = this.NextToken();
if (token == null)
{
throw new ParserException("Argument expected");
}
// TODO Review if this code is needed
if (token.Type == TokenType.Operator || (token.Type == TokenType.Punctuation && token.Value == "|"))
{
this.methodname = token.Value;
token = this.NextToken();
if (token == null || token.Type != TokenType.Name)
{
throw new ParserException("Argument expected");
}
this.arguments.Add(token.Value);
return;
}
if (token.Type != TokenType.Name)
{
throw new ParserException("Argument expected");
}
if (token.Value.EndsWith(":"))
{
this.PushToken(token);
this.CompileKeywordArguments();
return;
}
this.methodname = token.Value;
}