コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: jsparse.cs プロジェクト: prozacchiwawa/pygmalion
 internal static Node nest(Tokenizer t, Node x, Node node, NestFun func)
 {
     return nest(t, x, node, func, TokenType.NULL);
 }
コード例 #3
0
ファイル: jsparse.cs プロジェクト: prozacchiwawa/pygmalion
 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;
 }
コード例 #4
0
 internal static Node nest(Tokenizer t, Node x, Node node, NestFun func)
 {
     return(nest(t, x, node, func, TokenType.NULL));
 }