63 references to Parse
Microsoft.Build (1)
Evaluation\ConditionEvaluator.cs (1)
263
parsedExpression = conditionParser.
Parse
(condition, options, elementLocation);
Microsoft.Build.Engine.UnitTests (62)
ExpressionTree_Tests.cs (3)
109
tree = p.
Parse
(command, ParserOptions.AllowAll, ElementLocation.EmptyLocation);
439
GenericExpressionNode tree = p.
Parse
(expression, ParserOptions.AllowAll, MockElementLocation.Instance);
476
GenericExpressionNode tree = p.
Parse
(expression, ParserOptions.AllowAll, MockElementLocation.Instance);
ExpressionTreeExpression_Tests.cs (3)
436
GenericExpressionNode tree = p.
Parse
(expression, ParserOptions.AllowAll, ElementLocation.EmptyLocation);
460
GenericExpressionNode tree = p.
Parse
(expression, ParserOptions.AllowAll, ElementLocation.EmptyLocation);
491
var tree = p.
Parse
(expression, ParserOptions.AllowAll, ElementLocation.EmptyLocation);
Parser_Tests.cs (55)
30
GenericExpressionNode tree = p.
Parse
("$(foo)", ParserOptions.AllowAll, _elementLocation);
33
tree = p.
Parse
("$(foo)=='hello'", ParserOptions.AllowAll, _elementLocation);
36
tree = p.
Parse
("$(foo)==''", ParserOptions.AllowAll, _elementLocation);
39
tree = p.
Parse
("$(debug) and $(buildlab) and $(full)", ParserOptions.AllowAll, _elementLocation);
42
tree = p.
Parse
("$(debug) or $(buildlab) or $(full)", ParserOptions.AllowAll, _elementLocation);
45
tree = p.
Parse
("$(debug) and $(buildlab) or $(full)", ParserOptions.AllowAll, _elementLocation);
48
tree = p.
Parse
("$(full) or $(debug) and $(buildlab)", ParserOptions.AllowAll, _elementLocation);
51
tree = p.
Parse
("%(culture)", ParserOptions.AllowAll, _elementLocation);
54
tree = p.
Parse
("%(culture)=='french'", ParserOptions.AllowAll, _elementLocation);
57
tree = p.
Parse
("'foo_%(culture)'=='foo_french'", ParserOptions.AllowAll, _elementLocation);
60
tree = p.
Parse
("true", ParserOptions.AllowAll, _elementLocation);
63
tree = p.
Parse
("false", ParserOptions.AllowAll, _elementLocation);
66
tree = p.
Parse
("0", ParserOptions.AllowAll, _elementLocation);
69
tree = p.
Parse
("0.0 == 0", ParserOptions.AllowAll, _elementLocation);
79
GenericExpressionNode tree = p.
Parse
("$(foo)", ParserOptions.AllowAll, _elementLocation);
82
tree = p.
Parse
("($(foo) or $(bar)) and $(baz)", ParserOptions.AllowAll, _elementLocation);
85
tree = p.
Parse
("$(foo) <= 5 and $(bar) >= 15", ParserOptions.AllowAll, _elementLocation);
88
tree = p.
Parse
("(($(foo) <= 5 and $(bar) >= 15) and $(baz) == simplestring) and 'a more complex string' != $(quux)", ParserOptions.AllowAll, _elementLocation);
91
tree = p.
Parse
("(($(foo) or $(bar) == false) and !($(baz) == simplestring))", ParserOptions.AllowAll, _elementLocation);
94
tree = p.
Parse
("(($(foo) or Exists('c:\\foo.txt')) and !(($(baz) == simplestring)))", ParserOptions.AllowAll, _elementLocation);
97
tree = p.
Parse
("'CONTAINS%27QUOTE%27' == '$(TestQuote)'", ParserOptions.AllowAll, _elementLocation);
107
GenericExpressionNode tree = p.
Parse
("!true", ParserOptions.AllowAll, _elementLocation);
109
tree = p.
Parse
("!(true)", ParserOptions.AllowAll, _elementLocation);
111
tree = p.
Parse
("!($(foo) <= 5)", ParserOptions.AllowAll, _elementLocation);
113
tree = p.
Parse
("!(%(foo) <= 5)", ParserOptions.AllowAll, _elementLocation);
115
tree = p.
Parse
("!($(foo) <= 5 and $(bar) >= 15)", ParserOptions.AllowAll, _elementLocation);
124
GenericExpressionNode tree = p.
Parse
("SimpleFunctionCall()", ParserOptions.AllowAll, _elementLocation);
126
tree = p.
Parse
("SimpleFunctionCall( 1234 )", ParserOptions.AllowAll, _elementLocation);
127
tree = p.
Parse
("SimpleFunctionCall( true )", ParserOptions.AllowAll, _elementLocation);
128
tree = p.
Parse
("SimpleFunctionCall( $(property) )", ParserOptions.AllowAll, _elementLocation);
130
tree = p.
Parse
("SimpleFunctionCall( $(property), 1234, abcd, 'abcd efgh' )", ParserOptions.AllowAll, _elementLocation);
142
tree = p.
Parse
("@(foo) == 'a.cs;b.cs'", ParserOptions.AllowProperties, _elementLocation);
154
tree = p.
Parse
("'a.cs;b.cs' == @(foo)", ParserOptions.AllowProperties, _elementLocation);
166
tree = p.
Parse
("'@(foo)' == 'a.cs;b.cs'", ParserOptions.AllowProperties, _elementLocation);
178
tree = p.
Parse
("'otherstuff@(foo)' == 'a.cs;b.cs'", ParserOptions.AllowProperties, _elementLocation);
190
tree = p.
Parse
("'@(foo)otherstuff' == 'a.cs;b.cs'", ParserOptions.AllowProperties, _elementLocation);
202
tree = p.
Parse
("somefunction(@(foo), 'otherstuff')", ParserOptions.AllowProperties, _elementLocation);
218
GenericExpressionNode tree = p.
Parse
("@(item->foo('ab'))",
223
tree = p.
Parse
("!@(item->foo())",
227
tree = p.
Parse
("(@(item->foo('ab')) and @(item->foo('bc')))",
241
tree = p.
Parse
("%(foo) == 'a.cs;b.cs'", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation);
253
tree = p.
Parse
("'a.cs;b.cs' == %(foo)", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation);
265
tree = p.
Parse
("'%(foo)' == 'a.cs;b.cs'", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation);
277
tree = p.
Parse
("'otherstuff%(foo)' == 'a.cs;b.cs'", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation);
289
tree = p.
Parse
("'%(foo)otherstuff' == 'a.cs;b.cs'", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation);
301
tree = p.
Parse
("somefunction(%(foo), 'otherstuff')", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation);
325
tree = p.
Parse
("'a more complex' == 'asdf", ParserOptions.AllowAll, _elementLocation);
338
tree = p.
Parse
("(($(foo) <= 5 and $(bar) >= 15) and $(baz) == 'simple string) and 'a more complex string' != $(quux)", ParserOptions.AllowAll, _elementLocation);
350
tree = p.
Parse
("($(foo) == 'simple string') $(bar)", ParserOptions.AllowAll, _elementLocation);
363
tree = p.
Parse
("=='x'", ParserOptions.AllowAll, _elementLocation);
376
tree = p.
Parse
("==", ParserOptions.AllowAll, _elementLocation);
389
tree = p.
Parse
(">", ParserOptions.AllowAll, _elementLocation);
401
tree = p.
Parse
("true!=false==", ParserOptions.AllowAll, _elementLocation);
414
tree = p.
Parse
("true!=false==true", ParserOptions.AllowAll, _elementLocation);
426
tree = p.
Parse
("1==(2", ParserOptions.AllowAll, _elementLocation);
Scanner_Tests.cs (1)
58
parser.
Parse
(tests[i, 0], options, _elementLocation);