195 references to ParserOptions
Microsoft.Build (48)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (4)
69ParserOptions.AllowAll, 175ParserOptions.AllowAll, 211ParserOptions.AllowAll, 329ParserOptions.AllowAll,
BackEnd\Components\RequestBuilder\IntrinsicTasks\PropertyGroupIntrinsicTask.cs (1)
63ParserOptions.AllowAll,
BackEnd\Components\RequestBuilder\TargetEntry.cs (3)
359ParserOptions.AllowPropertiesAndItemLists, 616ParserOptions.AllowPropertiesAndItemLists, 708ParserOptions.AllowPropertiesAndItemLists,
BackEnd\Components\RequestBuilder\TaskBuilder.cs (4)
372ParserOptions parserOptions = (_taskNode == null) ? ParserOptions.AllowPropertiesAndItemLists : ParserOptions.AllowAll; 1076ParserOptions.AllowAll,
Evaluation\Conditionals\Parser.cs (3)
46private ParserOptions _options; 98internal GenericExpressionNode Parse(string expression, ParserOptions optionSettings, ElementLocation elementLocation) 102ErrorUtilities.VerifyThrow(0 != (optionSettings & ParserOptions.AllowProperties),
Evaluation\Conditionals\Scanner.cs (9)
34private ParserOptions _options; 58internal Scanner(string expressionToParse, ParserOptions options) 62ErrorUtilities.VerifyThrow(0 != (options & ParserOptions.AllowProperties), 187if ((_options & ParserOptions.AllowItemLists) == 0) 459if ((_options & ParserOptions.AllowItemMetadata) == ParserOptions.AllowItemMetadata) 479if (((_options & ParserOptions.AllowBuiltInMetadata) == 0) && 489if (((_options & ParserOptions.AllowCustomMetadata) == 0) && 615if ((_options & ParserOptions.AllowItemLists) == 0)
Evaluation\ConditionEvaluator.cs (3)
184ParserOptions options, 217ParserOptions options, 303ParserOptions options,
Evaluation\Evaluator.cs (15)
979if (EvaluateConditionCollectingConditionedProperties(propertyGroupElement, ExpanderOptions.ExpandProperties, ParserOptions.AllowProperties)) 994if (EvaluateCondition(itemDefinitionGroupElement, ExpanderOptions.ExpandProperties, ParserOptions.AllowProperties)) 1011bool itemGroupConditionResult = lazyEvaluator.EvaluateConditionWithCurrentState(itemGroupElement, ExpanderOptions.ExpandPropertiesAndItems, ParserOptions.AllowPropertiesAndItemLists); 1291if (!EvaluateConditionCollectingConditionedProperties(propertyElement, ExpanderOptions.ExpandProperties, ParserOptions.AllowProperties)) 1312bool itemConditionResult = lazyEvaluator.EvaluateConditionWithCurrentState(itemElement, ExpanderOptions.ExpandPropertiesAndItems, ParserOptions.AllowPropertiesAndItemLists); 1348if (EvaluateCondition(itemDefinitionElement, ExpanderOptions.ExpandPropertiesAndMetadata, ParserOptions.AllowPropertiesAndCustomMetadata)) 1358if (EvaluateCondition(metadataElement, ExpanderOptions.ExpandPropertiesAndMetadata, ParserOptions.AllowPropertiesAndCustomMetadata)) 1414if (EvaluateConditionCollectingConditionedProperties(importGroupElement, ExpanderOptions.ExpandProperties, ParserOptions.AllowProperties, _projectRootElementCache)) 1438if (EvaluateConditionCollectingConditionedProperties(whenElement, ExpanderOptions.ExpandProperties, ParserOptions.AllowProperties)) 1588if (!EvaluateConditionCollectingConditionedProperties(importElement, newExpandedCondition, ExpanderOptions.ExpandProperties, ParserOptions.AllowProperties, 1686ParserOptions.AllowProperties, _projectRootElementCache)) 2376private bool EvaluateCondition(ProjectElement element, ExpanderOptions expanderOptions, ParserOptions parserOptions) 2381private bool EvaluateCondition(ProjectElement element, string condition, ExpanderOptions expanderOptions, ParserOptions parserOptions) 2404private bool EvaluateConditionCollectingConditionedProperties(ProjectElement element, ExpanderOptions expanderOptions, ParserOptions parserOptions, ProjectRootElementCacheBase projectRootElementCache = null) 2412private bool EvaluateConditionCollectingConditionedProperties(ProjectElement element, string condition, ExpanderOptions expanderOptions, ParserOptions parserOptions, ProjectRootElementCacheBase projectRootElementCache = null)
Evaluation\LazyItemEvaluator.cs (2)
65public bool EvaluateConditionWithCurrentState(ProjectElement element, ExpanderOptions expanderOptions, ParserOptions parserOptions) 74ParserOptions parserOptions,
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (2)
208if (!EvaluateCondition(metadataElement.Condition, metadataElement, metadataExpansionOptions, ParserOptions.AllowAll, _expander, _lazyEvaluator)) 244ParserOptions.AllowAll,
Instance\ProjectInstance.cs (1)
2260ParserOptions.AllowPropertiesAndItemLists,
Instance\TaskRegistry.cs (1)
303ParserOptions.AllowPropertiesAndItemLists,
Microsoft.Build.Engine.UnitTests (147)
BackEnd\BatchingEngine_Tests.cs (1)
72ParserOptions.AllowAll,
Evaluation\Evaluator_Tests.cs (2)
4471ParserOptions.AllowAll, 4489ParserOptions.AllowAll,
Evaluation\Expander_Tests.cs (2)
2324ParserOptions.AllowAll, 2334ParserOptions.AllowAll,
ExpressionTree_Tests.cs (3)
109tree = p.Parse(command, ParserOptions.AllowAll, ElementLocation.EmptyLocation); 439GenericExpressionNode tree = p.Parse(expression, ParserOptions.AllowAll, MockElementLocation.Instance); 476GenericExpressionNode tree = p.Parse(expression, ParserOptions.AllowAll, MockElementLocation.Instance);
ExpressionTreeExpression_Tests.cs (3)
436GenericExpressionNode tree = p.Parse(expression, ParserOptions.AllowAll, ElementLocation.EmptyLocation); 460GenericExpressionNode tree = p.Parse(expression, ParserOptions.AllowAll, ElementLocation.EmptyLocation); 491var tree = p.Parse(expression, ParserOptions.AllowAll, ElementLocation.EmptyLocation);
Parser_Tests.cs (64)
30GenericExpressionNode tree = p.Parse("$(foo)", ParserOptions.AllowAll, _elementLocation); 33tree = p.Parse("$(foo)=='hello'", ParserOptions.AllowAll, _elementLocation); 36tree = p.Parse("$(foo)==''", ParserOptions.AllowAll, _elementLocation); 39tree = p.Parse("$(debug) and $(buildlab) and $(full)", ParserOptions.AllowAll, _elementLocation); 42tree = p.Parse("$(debug) or $(buildlab) or $(full)", ParserOptions.AllowAll, _elementLocation); 45tree = p.Parse("$(debug) and $(buildlab) or $(full)", ParserOptions.AllowAll, _elementLocation); 48tree = p.Parse("$(full) or $(debug) and $(buildlab)", ParserOptions.AllowAll, _elementLocation); 51tree = p.Parse("%(culture)", ParserOptions.AllowAll, _elementLocation); 54tree = p.Parse("%(culture)=='french'", ParserOptions.AllowAll, _elementLocation); 57tree = p.Parse("'foo_%(culture)'=='foo_french'", ParserOptions.AllowAll, _elementLocation); 60tree = p.Parse("true", ParserOptions.AllowAll, _elementLocation); 63tree = p.Parse("false", ParserOptions.AllowAll, _elementLocation); 66tree = p.Parse("0", ParserOptions.AllowAll, _elementLocation); 69tree = p.Parse("0.0 == 0", ParserOptions.AllowAll, _elementLocation); 79GenericExpressionNode tree = p.Parse("$(foo)", ParserOptions.AllowAll, _elementLocation); 82tree = p.Parse("($(foo) or $(bar)) and $(baz)", ParserOptions.AllowAll, _elementLocation); 85tree = p.Parse("$(foo) <= 5 and $(bar) >= 15", ParserOptions.AllowAll, _elementLocation); 88tree = p.Parse("(($(foo) <= 5 and $(bar) >= 15) and $(baz) == simplestring) and 'a more complex string' != $(quux)", ParserOptions.AllowAll, _elementLocation); 91tree = p.Parse("(($(foo) or $(bar) == false) and !($(baz) == simplestring))", ParserOptions.AllowAll, _elementLocation); 94tree = p.Parse("(($(foo) or Exists('c:\\foo.txt')) and !(($(baz) == simplestring)))", ParserOptions.AllowAll, _elementLocation); 97tree = p.Parse("'CONTAINS%27QUOTE%27' == '$(TestQuote)'", ParserOptions.AllowAll, _elementLocation); 107GenericExpressionNode tree = p.Parse("!true", ParserOptions.AllowAll, _elementLocation); 109tree = p.Parse("!(true)", ParserOptions.AllowAll, _elementLocation); 111tree = p.Parse("!($(foo) <= 5)", ParserOptions.AllowAll, _elementLocation); 113tree = p.Parse("!(%(foo) <= 5)", ParserOptions.AllowAll, _elementLocation); 115tree = p.Parse("!($(foo) <= 5 and $(bar) >= 15)", ParserOptions.AllowAll, _elementLocation); 124GenericExpressionNode tree = p.Parse("SimpleFunctionCall()", ParserOptions.AllowAll, _elementLocation); 126tree = p.Parse("SimpleFunctionCall( 1234 )", ParserOptions.AllowAll, _elementLocation); 127tree = p.Parse("SimpleFunctionCall( true )", ParserOptions.AllowAll, _elementLocation); 128tree = p.Parse("SimpleFunctionCall( $(property) )", ParserOptions.AllowAll, _elementLocation); 130tree = p.Parse("SimpleFunctionCall( $(property), 1234, abcd, 'abcd efgh' )", ParserOptions.AllowAll, _elementLocation); 142tree = p.Parse("@(foo) == 'a.cs;b.cs'", ParserOptions.AllowProperties, _elementLocation); 154tree = p.Parse("'a.cs;b.cs' == @(foo)", ParserOptions.AllowProperties, _elementLocation); 166tree = p.Parse("'@(foo)' == 'a.cs;b.cs'", ParserOptions.AllowProperties, _elementLocation); 178tree = p.Parse("'otherstuff@(foo)' == 'a.cs;b.cs'", ParserOptions.AllowProperties, _elementLocation); 190tree = p.Parse("'@(foo)otherstuff' == 'a.cs;b.cs'", ParserOptions.AllowProperties, _elementLocation); 202tree = p.Parse("somefunction(@(foo), 'otherstuff')", ParserOptions.AllowProperties, _elementLocation); 219ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation); 224ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation); 228ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation); 241tree = p.Parse("%(foo) == 'a.cs;b.cs'", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation); 253tree = p.Parse("'a.cs;b.cs' == %(foo)", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation); 265tree = p.Parse("'%(foo)' == 'a.cs;b.cs'", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation); 277tree = p.Parse("'otherstuff%(foo)' == 'a.cs;b.cs'", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation); 289tree = p.Parse("'%(foo)otherstuff' == 'a.cs;b.cs'", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation); 301tree = p.Parse("somefunction(%(foo), 'otherstuff')", ParserOptions.AllowProperties | ParserOptions.AllowItemLists, _elementLocation); 325tree = p.Parse("'a more complex' == 'asdf", ParserOptions.AllowAll, _elementLocation); 338tree = p.Parse("(($(foo) <= 5 and $(bar) >= 15) and $(baz) == 'simple string) and 'a more complex string' != $(quux)", ParserOptions.AllowAll, _elementLocation); 350tree = p.Parse("($(foo) == 'simple string') $(bar)", ParserOptions.AllowAll, _elementLocation); 363tree = p.Parse("=='x'", ParserOptions.AllowAll, _elementLocation); 376tree = p.Parse("==", ParserOptions.AllowAll, _elementLocation); 389tree = p.Parse(">", ParserOptions.AllowAll, _elementLocation); 401tree = p.Parse("true!=false==", ParserOptions.AllowAll, _elementLocation); 414tree = p.Parse("true!=false==true", ParserOptions.AllowAll, _elementLocation); 426tree = p.Parse("1==(2", ParserOptions.AllowAll, _elementLocation);
Scanner_Tests.cs (72)
57ParserOptions options = (ParserOptions)Enum.Parse(typeof(ParserOptions), tests[i, 2], true /* case-insensitive */); 86Scanner lexer = new Scanner("a=b", ParserOptions.AllowProperties); 98Scanner lexer = new Scanner("$(", ParserOptions.AllowProperties); 102lexer = new Scanner("$x", ParserOptions.AllowProperties); 117Scanner lexer = new Scanner(pattern, ParserOptions.AllowProperties); 133Scanner lexer = new Scanner(pattern, ParserOptions.AllowProperties); 144Scanner lexer = new Scanner("@(", ParserOptions.AllowAll); 149lexer = new Scanner("@x", ParserOptions.AllowAll); 154lexer = new Scanner("@(x", ParserOptions.AllowAll); 159lexer = new Scanner("@(x->'%(y)", ParserOptions.AllowAll); 164lexer = new Scanner("@(x->'%(y)', 'x", ParserOptions.AllowAll); 169lexer = new Scanner("@(x->'%(y)', 'x'", ParserOptions.AllowAll); 182Scanner lexer = new Scanner("false or 'abc", ParserOptions.AllowAll); 187lexer = new Scanner("\'", ParserOptions.AllowAll); 198Scanner lexer = new Scanner("1234", ParserOptions.AllowAll); 203lexer = new Scanner("-1234", ParserOptions.AllowAll); 208lexer = new Scanner("+1234", ParserOptions.AllowAll); 213lexer = new Scanner("1234.1234", ParserOptions.AllowAll); 218lexer = new Scanner(".1234", ParserOptions.AllowAll); 223lexer = new Scanner("1234.", ParserOptions.AllowAll); 227lexer = new Scanner("0x1234", ParserOptions.AllowAll); 231lexer = new Scanner("0X1234abcd", ParserOptions.AllowAll); 235lexer = new Scanner("0x1234ABCD", ParserOptions.AllowAll); 246Scanner lexer = new Scanner("$(foo)", ParserOptions.AllowAll); 249lexer = new Scanner("@(foo)", ParserOptions.AllowAll); 252lexer = new Scanner("abcde", ParserOptions.AllowAll); 257lexer = new Scanner("'abc-efg'", ParserOptions.AllowAll); 262lexer = new Scanner("and", ParserOptions.AllowAll); 266lexer = new Scanner("or", ParserOptions.AllowAll); 270lexer = new Scanner("AnD", ParserOptions.AllowAll); 274lexer = new Scanner("Or", ParserOptions.AllowAll); 285Scanner lexer = new Scanner("(", ParserOptions.AllowAll); 288lexer = new Scanner(")", ParserOptions.AllowAll); 291lexer = new Scanner(",", ParserOptions.AllowAll); 294lexer = new Scanner("==", ParserOptions.AllowAll); 297lexer = new Scanner("!=", ParserOptions.AllowAll); 300lexer = new Scanner("<", ParserOptions.AllowAll); 303lexer = new Scanner(">", ParserOptions.AllowAll); 306lexer = new Scanner("<=", ParserOptions.AllowAll); 309lexer = new Scanner(">=", ParserOptions.AllowAll); 312lexer = new Scanner("!", ParserOptions.AllowAll); 323Scanner lexer = new Scanner("@(Foo, ' ')", ParserOptions.AllowAll); 327lexer = new Scanner("'@(Foo, ' ')'", ParserOptions.AllowAll); 331lexer = new Scanner("'%40(( '", ParserOptions.AllowAll); 335lexer = new Scanner("'@(Complex_ItemType-123, ';')' == ''", ParserOptions.AllowAll); 347Scanner lexer = new Scanner("Foo()", ParserOptions.AllowAll); 353lexer = new Scanner("Foo( 1 )", ParserOptions.AllowAll); 360lexer = new Scanner("Foo( $(Property) )", ParserOptions.AllowAll); 367lexer = new Scanner("Foo( @(ItemList) )", ParserOptions.AllowAll); 374lexer = new Scanner("Foo( simplestring )", ParserOptions.AllowAll); 381lexer = new Scanner("Foo( 'Not a Simple String' )", ParserOptions.AllowAll); 388lexer = new Scanner("Foo( 'Not a Simple String', 1234 )", ParserOptions.AllowAll); 397lexer = new Scanner("Foo( $(Property), 'Not a Simple String', 1234 )", ParserOptions.AllowAll); 408lexer = new Scanner("Foo( @(ItemList), $(Property), simplestring, 'Not a Simple String', 1234 )", ParserOptions.AllowAll); 429Scanner lexer = new Scanner("'String with a $(Property) inside'", ParserOptions.AllowAll); 433lexer = new Scanner("'String with an embedded \\' in it'", ParserOptions.AllowAll); 437lexer = new Scanner("'String with a $(Property) inside'", ParserOptions.AllowAll); 441lexer = new Scanner("@(list, ' ')", ParserOptions.AllowAll); 445lexer = new Scanner("@(files->'%(Filename)')", ParserOptions.AllowAll); 455Scanner lexer = new Scanner("1234", ParserOptions.AllowAll); 458lexer = new Scanner("'abc-efg'==$(foo)", ParserOptions.AllowAll); 468lexer = new Scanner("$(debug)!=true", ParserOptions.AllowAll); 478lexer = new Scanner("$(VERSION)<5", ParserOptions.AllowAll); 497lexer = new Scanner("$(DEBUG) and $(FOO)", ParserOptions.AllowAll); 502lexer = new Scanner("1234$(DEBUG)0xabcd@(foo)asdf<>'foo'<=false>=true==1234!=", ParserOptions.AllowAll); 520lexer = new Scanner(" 1234 $(DEBUG) 0xabcd \n@(foo) \nasdf \n< \n> \n'foo' \n<= \nfalse \n>= \ntrue \n== \n 1234 \n!= ", ParserOptions.AllowAll); 545Scanner lexer = new Scanner("@(foo)", ParserOptions.AllowProperties); 549lexer = new Scanner("1234 '@(foo)'", ParserOptions.AllowProperties); 554lexer = new Scanner("'1234 @(foo)'", ParserOptions.AllowProperties); 565Scanner lexer = new Scanner("'$(DEBUG) == true", ParserOptions.AllowAll);