Exemple #1
0
 public SqlToken(SqlKind kind, int start, int end, SqlNode parent)
 {
     this.Parent = parent;
     this.Kind   = kind;
     this.Start  = start;
     this.End    = end;
 }
Exemple #2
0
        protected static ImmutableArray <SqlNode> CreateChildren(SqlNode node1, SqlNode node2)
        {
            if (node1 == null)
            {
                return(node2 == null ? ImmutableArray <SqlNode> .Empty : ImmutableArray.Create(node2));
            }

            if (node2 == null)
            {
                return(ImmutableArray.Create(node1));
            }

            return(ImmutableArray.Create(node1, node2));
        }
Exemple #3
0
        protected static ImmutableArray <SqlNode> CreateChildren(SqlNode node1, SqlNode node2, SqlNode node3)
        {
            if (node1 == null)
            {
                return(CreateChildren(node2, node3));
            }

            if (node2 == null)
            {
                return(CreateChildren(node1, node3));
            }

            if (node3 == null)
            {
                return(CreateChildren(node1, node2));
            }

            return(ImmutableArray.Create(node1, node2, node3));
        }
Exemple #4
0
 protected static ImmutableArray <SqlNode> CreateChildren(SqlNode node)
 {
     return(node == null ? ImmutableArray <SqlNode> .Empty : ImmutableArray.Create(node));
 }
Exemple #5
0
 public SqlToken WithParent(SqlNode node) => new SqlToken(this.Kind, this.Start, this.End, node);