internal static Node nest(Tokenizer t, Node x, Node node, NestFun func, TokenType end) { x.stmtStack.Add(node); var n = func(t, x); x.stmtStack.RemoveAt(x.stmtStack.Count - 1); if (end != TokenType.NULL && end != TokenType.END) { t.mustMatch(end); } return(n); }
internal static Node nest(Tokenizer t, Node x, Node node, NestFun func) { return nest(t, x, node, func, TokenType.NULL); }
internal static Node nest(Tokenizer t, Node x, Node node, NestFun func, TokenType end) { x.stmtStack.Add(node); var n = func(t, x); x.stmtStack.RemoveAt(x.stmtStack.Count - 1); if (end != TokenType.NULL && end != TokenType.END) t.mustMatch(end); return n; }
internal static Node nest(Tokenizer t, Node x, Node node, NestFun func) { return(nest(t, x, node, func, TokenType.NULL)); }