diff --git a/LINQ/Drivers/NetCDF/NetCDF.vbproj b/LINQ/Drivers/NetCDF/NetCDF.vbproj
index f35365c..b8cf363 100644
--- a/LINQ/Drivers/NetCDF/NetCDF.vbproj
+++ b/LINQ/Drivers/NetCDF/NetCDF.vbproj
@@ -43,6 +43,43 @@
On
+
+ true
+ true
+ true
+ bin\x64\Debug\
+ NetCDF.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+ full
+ x64
+
+
+ true
+ bin\x64\Release\
+ NetCDF.xml
+ true
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+ pdbonly
+ x64
+
+
+ true
+ bin\Publish\
+ NetCDF.xml
+ true
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+ pdbonly
+ AnyCPU
+
+
+ true
+ bin\x64\Publish\
+ NetCDF.xml
+ true
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+ pdbonly
+ x64
+
diff --git a/LINQ/LINQ.sln b/LINQ/LINQ.sln
index 84c05a3..0ef203d 100644
--- a/LINQ/LINQ.sln
+++ b/LINQ/LINQ.sln
@@ -1593,8 +1593,8 @@ Global
{A7145B06-EB92-4A95-8F85-F2BBE4226D5C}.ProteoWizard.d|x86.Build.0 = Debug|Any CPU
{A7145B06-EB92-4A95-8F85-F2BBE4226D5C}.Publish|Any CPU.ActiveCfg = Debug|Any CPU
{A7145B06-EB92-4A95-8F85-F2BBE4226D5C}.Publish|Any CPU.Build.0 = Debug|Any CPU
- {A7145B06-EB92-4A95-8F85-F2BBE4226D5C}.Publish|x64.ActiveCfg = Debug|Any CPU
- {A7145B06-EB92-4A95-8F85-F2BBE4226D5C}.Publish|x64.Build.0 = Debug|Any CPU
+ {A7145B06-EB92-4A95-8F85-F2BBE4226D5C}.Publish|x64.ActiveCfg = Publish|x64
+ {A7145B06-EB92-4A95-8F85-F2BBE4226D5C}.Publish|x64.Build.0 = Publish|x64
{A7145B06-EB92-4A95-8F85-F2BBE4226D5C}.Publish|x86.ActiveCfg = Debug|Any CPU
{A7145B06-EB92-4A95-8F85-F2BBE4226D5C}.Publish|x86.Build.0 = Debug|Any CPU
{A7145B06-EB92-4A95-8F85-F2BBE4226D5C}.R-dotnet|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/LINQ/LINQ/Interpreter/ExecutableContext.vb b/LINQ/LINQ/Interpreter/ExecutableContext.vb
index 9155ad1..a8346f3 100644
--- a/LINQ/LINQ/Interpreter/ExecutableContext.vb
+++ b/LINQ/LINQ/Interpreter/ExecutableContext.vb
@@ -56,5 +56,11 @@ Namespace Interpreter
Public Property env As Environment
Public Property throwError As Boolean = True
+ Public ReadOnly Property GlobalEnvir As GlobalEnvironment
+ Get
+ Return env.GlobalEnvir
+ End Get
+ End Property
+
End Class
End Namespace
diff --git a/LINQ/LINQ/Interpreter/Expressions/Keywords/SymbolDeclare.vb b/LINQ/LINQ/Interpreter/Expressions/Keywords/SymbolDeclare.vb
index 174309f..1ba9a9f 100644
--- a/LINQ/LINQ/Interpreter/Expressions/Keywords/SymbolDeclare.vb
+++ b/LINQ/LINQ/Interpreter/Expressions/Keywords/SymbolDeclare.vb
@@ -53,7 +53,7 @@ Namespace Interpreter.Expressions
Public Property symbolName As String
Public Property type As String
- Public Property arguments As String()
+ Public Property arguments As Expression()
Public Overrides ReadOnly Property keyword As String
Get
diff --git a/LINQ/LINQ/Interpreter/Query/DataSoruce/URIIteratorDriver.vb b/LINQ/LINQ/Interpreter/Query/DataSoruce/URIIteratorDriver.vb
index 623a11a..12c5658 100644
--- a/LINQ/LINQ/Interpreter/Query/DataSoruce/URIIteratorDriver.vb
+++ b/LINQ/LINQ/Interpreter/Query/DataSoruce/URIIteratorDriver.vb
@@ -1,49 +1,51 @@
#Region "Microsoft.VisualBasic::60bcd17ad4a2f4d16c0a950a86be8c6b, LINQ\LINQ\Interpreter\Query\DataSoruce\URIIteratorDriver.vb"
- ' Author:
- '
- ' asuka (amethyst.asuka@gcmodeller.org)
- ' xie (genetics@smrucc.org)
- ' xieguigang (xie.guigang@live.com)
- '
- ' Copyright (c) 2018 GPL3 Licensed
- '
- '
- ' GNU GENERAL PUBLIC LICENSE (GPL3)
- '
- '
- ' This program is free software: you can redistribute it and/or modify
- ' it under the terms of the GNU General Public License as published by
- ' the Free Software Foundation, either version 3 of the License, or
- ' (at your option) any later version.
- '
- ' This program is distributed in the hope that it will be useful,
- ' but WITHOUT ANY WARRANTY; without even the implied warranty of
- ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ' GNU General Public License for more details.
- '
- ' You should have received a copy of the GNU General Public License
- ' along with this program. If not, see .
+' Author:
+'
+' asuka (amethyst.asuka@gcmodeller.org)
+' xie (genetics@smrucc.org)
+' xieguigang (xie.guigang@live.com)
+'
+' Copyright (c) 2018 GPL3 Licensed
+'
+'
+' GNU GENERAL PUBLIC LICENSE (GPL3)
+'
+'
+' This program is free software: you can redistribute it and/or modify
+' it under the terms of the GNU General Public License as published by
+' the Free Software Foundation, either version 3 of the License, or
+' (at your option) any later version.
+'
+' This program is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU General Public License for more details.
+'
+' You should have received a copy of the GNU General Public License
+' along with this program. If not, see .
- ' /********************************************************************************/
+' /********************************************************************************/
- ' Summaries:
+' Summaries:
- ' Class URIIteratorDriver
- '
- ' Constructor: (+1 Overloads) Sub New
- ' Function: PopulatesData
- '
- '
- ' /********************************************************************************/
+' Class URIIteratorDriver
+'
+' Constructor: (+1 Overloads) Sub New
+' Function: PopulatesData
+'
+'
+' /********************************************************************************/
#End Region
Imports LINQ.Interpreter.Expressions
Imports LINQ.Runtime
Imports LINQ.Runtime.Drivers
+Imports Microsoft.VisualBasic.Linq
+Imports any = Microsoft.VisualBasic.Scripting
Namespace Interpreter.Query
@@ -57,9 +59,14 @@ Namespace Interpreter.Query
End Sub
Public Overrides Iterator Function PopulatesData() As IEnumerable(Of Object)
+ Dim env As New ExecutableContext() With {.env = Me.env, .throwError = True}
+ Dim argumentStr As String() = symbolDeclare.arguments _
+ .SafeQuery _
+ .Select(Function(a) any.ToString(a.Exec(env))) _
+ .ToArray
Dim driver As DataSourceDriver = env.GlobalEnvir.GetDriverByCode(
code:=symbolDeclare.type,
- arguments:=symbolDeclare.arguments
+ arguments:=argumentStr
)
For Each item As Object In driver.ReadFromUri(uri)
diff --git a/LINQ/LINQ/Interpreter/Script/SyntaxImplements.vb b/LINQ/LINQ/Interpreter/Script/SyntaxImplements.vb
index 3285897..0c326a7 100644
--- a/LINQ/LINQ/Interpreter/Script/SyntaxImplements.vb
+++ b/LINQ/LINQ/Interpreter/Script/SyntaxImplements.vb
@@ -224,24 +224,22 @@ Namespace Script
' declare new symbol
Dim name As String = tokenList(1).text
Dim type As String = "any"
- Dim arguments As String() = Nothing
+ Dim arguments As Expression() = Nothing
If tokenList.Length > 2 Then
type = tokenList(3).text
If tokenList.Length > 4 Then
- arguments = tokenList _
- .Skip(4) _
- .Where(Function(r) r.name <> Tokens.Comma) _
- .Select(Function(r) r.text) _
+ tokenList = tokenList.Skip(4).ToArray
+ tokenList = tokenList.Take(tokenList.Length - 1).ToArray
+
+ Dim values As Token()() = tokenList _
+ .SplitByTopLevelStack _
.ToArray
- If arguments(Scan0) = "(" AndAlso arguments.Last = ")" Then
- arguments = arguments _
- .Skip(1) _
- .Take(arguments.Length - 2) _
- .ToArray
- End If
+ arguments = values _
+ .Select(AddressOf ParseExpression) _
+ .ToArray
End If
End If