81 references to ParseSyntaxTree
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (14)
Debugging\ProximityExpressionsGetterTests.vb (1)
41
Return SyntaxFactory.
ParseSyntaxTree
(GetTestFileContent())
EditAndContinue\BreakpointSpansTests.vb (2)
43
Dim tree = SyntaxFactory.
ParseSyntaxTree
(source)
73
Dim tree = SyntaxFactory.
ParseSyntaxTree
(source)
EditAndContinue\Helpers\EditingTestBase.vb (2)
111
Return SyntaxFactory.
ParseSyntaxTree
(
199
Return New ActiveStatementsDescription(oldSource, newSource, Function(source) SyntaxFactory.
ParseSyntaxTree
(source, path:=GetDocumentFilePath(documentIndex)), flags)
EditAndContinue\SyntaxUtilitiesTests.vb (6)
14
Dim oldRoot = SyntaxFactory.
ParseSyntaxTree
(oldSource).GetRoot()
15
Dim newRoot = SyntaxFactory.
ParseSyntaxTree
(newSource).GetRoot()
56
Dim leftRoot = SyntaxFactory.
ParseSyntaxTree
("
68
Dim rightRoot = SyntaxFactory.
ParseSyntaxTree
("
93
Dim leftRoot = SyntaxFactory.
ParseSyntaxTree
("
109
Dim rightRoot = SyntaxFactory.
ParseSyntaxTree
("
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (1)
40
Dim tree = SyntaxFactory.
ParseSyntaxTree
(ClearSource(source))
Extensions\StatementSyntaxExtensionTests.vb (1)
217
Dim tree = SyntaxFactory.
ParseSyntaxTree
(code)
Semantics\SpeculationAnalyzerTests.vb (1)
126
Return SyntaxFactory.
ParseSyntaxTree
(text)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (7)
PDB\PDBTests.vb (6)
25
Dim tree1 = SyntaxFactory.
ParseSyntaxTree
("Class A : End Class", path:="Goo.vb", encoding:=Nothing)
26
Dim tree2 = SyntaxFactory.
ParseSyntaxTree
("Class B : End Class", path:="", encoding:=Nothing)
28
Dim tree4 = SyntaxFactory.
ParseSyntaxTree
("Class D : End Class", path:="Baz.vb", encoding:=Encoding.UTF8)
42
Dim tree1 = SyntaxFactory.
ParseSyntaxTree
("Class A" & vbCrLf & "Sub F() : End Sub : End Class", path:="Goo.vb", encoding:=Encoding.Unicode)
43
Dim tree2 = SyntaxFactory.
ParseSyntaxTree
("Class B" & vbCrLf & "Sub F() : End Sub : End Class", path:="", encoding:=Nothing)
44
Dim tree3 = SyntaxFactory.
ParseSyntaxTree
("Class C" & vbCrLf & "Sub F() : End Sub : End Class", path:="Bar.vb", encoding:=New UTF8Encoding(True, False))
PDB\TypeDefinitionDocumentTests.vb (1)
345
Dim trees = sources.Select(Function(s, i) SyntaxFactory.
ParseSyntaxTree
(s, path:=$"{i + 1}.vb", encoding:=Encoding.UTF8)).ToArray()
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (30)
Compilation\CompilationAPITests.vb (10)
38
Dim tree = SyntaxFactory.
ParseSyntaxTree
("
58
Dim tree = SyntaxFactory.
ParseSyntaxTree
("
80
Dim tree = SyntaxFactory.
ParseSyntaxTree
("
100
Dim tree = SyntaxFactory.
ParseSyntaxTree
("
121
Dim tree = SyntaxFactory.
ParseSyntaxTree
("
127
Dim newTree = SyntaxFactory.
ParseSyntaxTree
("
149
Dim tree = SyntaxFactory.
ParseSyntaxTree
("
2594
Dim tree1 = SyntaxFactory.
ParseSyntaxTree
("", VisualBasicParseOptions.Default.WithLanguageVersion(LanguageVersion.VisualBasic12))
2595
Dim tree2 = SyntaxFactory.
ParseSyntaxTree
("", VisualBasicParseOptions.Default.WithLanguageVersion(LanguageVersion.VisualBasic12))
2596
Dim tree3 = SyntaxFactory.
ParseSyntaxTree
("", VisualBasicParseOptions.Default.WithLanguageVersion(LanguageVersion.VisualBasic11))
Compilation\SemanticModelAPITests.vb (2)
2930
Dim tree = SyntaxFactory.
ParseSyntaxTree
("
2965
Dim tree = SyntaxFactory.
ParseSyntaxTree
("
Compilation\SuppressAccessibilityChecksTests.vb (3)
114
Dim tree = SyntaxFactory.
ParseSyntaxTree
(source)
223
Dim compilationA = CreateCompilationWithMscorlib40(SyntaxFactory.
ParseSyntaxTree
(source))
225
Dim blockStatement = SyntaxFactory.
ParseSyntaxTree
(<![CDATA[
Semantics\OptionalArgumentTests.vb (9)
2023
SyntaxFactory.
ParseSyntaxTree
(source1, path:="C:\filename", encoding:=Encoding.UTF8),
2024
SyntaxFactory.
ParseSyntaxTree
(source2, path:="a\b\..\c\d", encoding:=Encoding.UTF8),
2025
SyntaxFactory.
ParseSyntaxTree
(source3, path:="*", encoding:=Encoding.UTF8),
2026
SyntaxFactory.
ParseSyntaxTree
(source4, path:=" ", encoding:=Encoding.UTF8)
2103
SyntaxFactory.
ParseSyntaxTree
(source1, path:="C:\filename", encoding:=Encoding.UTF8),
2104
SyntaxFactory.
ParseSyntaxTree
(source2, path:="a\b\..\c\d.vb", encoding:=Encoding.UTF8),
2105
SyntaxFactory.
ParseSyntaxTree
(source3, path:="*", encoding:=Encoding.UTF8),
2106
SyntaxFactory.
ParseSyntaxTree
(source4, path:="C:\x.vb", encoding:=Encoding.UTF8),
2107
SyntaxFactory.
ParseSyntaxTree
(source5, path:="C:\x.vb", encoding:=Encoding.UTF8)
Semantics\ScriptSemanticsTests.vb (6)
74
syntaxTree = SyntaxFactory.
ParseSyntaxTree
(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script))
83
syntaxTree = SyntaxFactory.
ParseSyntaxTree
(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script))
92
syntaxTree = SyntaxFactory.
ParseSyntaxTree
(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script))
105
syntaxTree = SyntaxFactory.
ParseSyntaxTree
(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script))
118
syntaxTree = SyntaxFactory.
ParseSyntaxTree
(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script))
135
Dim syntaxTree2 = SyntaxFactory.
ParseSyntaxTree
("System.Console.WriteLine(2)", options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (19)
LocationTests.vb (2)
265
AssertMappedSpanEqual(SyntaxFactory.
ParseSyntaxTree
(sampleProgram, path:=""), "Class X", "", 1, 0, 1, 7, hasMappedPath:=False)
266
AssertMappedSpanEqual(SyntaxFactory.
ParseSyntaxTree
(sampleProgram, path:=" "), "Class X", " ", 1, 0, 1, 7, hasMappedPath:=False)
Scanner\XmlScannerTests.vb (1)
368
Dim tree = SyntaxFactory.
ParseSyntaxTree
("")
Syntax\SyntaxRewriterTests.vb (9)
528
Dim tree = SyntaxFactory.
ParseSyntaxTree
("System.Console.Write(""Before"")", TestOptions.Script)
545
Dim tree = SyntaxFactory.
ParseSyntaxTree
("m(a, b)", TestOptions.Script)
564
Dim tree = SyntaxFactory.
ParseSyntaxTree
("m(a, b)", TestOptions.Script)
591
Dim tree = SyntaxFactory.
ParseSyntaxTree
("Private Class C ", options:=TestOptions.Script)
611
Dim tree = SyntaxFactory.
ParseSyntaxTree
("Public Class C" & vbCrLf & "End Class", options:=TestOptions.Script)
635
Dim tree = SyntaxFactory.
ParseSyntaxTree
("Dim identifier 'c", options:=TestOptions.Script)
662
Dim tree = SyntaxFactory.
ParseSyntaxTree
("Dim identifier 'c", options:=TestOptions.Script)
684
Dim tree = SyntaxFactory.
ParseSyntaxTree
("Private Class C" & vbCrLf & "End Class", options:=TestOptions.Script)
697
Dim tree = SyntaxFactory.
ParseSyntaxTree
("Private Class C" & vbCrLf & "End Class", options:=TestOptions.Script)
Syntax\SyntaxSubmissionsTests.vb (3)
11
Dim tree = SyntaxFactory.
ParseSyntaxTree
(code, options:=TestOptions.Script)
29
Assert.False(SyntaxFactory.IsCompleteSubmission(SyntaxFactory.
ParseSyntaxTree
(code, options:=TestOptions.Script)))
37
SyntaxFactory.
ParseSyntaxTree
("Dim x = 12", options:=TestOptions.Regular)))
Syntax\SyntaxTreeTests.vb (4)
110
Dim oldTree = SyntaxFactory.
ParseSyntaxTree
("Class B : End Class")
152
Dim oldTree = SyntaxFactory.
ParseSyntaxTree
("Class B : End Class", path:="old.vb")
190
oldTree = SyntaxFactory.
ParseSyntaxTree
("", path:="old.vb")
192
Assert.Equal(String.Empty, SyntaxFactory.
ParseSyntaxTree
("", path:=Nothing).FilePath)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (9)
CodeGeneration\SyntaxGeneratorTests.vb (6)
38
Return VisualBasicCompilation.Create("test").AddReferences(TestMetadata.Net451.mscorlib).AddSyntaxTrees(SyntaxFactory.
ParseSyntaxTree
(code))
2345
Dim compilation = _emptyCompilation.AddSyntaxTrees(SyntaxFactory.
ParseSyntaxTree
("Public Delegate Sub D()"))
2352
Dim compilation = _emptyCompilation.AddSyntaxTrees(SyntaxFactory.
ParseSyntaxTree
(
2368
Dim compilation = _emptyCompilation.AddSyntaxTrees(SyntaxFactory.
ParseSyntaxTree
(
2394
Dim compilation = _emptyCompilation.AddSyntaxTrees(SyntaxFactory.
ParseSyntaxTree
(
2420
Dim compilation = _emptyCompilation.AddSyntaxTrees(SyntaxFactory.
ParseSyntaxTree
(
VisualBasicSyntaxFactsServiceTests.vb (3)
509
Dim tree = SyntaxFactory.
ParseSyntaxTree
(code)
527
Dim tree = SyntaxFactory.
ParseSyntaxTree
(code)
543
Dim tree = SyntaxFactory.
ParseSyntaxTree
(code)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
FormattingTests.cs (1)
79
var tree = VB.SyntaxFactory.
ParseSyntaxTree
(input);
SymbolKeyTests.cs (1)
1408
var tree = VisualBasic.SyntaxFactory.
ParseSyntaxTree
(source, path: path);