Skip to content

Commit 046b37a

Browse files
authored
[Milestone] (#1281)
• Add new MS Rules to provide actions & predicates for a number of C#’s non-grammar rules: - adjacency requirement for tokens in >> & >>= - restrict places declaration expressions can be used – as the grammar for them is very loose - type argument list disambiguation - report semantic error if null-forgiving is applied to null-forgiving - tweak order of choices in a couple of rules so Antlr picks the right one • Samples: - Reorganise - Spilt the large AllInOneNoPreproccesor-v6 into parts - Add new samples for new constructs - Switch them all to use the new Rules MS Co-authored-by: Nigel-Ecma <[email protected]>
1 parent f885375 commit 046b37a

File tree

192 files changed

+83091
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+83091
-3
lines changed
Binary file not shown.

tools/GrammarTesting/Tests/Parsing/ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ The second set, in `Demo`, exist to demonstrate the system and are run when `Set
77
or `DoParsingTests` are passed the `-d` option.
88

99
If `Demo` is not here it will be in the environment parallel which can be located using the
10-
environment variable `BG_LIB_PARSINGTESTS`.
10+
environment variable `BG_LIB_PARSINGTESTS`.

tools/GrammarTesting/Tests/Parsing/Samples/AllInOneNoPreprocessor-v7/_Sample_Options.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Parsing Samples
2+
3+
Sub-directories are used to group related (in some way) tests.
4+
5+
The “v*n*” folders typically contain samples testing features introduced
6+
in *or before* that version of C# – though nothing is enforced.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
extern alias Foo;
2+
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Linq.Expressions;
7+
using System.Text;
8+
using M = System.Math;
9+
10+
using ConsoleApplication2.Test;
11+
12+
/**/
13+
/* the previous comment is an empty delimited comment and not a document comment */
14+
/** this is a document comment */
15+
// this one is a single line comment
16+
17+
using X = int1;
18+
using Y = ABC.X<int>;
19+
20+
using static System.Math;
21+
using static System.DayOfWeek;
22+
using static System.Linq.Enumerable;
23+
24+
[assembly: System.Copyright(@"(C)""
25+
26+
2009")]
27+
[module: System.Copyright("\n\t\u0123(C) \"2009" + "\u0123")]
28+
29+
class TopLevelType : IDisposable
30+
{
31+
void IDisposable.Dispose() { }
32+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Sample: AllInOneNoPreprocessor-v6-*
2+
3+
This is a standard sample based off a test file originating with the Roslyn project.
4+
5+
The AllInOneNoPreprocessor-v6-* combined contain samples of most of the C# constructs up to C# v6.

0 commit comments

Comments
 (0)