// static kbool_t Stmt_parseSyntaxRule(CTX, kStmt *stmt, kArray *tls, int s, int e)
public bool parseSyntaxRule(Context ctx, IList<Token> tls, int s, int e)
{
bool ret = false;
Syntax syn = this.ks.GetSyntaxRule(tls, s, e);
//Debug.Assert(syn != null);
if (syn != null && syn.SyntaxRule != null)
{
this.syn = syn;
ret = (matchSyntaxRule(ctx, syn.SyntaxRule, this.ULine, tls, s, e, false) != -1);
}
else
{
ctx.SUGAR_P(ReportLevel.ERR, this.ULine, 0, "undefined syntax rule for '{0}'", syn.KeyWord.ToString());
}
return ret;
}